cancel
Showing results for 
Search instead for 
Did you mean: 

Strange in debugging NOR Flash

Charles_Li
Associate II

In STM32CubeIDE, the NOR Flash seems to work fine that data was correct both by reading to variable and reading 0x90000000 of memory mapping address.

Charles_Li_2-1693971120181.png

But if terminate the session and restart and just read the data, it is all gone.

Charles_Li_3-1693971306706.png

And there is another experiment I did, if comment out chip earse then just writing/reading data,

data can be saved at next session, is there any idea?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Charles_Li 

I have some suggestions that might help!

First, in QSPI_ResetChip() you need to wait for end of reset you can just add HAL_QSPI_AutoPolling() or HAL_QSPI_AutoPolling_IT(). Also, in datasheet, section 10. Reset you may need to check the reset timings. Also, RST should be followed to RSTEN either in QUAD mode or SPI Mode. 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
FBL
ST Employee

Hi @Charles_Li 

Coul you please share your code/configuration? used product?

Could you share a screenshot using CubeProgrammer reading from 0x90000000 to check the saved data? 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I'm using P-NUCLEO-WB55.Nucleo

I can't read by CubeProgrammer since it does not support MX25U1632F

Hello @Charles_Li 

I have some suggestions that might help!

First, in QSPI_ResetChip() you need to wait for end of reset you can just add HAL_QSPI_AutoPolling() or HAL_QSPI_AutoPolling_IT(). Also, in datasheet, section 10. Reset you may need to check the reset timings. Also, RST should be followed to RSTEN either in QUAD mode or SPI Mode. 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Check you don't have any code to erase the memory, that might get run as the debugger wrestles control.

Double check memory mapping and related QSPI bring up is not failing.

Shouldn't be caching.

Would be helpful to have a working External Loader, but getting read/write working in BSP first is good, and permits debugging. 

Review sector erase and page write code. Dump content via direct mode. Use that command as a template for memory mapped.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..