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.

CCS/TM4C1230C3PM: Custom Bootloader application

Part Number: TM4C1230C3PM

Tool/software: Code Composer Studio

Hi all,

I searched a lot on the net but I was not able to find a solution about my problem.

I need to create a bootloader which support the re-programming of the board through external(SPI) can controller.

I had a look at several examples but in all of them the re-programming procedure could be done through (internal) CAN , or UART or other internal peripherals..

My requests are:

  • Is it possible to implement a bootloader which can communicate with external peripheral, or the only way is to use internal peripheral?
  • Is there an application note that describe the protocol used by the "LM Flash Programmer utility"? What I wanna do is re-implement the same protocol in the MCU (using external peripheral)
  • Once received data from the "LM Flash Programmer", how can I write these data on flash?
  • Is there a fast-way instead of point #2? :)

Hope in any advice and help,

Best regards,

Marco.

  • Marco Semenzato said:
    Is it possible to implement a bootloader which can communicate with external peripheral, or the only way is to use internal peripheral?

    Yes it is possible. The bootloader was written with the idea that new interfaces can be added, but you would have to write the SPI/CAN driver. Look at the file "C:\ti\TivaWare_C_Series-2.1.4.178\boot_loader\bl_can.c" in the TivaWare library.  You will need to make a modified version that does the hardware initialization of your external CAN chip.

    Marco Semenzato said:
    Is there an application note that describe the protocol used by the "LM Flash Programmer utility"? What I wanna do is re-implement the same protocol in the MCU (using external peripheral)

    See "C:\ti\TivaWare_C_Series-2.1.4.178\docs\SW-TM4C-BOOTLDR-UG-2.1.4.178.pdf". Section 5.2 discusses the protocol. It is simple.

    Marco Semenzato said:
    Once received data from the "LM Flash Programmer", how can I write these data on flash?

    I am not sure what you are asking here. Are you asking how to send the data on the CAN bus? LM Flash Programmer does not support a CAN interface. However, There is a compile time option to take a TM4C part and make it a Serial to CAN protocol converter.

  • Yes it is possible. The bootloader was written with the idea that new interfaces can be added, but you would have to write the SPI/CAN driver. Look at the file "C:\ti\TivaWare_C_Series-2.1.4.178\boot_loader\bl_can.c" in the TivaWare library.  You will need to make a modified version that does the hardware initialization of your external CAN chip.

    Great.. of course I have to write my custom driver that deals with my external component :)

    See "C:\ti\TivaWare_C_Series-2.1.4.178\docs\SW-TM4C-BOOTLDR-UG-2.1.4.178.pdf". Section 5.2 discusses the protocol. It is simple.

    Perfect.. I'll have a look at the document !!

    I am not sure what you are asking here. Are you asking how to send the data on the CAN bus? LM Flash Programmer does not support a CAN interface. However, There is a compile time option to take a TM4C part and make it a Serial to CAN protocol converter.

    Ah.. Reading docs I was quite sure that LM Flash Programmer could support CAN.. so I have to write my own PC software in order to deal with the "download protocol?" over CAN?

    By the way, I was asking not "how to send data" over CAN but "what are the functions that allow to write data in Program-Flash in order to re-program the micro"? I suppose that once you acquire the data you have to write it at a specific location in flash and then jump from RAM to Flash.. what are the functions to do it?

    Thanks,

    Marco.