Not able to read Flash data of STM32l5
I am using STM32L562E-DK.
I have ported SBSBFU for it. It is working fine. I want to store my custom data into internal flash and read it on bootup time in the bootloader.
For testing I am flashing one binary of 16 byte which's content is "Hello World!" at 0x73000 using SBSFU_UPDATE.bat.
If I read Data using STM32Cube programmer and read data at 0x73000, it shows "Hello World!". But If I read Data (16 bytes) using flash read API, it returns success but the data is 0x00(all zero).
int test_Storage()
{
uint32_t addr = 0x73000;
uint8_t data[32];
int test_ret = 1;
test_ret = TFM_Driver_FLASH0.ReadData(addr,data,sizeof(data));
if(test_ret != 0)
{
printf("\r\n Read Fail\r\n");
}
else
{
printf("\r\n Read Successfull\r\n");
for(int i =0;i<16;i++)
{
printf("%02x ",data[i]);
}
printf("\r\n");
}
return test_ret;
}
Also, I have changed the range in "low_level_device.c" file for erase and write as well. But I am getting the same result.
@Frantz LEFRERE Can you please help me regarding it?
Am I missing anything from my side?
