Hello NXP Experts,
I am working on LIN Bootloader .here we are facing issue with LIN_DRV_IRQHandler when erase memory .when request send from master(CANOE) for erase memory it's going to LIN_DRV_IRQHandler.
if any one having any idea please share to us
Thank
Ganesh Babu Vaka
Hi,
I can see that the bootloader is executed from code flash memory. So, it is caused by read while write error:
Code flash on S32K116 consists of one read partition only. So, you are not allowed to access the code flash when program or erase operation is being executed on code flash.
Solutions:
1. Put the bootloader to data flash memory as it is done in:
https://www.nxp.com/docs/en/application-note/AN12323.pdf
https://www.nxp.com/docs/en/application-note-software/AN12323SW.zip
or
https://www.nxp.com/docs/en/application-note/AN12218.pdf
https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip
2. Disable interrupts before erase/program operation.
3. Or if you need to process interrupts during erase operation, it's necessary to put all the interrupt resources (interrupt vector table, ISR handler, functions called by ISR handler) to RAM memory.
First option is usually easier task.
More read partitions are available only on S32K146 (two partitions) and S32K148 (three partitions). All smaller derivatives of S32K1 have one partition only in case of code flash.
Regards,
Lukas