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.

TMS320F28035: Programming thoughts for new project

Part Number: TMS320F28035

I am trying to wrap my head around how to approach the following design need (NOOB):
Product has 2 boards; 1 with SMARC processor and the other with an F28035.
The only signals shared between the 2 boards are CAN_H and CAN_L (plus a couple discretes)
SMARC board will be loaded with software image (also containing .hex file for F28035) in production and then both boards get assembled into final product.
For every power cycle, the SMARC needs to send .hex file to F28035 over the CAN bus. This is because the .hex file needs to be field loadable and this can only happen if the SW image for the SMARC contains a new .hex file.
    The hex file load should be loaded via CAN, then the load is exited and the F28038 starts running.
    The hex file will need to be loaded from SMARC via command line with some "hex_load.exe <filename.hex> 1000000 bps ..." command.
    The .hex file is created using the hex2000.exe tool.
    If the .hex file is loaded on every power cycle, maybe I should load .hex into RAM, exit load and run from RAM?
Questions are - Is this possible? Concerns? Special examples? GPIO? etc...

Documentation for programming FLASH is abundant and overwhelming without any proper examples to follow up with.

  • Jeffrey,

        This a very open-ended question and it is hard for us to tell you what to do. You know your application needs best. Where we could help is provide suggestions on how to implement a specific boot procedure. The more specific your question, the better.

    So you want to load the application code in 28035 RAM via CAN every time you power up the device?

  • I believe loading RAM on every boot is a better option as the 28035 may need to be updated in the field and if we take the approach of loading the 28035 on every boot, then it would eliminate the need to 'check' if a new hex file is available. (Feel free to comment on this approach.)

    So a couple initial questions are - how to setup the 28035 that on power up it is ready to receive code over the CAN bus and is there a known command line program (TI approved?) that works with CAN bus (from the SMARC card running Yocto Linux) that can deliver the code?

  • 28035 has 10K x 16 of RAM and 64K x 16 of flash. If your application will fit in 10K RAM, you can indeed bootload your code to RAM (via CAN) upon every power-up. In this case, your boot-mode option should be CAN (GetMode + appropriate OTP value). 

    If your application wouldn’t fit in RAM, then you have to burn it in on-chip flash. In this case, your boot-mode option should be Flash (Default OTP option for GetMode). However, in your application, you need to check if a newer application code is available. If so, you need to switch to CAN boot option, download the flash API and program the flash with new application code.

    how to setup the 28035 that on power up it is ready to receive code over the CAN bus

    You need to use the CAN-boot option, as explained above.

  • If so, you need to switch to CAN boot option

    For clarity, let me see if this is what you are getting at.

    We have a unit (with 2 boards) in the field. A field service person updates the SMARC card with a new image. Let's say a power cycle is required and done. The SMARC determines the hex file was updated so therefore the 28035 needs to be updated. The SMARC card can send commands to the up and running 28035 to get it into CAN application load mode, RAM or FLASH, load the new hex file and restart the 28035 with the updated hex file. Is this correct?

    Also, do you know of a command line application for CAN that can transmit the new hex file over the CAN bus?

  • No, I was pointing you to boot-mode options upon powerup. Please read chapter 2 of SPRUI10. It explains the boot process clearly.

    do you know of a command line application for CAN that can transmit the new hex file over the CAN bus?

    Sorry I don't understand what you mean by "command line application". The only way to take in code via CAN (i) upon power-up is to sue the CAN boot option (ii) during running of the application: This needs to be handled by your application.

  • Thanks for the help - My last question is what is the best programming example you may know about that shows you to use CAN bus to upload the application to the 28025 FLASH or RAM?

  • Jeff,

              Unfortunately, we don’t have a document that shows how to do this over CAN, but we do have a doc that shows how to do this over the serial port: https://www.ti.com/lit/sprabv4. The underlying principles are the same.