Skip to main content
Associate III
May 25, 2024
Solved

Fail to program External SPI Flash - STM32F429 and W25Q64

  • May 25, 2024
  • 1 reply
  • 1296 views

Hello all,

I am implementing an external loader for STM32F429 and W25Q64. The STM32CubeIDE Version is 1.15.1 and STM32CubeProgrammer is 2.16.0.

I success programming a 64k bin file with the external loader while failed to program a bigger size file (150K). The attachments are the logs of STM32CubeProgrammer .

The Dev_inf is as below:

 

 

struct StorageInfo const StorageInfo = {
 "W25Q64_STM32F429BIT6_SPI", 
 SPI_FLASH, 
 0x90000000, 
 0x00800000, 
 0x0100, //256b
 0xFF, 

 // Specify Size and Address of Sectors (view example below)
 0x0800, 
 0x1000, //4kB
 0x00000000,
 0x00000000,
};

 

 

 

May I have any suggestions on this case? Thanks.

Best answer by Tesla DeLorean

The secondary call to Init() fails.

The first 74KB takes 90970 ms, ie 1.5 minutes, which seems incredibly slow.

You need to write 256-byte pages, but this should be pretty efficient unless you add a lot of delays.

1 reply

Tesla DeLorean
Guru
May 25, 2024

>>May I have any suggestions on this case?

Thoroughly test your code from applications space.

Instrument your code via an available UART so you can understand how the STM32 Cube Programmer is interacting with it and any errors or issues it encounters. Use it to understand the flow dynamics, and how to test/exercise it better in application space.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 25, 2024

The secondary call to Init() fails.

The first 74KB takes 90970 ms, ie 1.5 minutes, which seems incredibly slow.

You need to write 256-byte pages, but this should be pretty efficient unless you add a lot of delays.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
hbZhaoAuthor
Associate III
May 26, 2024

Thanks a lot.