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.
Solved! Go to Solution.
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;
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;