Firmware Update


I am writing my Master thesis with a system contains CANopen based devices.

I need to find a solution for Firmware update possibilities with system in operational mode.

Could it be possible to update device n running mode?

In my system there are 64 different devices and it takes around 4 hours to update one by one. But is there any solution to update system in operating mode?

Thank you in advance

With absolutely no documentation of WHAT you are talking about, how are we to give you a usable response?

// Per.


If you are just writing a thesis, just put in some nice sounding words about firmware updates and finish with "many details of implementation need to be worked out."


Not really brother.
I have choosen the field in which I am expert so do not try to judge me with only this question
Its a very small part of my work in which I am bit lost

You do not need to write anything about my Thesis as I am quit capable to do it by myself
I was just asking if this kind of situation is possible or not?

Thank you very much for your reply

Have a nice day!

Unless you happen to find someone here familiar with CANopen, I don't think you'll have any luck getting an answer here (I certainly haven't heard CANopen mentioned here before - it sounds like its some sort of protocol run on top of a CAN network, and it looks like some exorbitantly expensive development hardware is sold by national instruments). This is an Arduino forum, so you're going to find people who mostly use Arduino compatible micros here. We mostly have AVR people (particularly in this section), with some SAM/ARM people - the Teensy/STMduino/ESP8266 people have their own forums.

We could probably give some insight if you were to give us more information, though. What sort of microcontroller is in use? Are you writing the code for the microcontroller yourself or using code supplied by someone? Likely the answer is a bootloader that implements the CANopen protocol, and have your application code reboot into the bootloader in response to an appropriate packet. You might have to write this bootloader yourself. The details of this will all depend on the exact hardware you're running it on.

It's totally possible, though non-trivial. I've never written a bootloader from the ground up, but I've modified three of them (chipboot45, optiboot, and whatever is on the mega2560), and it's been a very rewarding and challenging experience every time.


What do you mean by "Update in running mode"? At some point I believe you would need to reboot your device (self restart) to get the new firmware running. Is that acceptable?

If yes, use an external storage where you can upload your firmware in parallel with other CANOpen messages... Once the new firmware is at the node, it'll need to have a mechanism to read the data from this storage and program itself.. sounds like a bootloader?!

Depending on the device, you can program itself while running and you just need to "jump" to the new starting point of your new firmware, like dual partitions in a computer.

If you describe a bit more about what you have designed or if you already define components, that might help to provide a more specific answer.


Thank you very much for your reply

I have attached a diagram of my system.
There are 63 Control heads are connected with a Gateway.
It takes around 3 hours to update firmware for all the devices one by one.

What I am looking for is how to reduce this upgrade time?

Each control head will be connected to a valve in real industrial plant which will control it.

As you said it is complusary to restart the system because STM controllers which are in control heads have a fixed start address

So my concerns are:

  1. Is there any possibilities to update this control head without inturrept its operational mode?
  2. What are the different scenarios I should practically implement which reduce the upgrade time?

Thank you once again !!

I don’t know whether it’s possible or not with your STM uc, but with Atmel Sam3x it is. See FirmwareReceiver Library:


Thank you very much for your reply

I tried to look into Code but unable to understand it.

Could you please eleborate a little bit?

Thanks once again

I suggest that you ask directly your questions to the author of this Library Collin80 in the sub part of the Arduino forum dedicated to the DUE board.

Ok, so how are you upgrading the firmware currently? Elaborate it a bit pls.

there are 64 different devices and it takes around 4 hours to update one by one.

~4 minutes per update seems pretty excessive. Is that because the process is fully manual? Are you looking to improve that "somewhat" (say, updating one at a time via some more automatic process), "significantly" by changing how it works (say, transferring the new image to per-node storage at a higher datarate and having them self-update locally), or "dramatically" (say, by multicasting the new image to multiple devices at once)?

Understand that more complex changes might be worthy of a MS thesis all on their own, and may be more device-specific than CANOpen in general. (in which case we'd need to know what device you're using!) If your thesis isn't actually about the operational issues including update processes, then Keith's tongue-in-cheek suggestion might actually be the best course of action. (do your debugging with fewer nodes, I guess? No one wants their 8-hour work day to be "I changed a line of code, waited 4 hours for the system to reboot, realized that my fix didn't work, changed another line of code, rebooted the system again...")