2024-09-03 10:43 PM
While I am trying to write data in flash in memory it isn't being updated in the particular memory location while checking in debug session. And memory locations are showing 00000000 by default instead of FFFFFFFF and the image for same is attached hereby.
I have also added one file named FLASH_PAGE.c which is also attached hereby. Kindly provide some solution for this issue.
2024-09-04 03:47 AM
Hello,
This thread is not related to CubeIDE but to the product usage. So in next time please post your thread in the correct forum. Post will be moved to MCU Products forum.
Also you need always to provide the MCU part number.
Please refer to our recommendation on how to post a thread in this link.
Thank you for your understanding.
2024-09-04 04:22 AM
As @SofLit said, you need to state the STM32 part number. Does it have cache?
In your Flash_Write_Data() function, you don't check the return values from HAL_FLASH_Unlock() or HAL_FLASH_Lock(). Are they succeeding?
Does HAL_FLASHEx_Erase() return any error?
BTW:
@aiswarya wrote:image for same is attached hereby.
should be "herewith".
Or just "is attached" would be fine.
2024-09-04 06:02 AM
STM32U5
STM32U5G9J-DK2 ??
2024-09-04 06:07 AM
> EraseInitStruct.Page = StartPageAddress;
It's expecting a page number. You appear to be providing an address.
Could be other things going on here. When unexpected, all 0's can indicate the debugger cannot read those memory locations.