flashiap MCX A in small blocks

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

flashiap MCX A in small blocks

2,593 次查看
berndgrossmann
Contributor II

I try to run flashiap several times but failed second time.

I need to program some small blocks of flash memory.

 

Here is the output of the modified demo application and source code.

<\n> Flash driver API tree demo application. <\r>
<\n><\r>
<\n> Initializing flash driver.<\r>
<\n> Flash init successfull! <\r>
<\n><\r>
<\n> Config flash memory access time. <\r>
<\n><\r>
<\n> PFlash Information:<\r>
<\n> kFLASH_PropertyPflashBlockBaseAddr = 0x0<\r>
<\n> kFLASH_PropertyPflashSectorSize = 8192<\r>
<\n> kFLASH_PropertyPflashTotalSize = 131072<\r>
<\n> kFLASH_PropertyPflashPageSize = 0x80<\r>
<\n> destAdrss = 0x1C000<\r>
<\n> Erase a sector of flash<\r>
<\n> Calling flash_verify_erase_sector() API.<\r>
<\n> Successfully erased sector: 0x1c000 -> 0x1e000<\r>
<\n><\r>
<\n> Calling FLASH_Program() API.<\r>
<\n> Calling FLASH_VerifyProgram() API.<\r>
<\n> Successfully programmed and verified location: 0x1c000 -> 0x1c040 <\r>
<\n><\r>
<\n> Flash driver API tree demo application. <\r>
<\n><\r>
<\n> Initializing flash driver.<\r>
<\n> Flash init successfull! <\r>
<\n><\r>
<\n> Config flash memory access time. <\r>
<\n><\r>
<\n> PFlash Information:<\r>
<\n> kFLASH_PropertyPflashBlockBaseAddr = 0x0<\r>
<\n> kFLASH_PropertyPflashSectorSize = 8192<\r>
<\n> kFLASH_PropertyPflashTotalSize = 131072<\r>
<\n> kFLASH_PropertyPflashPageSize = 0x80<\r>
<\n> destAdrss = 0x1C010<\r>
<\n> Erase a sector of flash<\r>
<\n><\r>
<\n><\r>
<\n><9>---- HALTED DUE TO FLASH ERROR! ----

 
标记 (2)
0 项奖励
回复
4 回复数

1,999 次查看
berndgrossmann
Contributor II

berndgrossmann_0-1733756883210.png

 

0 项奖励
回复

1,944 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @berndgrossmann 

The minimum erase size is one sector, which is 8 KB. You can also read the sector size  using the following function:

FLASH_API->flash_get_property(&s_flashDriver, kFLASH_PropertyPflashSectorSize, &pflashSectorSize);

Ensure that the erase size is aligned to the sector size. Based on the returned error code 0x65, it appears that the issue is due to the flash erase size not being aligned.

Alice_Yang_0-1733810596274.png

 

BR

Alice

0 项奖励
回复

2,010 次查看
berndgrossmann
Contributor II

The return, fail Code is 0x65 after erase.

Is it possilble zu erase the flash in  kFLASH_PropertyPflashPageSize = 0x80 or kFLASH_PropertyPflashSectorSize = 8192?

 

0 项奖励
回复

2,015 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @berndgrossmann 

Please debug step by step to check when it failed? Run to which code? And take a screenshot show the failed information.  

 

BR

Alice

 

0 项奖励
回复