2023-09-05 08:40 PM
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.
But if terminate the session and restart and just read the data, it is all gone.
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?
Solved! Go to Solution.
2023-09-07 02:55 AM
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.
2023-09-06 02:38 AM
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.
2023-09-06 08:12 PM - edited 2023-09-06 08:13 PM
2023-09-07 02:55 AM
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.
2023-09-07 04:37 AM
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.