Skip to main content
Associate II
September 6, 2023
Solved

Strange in debugging NOR Flash

  • September 6, 2023
  • 2 replies
  • 7747 views

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?

 

 

This topic has been closed for replies.
Best answer by FBL

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. 

 

2 replies

ST Technical Moderator
September 6, 2023

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 "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Associate II
September 7, 2023

I'm using P-NUCLEO-WB55.Nucleo

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

FBLBest answer
ST Technical Moderator
September 7, 2023

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 "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Tesla DeLorean
Guru
September 7, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..