Flash verify section issue !

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Flash verify section issue !

ソリューションへジャンプ
459件の閲覧回数
Saitej
Contributor IV

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)

  • Here we suspect in the function arguments we see third argument as number instead of size & we are passing the size is that correct ?.
  • from reference manual we understand we need to give double phrase number which is "128". are we correct on this ?
  • Saitej_0-1624337911710.png

     

  • But on other side in SDK doxygen document says size. which one is correct ?
  • Saitej_1-1624338011689.png

Please do the needful !

0 件の賞賛
1 解決策
438件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Saitej,

I guess this is because it crosses a PFlash block boundary.

danielmartynek_0-1624447190277.png

There are 3 blocks (read partitions) from 0x0000_0000 to 0x0017_FFFF.

Once block 0x0008_0000.

danielmartynek_1-1624447270223.png

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

 

 

 

元の投稿で解決策を見る

0 件の賞賛
1 返信
439件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Saitej,

I guess this is because it crosses a PFlash block boundary.

danielmartynek_0-1624447190277.png

There are 3 blocks (read partitions) from 0x0000_0000 to 0x0017_FFFF.

Once block 0x0008_0000.

danielmartynek_1-1624447270223.png

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

 

 

 

0 件の賞賛