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.

TMS320F28069: Flashable Bootloader

Part Number: TMS320F28069
Other Parts Discussed in Thread: C2000WARE, UNIFLASH

Hi,

 

We are working on new project, where requirement  is CAN based Flashable boot loader. It means that program/upgrade the bootloader without using external programmer(XDS100) and also wanted to upgrade the bootloader at site. My Border level thought is by using external PC utility and with the help of primary bootloader(CAN ROM BOOT LOADER) can we make the flashable bootloader?

 

If anyone worked on flashable bootloader please provides the idea how to implement this feature in TMS320F28069 Micro?

Please provide any document or source code.

   

Best Regards,

Pandurang Khutal

  • Hi Prandurang,

    We are currently developing a CAN flash kernel for this purpose. It should be released in the June C2000Ware release update.

    For now, you can see this Application Report: www.ti.com/lit/sprabv4

    We have an SCI flash kernel and serial flash programmer which is used to update the flash via SCI.

    You can also use our existing SCI solution and port it to CAN. This will give you a good starting point.

    Regards,
    sal

  • Hi Sal,

    Is this SCI flash kernel is loaded and executed from RAM or FLASH? We are looking for CAN flash kernel which will loaded and run from FLASH. Is this possible using CAN BOOT? Please confirm.

    Best Regards,

    Pandurang Khutal

  • Any code which updates the flash, must be executed from RAM. However, you can load or store the kernel which has the flash API in flash, and then copy and executing from RAM in order to update the flash.

    Regards,
    sal
  • Hi,
    We are wating for CAN flash kernel. Can you please update on the development status of CAN flash kernel?. Is it possi ble to send me the pre build release of CAN flash kernel?

    Thanks,
    Pandurang Khutal
  • This will be released in the June C2000Ware release.

    Regards,

    sal

  • Hi,

    How to put TMS320F28069 to CAN Boot ROM mode using GPIO or any other method? How to program the OTP Key and BMode at first time at factor.

    Best regards,

    Pandurang Khutal

  • The CAN bootloader cannot beexecuted on a fresh part that has not been programmed. The default boot modes are Parallel, SCI, Wait, and GET MODE. GET MODE by default is flash boot mode, but an OTP configuration register can be programmed to change it to CAN bootloader.

    Hope this helps.

    sal
  • Hi,
    This means when the part is fresh/new we need to use the JTAG with flash based code to program the OTP configuration only one time through out the part life cycle. Is this assumption correct? How to configure the OTP? Do you have any sample code?

    Thanks,
    Pandurang
  • Yes, that is correct.

    1) You can use the On Chip Flash Programmer available in CCS.

    2) You can download an application which programs the OTP location with the flash API.

    3) You can use use soemthing like the file F2806x_CSMPasswords.asm to store the OTP locations data value, and then link that section to the proper OTP location. Then when you download/debug that .out onto the chip, the CCS flash plugin will program it for you.

    Hope this helps!
    sal
  • Hi,

    For production we are not going to use the CCS. we may use uniflash utility with JTAG. What is On chip flash programmer? It does not required JTAG to program the code? Can you please send some more details or document.

    Can you share the example for OTP code configuration? I checked the F2806x_CSMPasswords.asm but it is in assembly and difficult to modify.

    Thanks,
    Pandurang
  • On Chip flash programmer is a tool in CCS. Once you connect to the device you can see it. It requires JTAG connection.

    If you want to use the assembly, you can create a section for the OTP boot configuration, and just add a memory section to the linker command file to the proper memory address. This will link the data to the OTP memory location for programmation in the .out

    sal

  • Hi,

    We are writing  the program for OTP configuration. But one query is After putting the controller in CAN BOOT ROM by programming the OTP locations for OTP Key and BMODE then How will it come  back to BOOT from flash after power cycle/reset. OTP is one time programmable so we can not configure this location again to BOOT from flash.

    Can you Please tell how to exit from CAN BOOT ROM  to BOOT to Flash?

    Thanks,

    Pandurang Khutal

  • Once you program CAN boot into the GET MODE, you will not be able to boot to flash.

    If you still need to boot to flash, then I suggest flashing a program which will then call back into the ROM CAN bootloader.

    Regards,
    sal
  • Hi
    In this case how I can run the may application code from flash after power cycle/reset? I am taking the reference of SCI BOOT ROM. If we want to enter into SCI BOOT ROM then GPIO 34 set to HIGH and GPIO 37 set to LOW and then SCI flash kernel is loaded using SCI BOOT ROM and then application is loaded using SCI flash kernel. After this we will change the switch to GPIO 34 set to HIGH and GPIO 37 to HIGH and do the power cycle then code will start executing from flash.

    How above steps can we do for CAN BOOT ROM once the application is loaded and need to RUN the code from flash how it will be done?

    Can you please suggest the steps? After power off the CAN BASE RAM loader will not be there then how code will execute from flash?

    Thanks,
    Pandurang Khutal
  • You can set the device to always boot to flash. In your flash application, you can observe check an input to see if you need to call the CAN bootloader/CAN flash kernel. If a firmware update is signaled then call the CAN bootloader or CAN flash kernel. If it is not signaled then continue with your application.

    Hope this helps.

    sal
  • Hi,

    That's correct. What happened when part is fresh and don't have the flash program? For first time we need to program the application into flash using CAN BOOT ROM (BY setting the OTP key and BMODE) right? Then my question is how to run my normal application from flash. Once I flashed the application no need to go control into CAN BOOT ROM it has to jump to flash application directly? How it can be done?

    Thanks,

    Pandurang Khutal

  • On a fresh part you cannot use CAN. You will have to use one of the default boot modes on a fresh part.
  • Hi,
    On fresh part I will do following steps. Please confirm
    1. By default if part is fresh after power cycle it will come to BOOT to flash
    2. I will write the program to configure OTP key and BMode to CAN BOOT ROM and flash it us ing JTAG debugger
    3. After this I will powercycle / reset the controller.
    4. Now fresh controller will be in CAN BOOT ROM mode and waiting for to receive the DATA on CAN.
    5. BY using custom PC utility RAM based flashable CAN kernel will be loaded into RAM area
    6. Now flashable CAN kernel will run and load the application into specified flash area(like sector B-H). If application not uses sector A.
    7. After this I will powercycle / reset the controller.

    Now my query is after powercycle where the control goes, it will run the application or it will stay in CAN BOOT ROM as we programed the OTP Key and BMode as flash? If it stay in CAN BOOT ROM then how to come out from this mode for fresh controller?


    Thanks
    Pandurang Khutal
  • After power cycling it will boo to the CAN boot loader. It will not automatically branch to the flash application.

    However, if the CAN bootloader receives an invalid bootloader format heading, then it will automatically branch to flash. You would need to send the CAN some invalid data for it to do this.
  • Hi,

    Every powercycle we need to send the some CAN invalid data frame or only one time it is required to send? Once it come out from CAN BOOT ROM to FLASH then it will not required. Please confirm this.

    Thanks,
    Pandurang Khutal
  • Every time the device resets, you will need to do this.

    Once it comes out of CAN and branches to flash it will be running your application as normal until the device resets.
  • Hi,

    Once it braches to flash and code is running from flash as normal. What will happened if user do powercycle / reset? Where it will jump? it jump to CAN BOOT ROM or FLASH ?

    Please do you have any document/code of CAN BOOT ROM booting process and exiting  from BOOT ROM and going into flash as normal code run? Please share the same.

    Thanks,

    Pandurang Khutal

  • It will branch to CAN BOOT on a reset.

    Please see the boot ROM section of the TRM. 

    Regards,

    sal

  • Hi,

    If this is the case then every power on we need to provide invalid command to go to flash. This is not feasible.

    Can you tell us how to make the flashable CAN bootloader like SCI bootloader? Can you Please provide the detail steps?


    Thanks,
    Pandurang Khutal
  • I mentioned the solution above.

    We will be releasing a CAN flash kernel at the end of June in C2000Ware. You can take this kernel and program it into your flash. When your application receives a DFU command, you can then copy the kernel into RAM and then begin to execute the kernel to receive and program a new flash application.

    sal
  • Hi,

    We are still struggling to make CAN flashable bootloader workable and Waiting for TI CAN flashable bootloader with flashing utility.

    Can you please provide us the pre-released CAN flashable bootloader for testing? I think it is planed for June C2000Ware release. Can you please confirm when it will be available for release?

    Best Regards,
    Pandurang Khutal
  • Hi,

    We cannot provide it early. It will be available in the June release. This should be June 27.

    sal
  • Hi,

    We are waiting for June 27 release package of CAN flashable bootloader. Is it going to be available on 27June (Wednesday) ? Can you please provide us the path from where we can download this package?

    Our project dead line is already crossed and we need it urgently. Please do the needful.

    Best regards,

    Pandurang Khutal

  • Hi,

    We have checked the can flashable bootloader on this link www.ti.com/.../c2000ware. It shows that the new software has been updated on 27th june as shown in screen shot below. But we are not able to download it since when we click on get software it links to older version as

    C2000WARE_1.00.04.00

    Release Date: 28 Mar 2018.

    We are not able to download the latest 27th june release software. Is the CAN based flash kernel released in this 27th june release?

    Please let me know the link from where can I get the can flashable bootloader, utility and document?

    Best Regards,

    Pandurang

  • C2000Ware_v1_00_05_00 is now available.

    www.ti.com/.../C2000WARE

    Regards,
    sal
  • Hi,
    Just now I logged in to account and checked the update on this link www.ti.com/.../C2000WARE, here it shows version as C2000Ware_v1_00_05_00 but when we click on the "Get software" it shows as(C2000WARE_1.00.04.00) below. We believe this is the older version. we checked this and C2000WARE_1.00.04.00, does not have CAN flash kernel and docs.
    C2000Ware for C2000 Microcontrollers
    C2000WARE_1.00.04.00
    Release Date: 28 Mar 2018


    Can you please help me on this. Is the system taking time to show the updated version on link? we need this urgently.

    Regards,
    Pandurang
  • That is the older version. I was just informed that it should be updated today and released today. It should be up by the end of today.

    Regards,
    sal
  • Hi Sal,

    We have found the CAN based flash kernel on 27th june release. Can you please provide us with the document just like you have for SCI flash kernel on www.ti.com/lit/sprabv4.

    Regards,

    Chandrakant Pal

  • We do not have a CAN flash programmer application report. The fundamentals are exactly the same as the serial flash programmer, except that CAN is used and not SCI.

    You can still refer to that Application Report for help, and observe the source code.

    Hope this helps.
    sal
  • Hi Sal,

    Thanks Sal for your great support..

    We have downloaded the latest version and found the source code for the CAN flash kernel.

    But we have not found any documentation and utility which used for flashing kernel and  application. 

    Can you please provide the path from where we will get those details? We need this urgently.

    Currently we are unable to flash the kernel and also application.

    Regards,

    Pandurang

  • We do not have a user guide for this since it is so similar. You can use the -h option on the command line to see what the command line options are.

    If you have specific questions on the CAN flash programmer, please post another thread with this as the title so we can more easily get the right engineer to support you.

    Thanks,
    sal
  • Hi,

    I will crate the new thread.

    But one qucik question is How to enter into CAN BOOT and Exit from CAN BOOT? Can you please share the steps. We don't want to use JTAG and still wanted to programmed the fresh controller board. How to do this?

    Best Regards,

    Pandurang 

  • You should be able to load the symbols of the boot ROM and make a function call to the CAN boot loader. The CAN boot loader function will branch to the entry point of the RAM application that is loaded and begin to execute that.

    Regards,
    sal
  • Hi,

    My question is how to enter into CAN BOOT when there in no program (means controller is fresh)? For SCI by using the GPIO pins (34 LOW and 37 HIGH) pins at power up it will enter into SCI BOOT like that how it happen in CAN BOOT.

    Can you please provide code for how to load the symbol of the boot ROM.

    For CAN flashable bootloader we are going through the SCI bootloader doc and found that for serial flash programmer utility we need to provide the COM port details, but for CAN interface we are using PCAN adapter and interface to PC is USB not the CAN. Can you please tell us how to use the serial flash programmer utility for CAN bootloader? or is there any other utility used for testing the CAN BOOT loader. Please provide the details.

    Best Regards,

    Pandurang

  • Hi Sal,

    I try to develop CAN bootloader using SCI_flash_kernel example and can_external_treansmit example. But I need more sources.
    Can I use can_flash_kernel which your released for f28379d ?  
    Can you give me some advices ?

    Regards.

  • We have not released a CAN kernel for F2837x. You can port the F2806x version to F2837x or you can wait until we release it in C2000Ware. Hopefully it will be released in the next release. That may be 1-3 months from now.

    Hope this helps.
    sal
  • Thanks for your replying Sal,

    I have to complete my project until 7/28/2018. So, I can't wait you. Please clarify what you mean by "You can port the F2806x version to F2837x ".
    How can I do that ? Are there many differences between two MCU for CAN kernel ? My main purpose is developing secondary bootloader for CAN. So I refer sci_flash_kernel. But, I need more sources.

    Regards.
  • Adem,

    The CAN modules are different. However, there are only a couple functions which would need to be changed to port the F2806x CAN kernel to F2837x. These would be the initialization function and the GetWord function. The F2837x driverlib functions would make this even easier.

    I suggest you look at the F2806x kernel and the F2837x CAN examples to port this solution to F2837x. It should not be a large effort.

    Regards,
    sal
  • Hi Sal,

    I want to know that my understanding is true or not.
    Is sci_flash_kernel example a SCI custom bootloader code ?

    And I have another question ;

    Should I open a new project in CCS to develop custom CAN bootloader for f28379d or can I develop it on your can_flash_kernel code ? 

    I am so new about this topic. And I don't know that how I can start. What should I do ? What are my steps to develop custom CAN bootloader for f28379d using can_flash_kernel code ? 

    Thanks for your helping. 

    Best Regards.



  • Hi,

    The SCI flash kernel is a source code example which is essentially a modified SCI bootloader found in boot ROM with the flash API. It loads code from SCI into RAM and then programs it into flash.

    You can open a new project or start from the existing one. If it were me, I would either start from the CAN flash kernel from f2806x and port it to f2837x, or I would start with the SCI flash kernel for f2837x and then port it to CAN using the f2806x CAN flash kernel as the reference and template.

    Either way is fine.

    Hope this helps!
    sal
  • Hi Sal,

    Thank you so much! Your replying is so helpful.

    I will change registers to port CAN flash kernel from f2806x to f2837x, right ? Main logic will be same , right ?

    Registers are very different between f2806x and f2837x. And can_flash_kernel code was developed using eCAN.
    I can't find all registers on f2837x which performing same things on f2806x. Could you give some advices about this ?


    Thanks for your all helping,
    Best Regards ! Have a nice day !
  • Hi,

    That is a good idea to port from F2806x to F2837x. This will make sure that the CAN flash programmer works with your new kernel.

    You can see the CAN examples in C2000Ware to get started with the F2837x CAN flash kernel port/development. Also, please see the DCAN_Boot.c in C:\ti\c2000\C2000Ware_1_00_04_00\libraries\boot_rom\f2837xd\revB\rom_sources\F2837x_bootROM\cpu01-bootROM\source. This will also help you get started on your porting.

    Please verify some of my replies to close the thread. Feel free to create another thread for some other specific questions you have.

    Regards,
    sal
  • Hi Sal,

    Thank you so much for your advices and helping.
    There is no option to verify your answers. There are just Reply and More buttons. This thread is Pandurang's thread.
    Thanks so much again !

    Best Regards.
  • Hi Sal,

    I started the write the CAN flash kernel code for F2837x. But, I have a question. What is the difference between DCAN boot and CAN boot ?
    Can I use the DCAN_boot.c example like CAN_boot ? Still, I can't port can_flash_kernel from f2806x to f28379d. I refer sci_flash_kernel, can_flash_kernel and DCAN_Boot examples. But they are very different each other. For example ; 

    In DCAN_Boot Example GetWordData Function like below:

    Uint16 DCAN_GetWordData()
    {
    //Wait for a new CAN message to be received in mailbox 1
    while (DcanaRegs.CAN_NDAT_21 != 0x1) {;}

    //Transfer the message from IF1
    DcanaRegs.CAN_IF1CMD.all = 0x00070001;
    while (DcanaRegs.CAN_IF1CMD.all & 0x8000) {;}
    return (Uint16)DcanaRegs.CAN_IF1DATA.all;

    }

    Hovewer in CAN_Boot GetwordData Function on F2806x like below: 

    Uint16 CAN_GetWordData()
    {
    Uint16 wordData;
    Uint16 byteData;

    wordData = 0x0000;
    byteData = 0x0000;

    // Fetch the LSB
    while(ECanaRegs.CANRMP.all == 0) { }
    wordData = (Uint16) ECanaMboxes.MBOX1.MDL.byte.BYTE0; // LS byte

    // Fetch the MSB
    byteData = (Uint16)ECanaMboxes.MBOX1.MDL.byte.BYTE1; // MS byte

    // form the wordData from the MSB:LSB
    wordData |= (byteData << 8);

    /* Clear all RMPn bits */
    ECanaRegs.CANRMP.all = 0xFFFFFFFF;

    return wordData;
    }

    Also, Init functions are diffent logically. 

    Which one is correct for my purpose ?  

    Regards.