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.

TMS320F28069M: Where to find or make a CAN Bootloader/flash programmer

Part Number: TMS320F28069M
Other Parts Discussed in Thread: C2000WARE

Hi,

I am an internt at a company which would like me to make, the board they use for controlling the driveline, remote updatable. One of the steps I will be needing to do for this is figuring out how to flash the new firmware version to the board with CAN. The board contains a CAN input which sends the data to the TMS320F28069M controller. I have started my research by flashing the new program through UART. Therefore I used the serial flash programmer given with C2000ware. After completing this step I want to do the same but with the CAN bootmode and protocol. I have done days and days of research but cant seem to get further. I have seen many topics mention a CAN bootloader or something like that but cant seem to find it myself.

So the question:

Is there a CAN bootloader I can use to flash the new firmware to the controller using CAN. Or does anyone have a hint for me so that I can convert the serial_flash_programmer example to a can_flash_programmer. 

Sorry for my lack of knowledge, I am just a student and this is my first time working with firmware and bootloaders.

I'm looking forward hearing your guys knowledge and tips.

Greetings,
Guilliam

  • Hi Guilliam, 

    There is a CAN flash kernel available for the F2806x device in C2000Ware. There is not currently a host side programmer for CAN, I will get back to you in a day about possible suggestions. 

    Thanks, 

    Anu

  • Dear Anu, 

    I have seen the CAN flash Kernel. I am currently looking at how the serial_flash_programmer works with the SCI Flash Kernel to understand what is happening exactly. And I am also studying the diffrence between the SCI flash kernel and CAN flash kernel to see what has to be done. But I am not really shure what I should do about the serial_flash_programmer to make it into a can_flash_programmer. Looking forward seeing your suggestions. 

    I accidently clicked the this resolved my issue button on your reply but it is not yet resolved so please ignore that.

    Thanks,
    Guilliam

  • Guilliam, 

    For the host side programmer, it is recommended to look at 3P tools that offer8 solutions. You can look at this link: https://www.ti.com/tool/C2000-3P-SEARCH

    In addition, Elprotronic has flash programmers that can be used with C2000 devices. You can look through their offerings here: https://www.elprotronic.com/

    Thanks, 

    Anu

  • I don't quite think this is what I am looking for.
    I am just trying to find a lead or example of how to make a CAN flash programmer.


    We have our Driveline PCB which contains 2 TMS320F28069M controllers. This PCB is connected to a STM controller through a CAN connector. This STM controller is in its turn connected to our main board controlled by a Intel atom processor. My task is to find out how we can make our Driveline PCB remote updatable. Currently our STM controller send the CAN messages to the PCB with the motorcontrollers.

    But what I now want to understand is what should be done to make the CAN flash kernel work on the board so that the new firmware can be downloaded on to the board so that we don't have to do this manually anymore with the XDS110 debug probe. I think I can find out the rest with the team. Hope I made my problem a bit more clear and I'm looking forward hearing from you.

    Update: 
    The last 2 days I have been studying and researching the differences between the SCI and CAN flash kernels. I have found out that most of the differences are not that important for what I want to accomplish since those are primarily init differences and checks to set the controller itself in the correct state with the registers and all. But I found out that the thing we use the flash kernels for: the getworddata functions which read in the data blocks of the programm desired to download onto the device are also quite the same. The only diffrence I found was that in de SCI_GetWordData the LSB and MSB are being verified back to the host. But in the SCI_GetOnlyWordData which is used by the SCI_Boot() this step of verifying is skipped so the same as the CAN_GetWordData. The other diffrence I found is that in the SCI_GetOnlyWordData the checksum is updated as followed: 

    This checksum is used a couple times in the serial_flash_programmer. But this is not used by the CAN Flash kernel ofcourse. 

    The last diffrence is that in the CAN_GetWordData the last step before returning the wordData all the RMPn bits are cleared.

    So my question now is following my research and finding out the diffrences in the kernels, how could I transform the serial_flash_programmer to a can_flash_programmer? Because it seems like the flash_programmer itself only reads from the kernel file and writes from the application file. But this should be the same for every file and it does not specifically only read SCI files (I could be wrong by overseeing something please let me know than.). Looking forward hearing your opinion on my research and a possible solution.

    Thanks,
    Guilliam

  • Guilliam, 

    The serial flash programmer parses a hex file created with the SCI8 format and sends it to the target device. The hex utility creates the CAN and SCI hex files in the same way, check table 12-1 of https://www.ti.com/lit/ug/spru513w/spru513w.pdf.  In order to change the serial flash programmer into a CAN flash programmer, you would need to send the hex file in a manner that is compatible with the ECAN module function calls made in the flash kernel. The host programmer would likely need to format and send CAN frames that can be read in by the F2806x device. You could try modifying f05_DownloadImage.cpp used for the serial flash programmer for F2806x. You are correct in noting that the CAN flash kernel does need checksums or bytes verified back to the host. The flash kernel itself is a modification of the CAN bootloader in ROM, so this is likely where that comes from. 

    Codeskin has flash programming tools that can help facilitate firmware updates via CAN, and part of their CAN utility is open source, that may also be a resource worth checking out: https://www.codeskin.com/opensource 

    Thanks, 

    Anu

  • Hello Anu,

    Thanks you very much for all the information. I'm going to try what you have suggested and I will look into your advised documents. 

    Thanks,
    Guilliam

  • Hi Guilliam, 

    Sure, let me know if you have questions. 

    Thanks,

    Anu