Erasing flash issue in the "Unified Bootloader" demo project for S32K144

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

Erasing flash issue in the "Unified Bootloader" demo project for S32K144

跳至解决方案
1,745 次查看
snaku_lee
Contributor IV

Hi,

I using the 'Unified Bootloader' project for S32K144 to download my application code, which size is 174KB, and I find a problem in the FlashErase() function of the fls_app.c.

When a UDS Tester (or client) request to erase Routine (0xFF00), and the FlashErase() should erase application's P-Flash area (i.e. 0x14000~0x80000). But in my case depend on file size, the FlashErase() erase 0x14000 ~ 0x36000 three times, and finally it erase 0x14000 ~ 0x15000. Erased total number sectors is correct but wrong address. I find the issue due to the eraseFlashStartAddr is reset to 0x14000 in below code

I comment out this line can solve my problem, but I am not sure what is the original intention for this line.

 

 

 

while((s_eraseSectorsCnt < totalSectors) && (0u != s_appFlashltem)) //note
{
  ...
  /*save erase flash memeory address*/
  eraseFlashStartAddr = s_pAppFlashMemoryInfo->xBlockStartLogicalAddr; // this line
  ...
}

 

 

note: if i type 's_appFlashltem', this web page will change it to 'a_appFla**beep**em', so i use a little 'L' character to replace the big 'I' character.

 

标记 (1)
0 项奖励
回复
1 解答
1,729 次查看
nxf10035
NXP Employee
NXP Employee

Hi, 

      Thanks for your information. This is a known issue. In next release version, the issue by resolved. Please comment out the line(622) in Fls_app.c.

/*save erase flash memeory address*/
// eraseFlashStartAddr = s_pAppFlashMemoryInfo->xBlockStartLogicalAddr;

 

 

在原帖中查看解决方案

1 回复
1,730 次查看
nxf10035
NXP Employee
NXP Employee

Hi, 

      Thanks for your information. This is a known issue. In next release version, the issue by resolved. Please comment out the line(622) in Fls_app.c.

/*save erase flash memeory address*/
// eraseFlashStartAddr = s_pAppFlashMemoryInfo->xBlockStartLogicalAddr;