This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Update the firmware by the CAN bus

Other Parts Discussed in Thread: LM3S8962

Hello,

Is it possible to download a new firmware by the CAN bus on LM4F microcontrollers?

I have seen this functionnality on the RDK-BLDC I have just bougth. However, the LM3S on this board is not recommended for new design and I should go to LM4F serie.

On the "LM4F232H5QD ROM user's manual", I read that the flash memory can be updated by the following interfaces :

UART0 using a custom serial protocol
SSI0 using a custom serial protocol
I2C0 using a custom serial protocol
USB using DFU protocol

Thank you in advance,

Best regards

  • Sebastien,

    Firmware update over CAN is not supported in ROM for Stellaris Microcontrollers.  There are technical reasons for this, since CAN bus parameters need to be matched to the characteristics of the physical bus.  Also, the protocol for firmware transfer is usually a high-level function of the protocol, which also varies by application. 

    Your options are to implement a flash-based firmware loader using a standard protocol such as CANopen.  There appears to be several software vendors that support this.

    Alternatively, the CAN controller is the same on LM4F devices so porting the CAN firmware loader from the RDK-BDC24 DC Motor Control is a straightforward process.

  • Thanks a lot Jonathan.

  • Hi everyone. I'm a bit confused about this feature due to the existence of this paper:

    http://www.ti.com/lit/ug/spmu301/spmu301.pdf

    stating that's possible updating firmware vi CAN bus.

    In paper's introduction it's said that's referred to Cortex M3 micros but it's still available as technical doc for TM4C129x micros as a part of TivaWare, that runs on TM4C family.

    Can anyone please clarify the matter? Thanks a lot in advance.

  • As a follow on to poster Mirko's well-framed question - note that, "spmu301.pdf" he references is described as, "SW-BOOTLDR-UG-1.0," dated 11 Apr 2013.  Bold-faced title of this document is, "TivaWare Boot Loader" - which places no such TM4C129x device restriction/limitation upon the use of CAN as boot-load transport vehicle for TM4C devices...

    That said, believe Mirko's issue is resolved w/in pg 5, spmu301.pdf, "...boot loader is a small piece of code that can be programmed at the beginning of flash to act as an application loader as well as an update mechanism..."  It seems reasonable to conclude that there is no conflict - CAN boot-loader does not reside w/in MCU ROM - but may be placed w/in MCU Flash - and thus achieve any/all update goals!

    Upon closer (re-reading) of Jonathan's post - he speaks to the inability of, "ROM-based" use of CAN to implement the boot-loader for past Stellaris MCUs.  The (apparent) conflict may be resolved by using the "Flash-based" version for CAN firmware updates.

    Perhaps still to be resolved - do the new TM4C devices extend their ROM-based, firware updates - to now include CAN?

  • Hi.

    I worked on such an application a while back. My arrangement was like this:

    PC --> LM3S8962 (UART to CAN converter) --> LM3S8962 (the firmware updatee)

    On the firmware updatee, I wrote an application that configured the various CAN parameters and then jumped to the UpdaterCAN() function in the boot-ROM. Meanwhile, the UART to CAN converter receives 8 bytes over UART from the PC, turns it into a CAN message and sends it out on the CAN bus (parameters being exactly the same as the updatee CAN parameters). This worked well.

    If your flash application allows you to jump to the bootloader in some condition, you can indeed use the ROM bootloader for firmware update.

    Regards,

    Shashank