Hello NXP
Here we are with S32K148 and using flash drivers from SDK. we are performing flash operations from bootloader code on application memory
boot- memory block: 0x00000000 to 0x0003FFFF
app- memory block: 0x00040000 to 0x0017FFFF
Here we are intended to do erase of whole application memory block (0x40000 to 0x17FFFF) and verify it for this we are using "FLASH_DRV_EraseSector" function followed by "FLASH_DRV_VerifySection" in a loop until we reach the last sector of application memory block.
But here continuously we are seeing "FLASH_DRV_VerifySection" got failed at 0x70000 address, arguments we given to "FLASH_DRV_VerifySection" are :
FLASH_DRV_VerifySection(&FlashSSDConfig, Flash_PrgmEraseConfig_s.NextStartAdrs_u32, C_FLASH_SECTOR_SIZE, C_FLASH_ERASE_MARGINLEVEL)
Flash_PrgmEraseConfig_s.NextStartAdrs_u32: address will get updated in the loop
C_FLASH_SECTOR_SIZE: sector size 4kb
C_FLASH_ERASE_MARGINLEVEL: user margin level 1
FLASH_DRV_VerifySection(const flash_ssd_config_t * pSSDConfig, uint32_t dest, uint16_t number, uint8_t marginLevel)
Please do the needful !
解決済! 解決策の投稿を見る。
Hello @Saitej,
I guess this is because it crosses a PFlash block boundary.
There are 3 blocks (read partitions) from 0x0000_0000 to 0x0017_FFFF.
Once block 0x0008_0000.
One sector is 4096 bytes.
One double phrase is 128bits = 16bytes.
256 double phrases in one sector.
If you pass 256 as the third argument it should work.
Regards,
Daniel
Hello @Saitej,
I guess this is because it crosses a PFlash block boundary.
There are 3 blocks (read partitions) from 0x0000_0000 to 0x0017_FFFF.
Once block 0x0008_0000.
One sector is 4096 bytes.
One double phrase is 128bits = 16bytes.
256 double phrases in one sector.
If you pass 256 as the third argument it should work.
Regards,
Daniel