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.

TM4C129ENCPDT: Host application to send image to CAN bus bootloader

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: UNIFLASH

Hi there!

We would like to use the flash bootloader available to update firmware using CAN interface, but I'm not sure how to develop the host side to send the bytes (read the image file, prepare packages with described protocol, etc). Would it be something similar to the sflash and eflash tools located under TivaWare/tools folder? Just in case, I'm aware CAN interface requires an CAN transciever and appropriate library.

Best regards,

Gabriel

  • Hi,

      I think you will not only need the the software tool on the host side but also the adapter (e.g. serial to CAN adapter) on the hardware side. If you have a serial to CAN adapter I think you use the LM flash programmer on the PC to bootload the MCU on CAN interface. 

      Please also refer to the CAN bootloader app note for TM4C device in the below link. Here you will find a TM4C device used as a serial to CAN adapter that takes the serial commands from the LM flash program in seral mode and translate to the CAN packets for bootloading another MCU on CAN interface. 

    https://www.ti.com/lit/pdf/spna245

  • Hi Charles,

    Thank you for your quick response! This app note seems even better than what I was asking for, because in the end, my application is the following:

    I'll have F28M36 devices (Concerto) working as main controllers, connected via CAN interface to several TM4C's (from one up to eight, depending on the case) working as nodes. The Concerto devices are also connected to a RS485 control network, from which I would update firmware from both types of devices. So the F28M36 will work as this "serial-to-CAN" adapter when I need to update the TM4C's nodes.

    However, it seems I couldn't use the LM Flash Programmer, because our RS485 network runs over 6 Mbps through a custom Ethernet/Serial converter solution implemented using BeagleBone Black's (BBB). We can create virtual serial ports for them, which could be displayed on the LM Flash GUI as normal serial ports, but it's not possible to set such baudrate, right?

    Actually, this baudrate isn't configurable, it's fixed on the BBB, so I think this setting on the LM shouldn't affect anything. But I'm not sure whether it'd work.

    Furthermore, It seems I couldn't use the LM Flash to update firmware for the F28M36 itself. In this case, my only option is to write my own host application for it, since Uniflash doesn't solve this problem either, right?

    One more thing: it would be very helpful to mention this app note on the TivaWare bootloader User's Guide (SPMU301).

    Best regards,

    Gabriel

  • Hello Gabriel,

    Gabriel Brunheira said:
    One more thing: it would be very helpful to mention this app note on the TivaWare bootloader User's Guide (SPMU301).

    Thanks for your feedback on this, we will see about adding that as an improvement for TivaWare. This app note released after the latest TivaWare update and the User's Guides are generated along side releases so it would need to be done when we make the next released update. Perhaps we can put an E2E FAQ for this though to help make it easier to find.

  • Hi Gabriel,

    I suggest you adapt the sflash source code to drive your RS485 interface and then run an adaptation of uart_to_can on the F28M36.

  • Hi folks,

    Thank you for your feedback. These recommendations encouraged me to adapt these solutions provided by you.

    I'll mark Charles post as resolved, but it would be nice to have some feedback on those open questions that remained from my last post regarding using LM Flash and Uniflash.

    Best regards,

    Gabriel

  • Gabriel Brunheira said:
    Furthermore, It seems I couldn't use the LM Flash to update firmware for the F28M36 itself. In this case, my only option is to write my own host application for it, since Uniflash doesn't solve this problem either, right?

    LM Flash Programmer will take a binary file and send out packets of data to a serial bootloader. It does not care what is in the binary file. I do not have any experience with F28M36. I suspect that if you created a serial bootloader for the F28M36 that uses the same protocol as the TM4C, it would work. I cannot address how well LM Flash Programmer will work with your RS485 network.

    UniFlash supports JTAG based programming for TM4C. I don't know about F28M36.

    If you would like more information on programming the F28M36 I can move this thread over to an expert on that device. However, I doubt that they will have any knowledge of LM Flash Programmer.

  • Hi Bob,

    Bob Crosby said:
    LM Flash Programmer will take a binary file and send out packets of data to a serial bootloader. It does not care what is in the binary file. I do not have any experience with F28M36. I suspect that if you created a serial bootloader for the F28M36 that uses the same protocol as the TM4C, it would work. I cannot address how well LM Flash Programmer will work with your RS485 network.

    That would be an interesting test, but I'm sure that it wouldn't cover half of the problem, since F28M36 is a dual-core SoC, one Cortex-M3 and one C2000 DSP, and the RS485 is used only by the M3.

    Bob Crosby said:
    UniFlash supports JTAG based programming for TM4C. I don't know about F28M36.

    It seems it works the same for F28M36, only JTAG based.

    Bob Crosby said:
    If you would like more information on programming the F28M36 I can move this thread over to an expert on that device. However, I doubt that they will have any knowledge of LM Flash Programmer.

    I would appreciate!

    Best Regards,

    Gabriel

  • Gabriel,

    For F28M3x, we have only JTAG support in the latest Uniflash.

    Do you have any other open question?

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    Thank you for your response! No more open quesitons, you may close this thread.

    Best regards,

    Gabriel