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.

TMS320F28334: BOOT MODE F28334

Part Number: TMS320F28334
Other Parts Discussed in Thread: C2000WARE

Hello I have some questions regarding boot modes in F28334. I want to program my MCU using Boot mode like UART and CAN.

I have understand that I have to make GPIO 84,85,86,87 high or low to take mcu in appropriate boot mode.

From reference manual and other document I get to know that I need to dump flash kernel code to MCU ram, to Flash the application program in mcu flash.

I am first time working on boot modes and I am learning on it my own. I have some basic questions which I need to ask here. 

1) What is Flash kernel and why we need it?

2) What is flash programmer utility?

3) Is it possible to program the MCU with UART or CAN boot mode without using flash kernel?

4) Why we need to put flash kernel in MCU ram why not in flash? 

5) Is it possible to put flash kernel in MCU flash?

6) Is it possible to put application program in RAM with UART or CAN boot mode?

7) Does Serial flash programmer given in C2000 works for F28334?

8) There is no F2833x_fw_upgrade_example given in C2000 flash programmer utility. what changes should made to use it for F28334?

9) There is no CAN flash programmer given in C2000 utility what should I do to flash application program using CAN boot mode?

Waiting for answer to make my doubts clear. I have referred TRM of F2833x and application note serial flash programming of C2000. yet I have this questions.

Thanks in advance.

