Skip to main content
MSuzu.3
Associate
August 5, 2022
Solved

The correct value cannot be read without resetting after flash writing with the B-U585I-IOT02A

  • August 5, 2022
  • 3 replies
  • 1755 views

I use B-U585I-IOT02A to read after writing Flash Memory, 0xFF is read, but once I reset it, I can read the written value.

Similarly, when I use it to read after erasing the Flash Memory, the value before erasing is read, but once I reset it, I can read 0xFF.

In short, the correct value cannot be read unless reset once for both Write and Erase.

Is there any processing that must be done after programming or erasing?

Best answer by Mike_ST

Hello,

Please check the STM32U5 Flash examples in the STM32U5 software package available here:

https://www.st.com/en/embedded-software/stm32cubeu5.html#tools-software

You can find flash access examples inside the following directory:

STM32Cube_FW_U5_V1.1.1\Projects\NUCLEO-U575ZI-Q\Examples\FLASH

These examples should work for the U585 as well.

Hope that helps.

3 replies

Mike_ST
Mike_STBest answer
Technical Moderator
August 5, 2022

Hello,

Please check the STM32U5 Flash examples in the STM32U5 software package available here:

https://www.st.com/en/embedded-software/stm32cubeu5.html#tools-software

You can find flash access examples inside the following directory:

STM32Cube_FW_U5_V1.1.1\Projects\NUCLEO-U575ZI-Q\Examples\FLASH

These examples should work for the U585 as well.

Hope that helps.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
MSuzu.3
MSuzu.3Author
Associate
August 8, 2022

Thank you.

I checked the example and found that HAL_ICACHE_Disable() is required before Write.

I also found that I needed HAL_ICACHE_Enable() after the Write.

I added these and it works as expected.

Erase also added the same processing and it worked as expected.

MKova.3
Visitor II
April 7, 2024

Thanks MSuzu.3 I had the same problem with the SRM32H5 and your note helped me solve it.