flashiap MCX A in small blocks

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

flashiap MCX A in small blocks

2,590件の閲覧回数
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! ----

 
ラベル(3)
タグ(2)
0 件の賞賛
返信
4 返答(返信)

1,996件の閲覧回数
berndgrossmann
Contributor II

berndgrossmann_0-1733756883210.png

 

0 件の賞賛
返信

1,941件の閲覧回数
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,007件の閲覧回数
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,012件の閲覧回数
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 件の賞賛
返信