Updating firmware via CAN

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

Updating firmware via CAN

2,055 Views
mayfly
Contributor III
Hi,

Does anyone know of (or can think of) a way to update the firmware for an HC(S)08 over CAN? It would be nice to upgrade the firmware of multiple micro-controllers on a CAN network without having to BDM/MON08 upgrade each of them individually. Any ideas how to do this?

yoroshiku
Labels (1)
0 Kudos
Reply
3 Replies

526 Views
Nouchi
Senior Contributor II
Hello,

You can write your own bootloader based on AN2295, you need to write data send/receive over MSCAN08 routines(for AZ & GZ family), and write something for the gateway between RS232 (host PC) an CAN bus.
I did that with multiple 908GZ60 boards and a MCF5213 board.
If you want to keep the system simple, you have to upgrade boards one by one.


Emmanuel,
0 Kudos
Reply

526 Views
mayfly
Contributor III
Thanks,

I had looked at AN2295, but it seems that they send a “certain character at a certain time”, such as XX m/us after reset. I would like to update the firmware "anytime", which is different than a 'boot'loader (though maybe only a semantic issue).

Are your CAN routines part of your bootloader?

I am thinking of putting my CAN routines in a 'protected' area and, when the command is received, erase and fill the old (non-protected) code area with the new code then jump to the new code once it has been loaded. Do you see any problems doing it this way? Is this more of a headache than doing it as a bootloader (eg AN2295)?
0 Kudos
Reply

526 Views
Nouchi
Senior Contributor II
Hello,

I did some minor changes, like, the bootloader is only called when IRQ is low (with jumper), I suppressed clock calibration (using 8Mhz crystal), I had to increase protected space to 1024 bytes to fit CAN send/receive simplified routines in polled mode, and works fine for few month now. The application program use its owns CAN routines with interrupts management.
If you like headache, you can build your own bootloader from scratch, but IMHO doing a work based on AN2295 will be more efficient because the main part of the job is done.


Emmanuel
0 Kudos
Reply