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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
897 Views
snaku_lee
Contributor III

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.

 

Tags (1)
0 Kudos
1 Solution
881 Views
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;

 

 

View solution in original post

1 Reply
882 Views
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;