Regards.

  • Hi Raj,

    Thank you for your questions! Here are some of the responses to them:

    1) A flash kernel is a piece of embedded software that allows you to program applications into a device' s flash memory. The reason it is important is because if you ever wanted to update your device's application without using JTAG  communication method, you could do that with a flash kernel. By transferring the flash kernel to the device via one of these communication methods (SCI, CAN, I2C, etc)  and allowing control to transfer to the kernel from the bootloader, it will then be able to stream and program your application for you. 

    2) A Flash programmer utility, such as our Serial Flash Host Programmer, allows you to download the flash kernel to a target (device) from a host (ex. PC) through one of the communication methods, most common being SCI peripheral. In addition, the flash utility has specific settings to recognize the device you are using so that the data being sent to the target occurs at the correct rate, accepts user commands depending on what you want done (ex. Downloading Firmware update, Execute firmware update on CPU1), as well as downloads your application file to the device. 

    3) Yes, it is possible to program an MCU with either UART or CAN without using the flash kernel, but the user application will reside in RAM. ROM bootloaders for the different communication methods can only write code to RAM. In any other case, you would need to download to the device your application using a host if you want the application to go to flash memory.

    4) We need to put the flash kernel in RAM in order to program the Flash bank. A flash bank cannot be written to and read from at the same time, so a solution is to have the flash kernel reside in RAM so the application can be written in Flash memory. 

    5) It is possible to put the flash kernel in flash memory, but at device startup parts of the kernel have to be loaded to RAM so that it can operate. This is a good method for device resets to check if a new firmware update is coming (as seen in LDFU application note), can save time by keeping flash kernel in flash memory and transferring it to RAM when necessary. 

    6) Yes it's possible to put an application soley in RAM by using UART or CAN. 

    7) Yes

    8) For a firmware upgrade example, you will need to compile two projects, namely the f2833x flash kernel and an application projection (ex. time_led_blink). These can be found in the C2000Ware_4_03_00_00\device_support\f2833x\examples folder.

    9) There exists a CAN flash programmer for the f28003x device. Currently there is not a CAN host programmer for the f2833x devices. For your purposes, you can modify this CAN flash programmer for use with the f2833x device (bit rate, device name).

    I hope this covered your questions, also, here is the link for more on the Serial Flash Host programmer.

    ti.com/lit/an/sprabv4e/sprabv4e.pdf

    If any other questions, feel free to respond to this post and I will answer accordingly.

    Thanks and regards,

    Charles

  • Hi Charles, 

    Very much thank you for clearing my doubts.

    Here I have some questions Which I want to ask:

    1) There is CAN flash programmer exist for F28003x in C2000 utilities. Can you please tell me which parameters or which files need to be changed to use this CAN flash programmer for F2833x?

    2) Can you please let me know the whole process flow to download my application using CAN boot to my device flash? if possible Can you please let me know in detailed manner?

    3) There exist an application note for serial flash programming. Is there any document for CAN flash programming? If yes let me know where can I find it?

    4) What is LDFU application note? How to dump flash kernel in flash? If I put flash kernel in flash what changes should be made to download application program in flash?

    Thanks in advance.

    Regards.

  • Hi Raj,

    Here are some more responses to the questions:

    1) In order to make the changes to the CAN flash programmer, you need to have a build of Visual Studio and open the can_flash_programmer.sln file. The parameter for device name can be changed to g_bf2833x for your own convenience. Within this file, there is a line to change the bitrate for use with a PEAK CAN-FD analyzer. Changes may also have to be made with the download image functionality, as the f2833x is an older device in comparison.

    As an alternative, there may be some 3rd-party approved CAN programmers that you can consider for this device. I will have to look into this and get back to you on it.

    2) This question is a bit long, but I'll try to shorten it. The flow is as follows:

    • Have the device set to CAN boot mode through the boot switch
    • Using the host CAN programmer utility, initialize the CAN analyzer and open up the flash kernel file to write to the CAN bootloader
    • The bootloader, once transferring over the entire kernel file, should delay for a bit, transferring control over to the flash kernel
    • After a short delay from the host, send over the application firmware image
    • After a device reset, branch to the application in flash

    For more details, can prepare a powerpoint (this may take some time currently). I am also able to have setup a conference call and we can discuss it.

    3) The CAN flash programming note is currently under revision and will be released with the next C2000ware release in Q3 2023.

    4) The LDFU application note is shorthand for the Live Device Firmware Update application note. It can be found here: ti.com/lit/ug/spruiu8a/spruiu8a.pdf

        In order to dump the flash kernel in flash, you must have a build configuration that allows you to choose flash memory as the resting location for the kernel. If the flash kernel is put in flash, the changes that should be made for this device are to implement functionality to copy parts of the kernel from flash to RAM in order to later stream in the application and program the flash bank.

    Thanks and regards,

    Charles

  • Hi Charles,

    I am very much thankful to you for helping and answering.

    One question I have about PCAN, In C2000 utilities it has been mentioned that CAN flash programmer is compatible with PEAK PCAN-USB Pro FD.

    but Currently I have PEAK PCAN USB available with me not PEAK PCAN-USB Pro FD.

    1) Does PEAK PCAN USB will be compatible with CAN flash programmer to download flash kernel or application program?

    Changes may also have to be made with the download image functionality, as the f2833x is an older device in comparison.

    2) I am not able to understand what you meant to say here. can you please elaborate?

    As you said about that we can arrange a conference call I am glad by that. I am interested for it but currently I have not my whole setup ready so whenever my whole setup is ready we can arrange a call. I will let you know about that in message whenever I am ready with setup.

    also you told about presentation can you please share it whenever it is ready.

    Again Thank you for your reply.

    Regards.

  • 1) The current CAN flash programmer implementation requires a PEAK PCAN-USB Pro FD device to function. However, the CAN flash programmer uses FD functions from the PCAN-USB API, so can swap out for regular CAN functionality (ex. CAN_InitialzeFD to CAN_Initialize). 

    Here is a link on the documentation for the API: InitializeFD - PCAN-Basic Documentation

    2) The f28003x devices will have different bit-rate values for CAN bootloader versus the f28334 devices, as well as what PEAK API functions will be used. There are variables in the host programmer that contain the bit-rate values.

    Presentation may take a week's time, will coordinate with you on it.

    Thanks,

    Charles

  • Hi Charles,

    Currently on my custom board I have taken GPIO 18-19 and GPIO 12-13 for CAN communication. I have not taken out pin GPIO30-31 for CAN communication in board.

    Today I read in datasheet and reference manual that Pin used by bootloader for CAN is GPIO 30-31.

    So Now my question is can I use GPIO 18-19 for CAN boot mode? Is there any way to do so? or I have to use only GPIO 30-31 for CAN boot? 

    I have tried to flash my code with CAN boot using GPIO 18-19 but my code is not flashed. I have also made changes in flash kernel in CAN_INIT function to change CAN gpio configuration. but my code is not flashed.

    Thanks & Regards,.

  • Hi Raj,

    So for GPIO18/19 and GPIO30/31 that would be CANRXA/TXA and CANRXB/RXA respectively I see.

    From the GPIO chapter in the TRM for f2833x devices:

    CAN on pins 18/19 is possible when GPAMUX2 bits are both set high. And by setting the GpioCtrlRegs.GPAMUX2.all value it is not holding? Is it possible you could step through the code at this point in initialization to see what is happening at the memory location?

    Thanks and regards,

    Charles

  • Hi charles,

    As you suggested in previous answer I have tried configuring GPAMUX2 by setting GPIO 18-19 as CAN in Flash kernel Code.

    But I was not able to dump my code through CAN boot.

    Does it mean that Only GPIO 30-31 can be used as CAN boot as written in Datasheet?

    Also It would be great if we do conference call as I am ready with my setup now. Let me know about your availability for conference call. 

    I have messaged you regarding this in personal. Can you Please check it out.

    Thanks.

  • Hi Raj,

    Consulting with the CAN owners on GPIO30/31 and GPIO18/19 usage.

    Will let you know in the messages about the call.

    Thanks,
    Charles