Electronics > Microcontrollers

J1939 firmware update - Parallel programming

<< < (3/3)

Microchip Application Notes
AN247 - A CAN Bootloader for PIC18F CAN Microcontrollers
AN1157 - A Serial Bootloader for PIC24F Devices
AN1094 - Bootloader for dsPIC30F/33F and PIC24F/24H Devices
AN851 - A FLASH Bootloader for PIC16 and PIC18 Devices
Bootloader Generator User’s Guide

Thanks I will have a look, I had already found AN247 which is discountinued because of bugs.
AN851 looks promising, the only problem is that it is in assembler but I guess I can rewrite that in C easily. Seems strange that there are no updates on the given firmwares since 2002 ?

I guess there are no "ready-made" can-bus bootloader but that's ok now I have good documentation and a general architecture in mind.

There are a few ready-made CAN bus bootloaders that you can buy.

But the concept doesn't have to be very hard. It's only moving data around, you can do it stateless if you want.
1: control byte
2-4: address
5-8: data
Then just many more of those messages.

However, one-to-many programming requires session management. That's where things might get complicated.


--- Quote from: matb on June 21, 2022, 06:25:50 am ---Bonjour everyone,

--- End quote ---


--- Quote from: matb ---I'm seeking advice from a bootloader point of view, what would be really cool (but I don't know if feasable and accepted in J1939 standard) is to be able to reprogram 1 or multiple devices at the same time with the on-board CanBus.
Have you guys did something like this before ?
--- End quote ---

Many times.

Usually, firmware updates are done with UDS. We are talking in broad automotive sense. You can equally think of material handling or construction equipment.

At power-up, a device sends the boot frame to identify itself, and if no one starts a UDS session during some grace period (say, 100..300 ms) it boots into the application which might use J1939 (it might use UDS as well).  If a session is started, your bootloader should handle write and read requests to update the firmware.

Here are some links to let you know the scale of the disaster:  ;)


And to answer your specific question about parallel programming, it could be done in principle, but the complexity of the bootloader does not worth it.


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version