Please help on how to do In Application Programming in MPC5645S.
there are two options: you can use Boot Assist Module (BAM) to load a code to RAM via UART or CAN (the code needs to be developed by yourself) and this code then can load new firmware via the same interface and program it to the flash memory. Disadvantage of this solution is that serial boot mode must be activated by hardware configuration - by changing of FAB pin during reset. We have this application note:
Second option (I think this is better one) is flash resident bootloader which provides more possibilities.
I shared a draft of application note here on the community:
It’s written for MPC5634M, software is working. It can be re-used also for MPC5645S (but porting is necessary).
Just in case, this is updated and published version for MPC57xx devices (software is written for MPC5748G):
We have also Rappid bootloader but unfortunately it does not support MPC5645S:
>> Can you please provide the porting guide for the second option?
>> We understood that the example boot loader is done in CW 2.x series from the doc "How to write flash resident bootloader for MPC55xx/56xx". Can we port the bootloader in CW 10.x series?
MPC5645S has different flash, so you need to use different drivers (but the API is still compatible):
And there's LINFlex module instead of eSCI module. So, the communication functions need to be changed. You can re-use code from AN5319 because there's LINFlex module too on MPC5748G. The main difference is that there's no interrupt for 'transmit buffer empty' in LINFlex module, so the flow is handled in slightly different way.
It doesn't matter which IDE is used. Just create new project in your IDE, change the linker file as described and then copy the code step by step to the new project with appropriate changes.
Retrieving data ...