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.

TMS320F2808: TMS320F2808: Firmware update through RS-232 Port with bootloader

Part Number: TMS320F2808
Other Parts Discussed in Thread: C2000WARE

I have main application running on Flash Sectors C and D.Now  I want to run bootloader in Flash sector A and also store the binary image received through RS232 PORT in remaining section of A and FULL sector B.When the image CRC check is validated  I will erase the Flash secotor C and D.And will write latest binary stored in sectors A and B.

How to implent this kind of custom bootloader.Kindly,help me on this ASAP

  • Srinivas,

    First of all, I believe you've already created a related e2e ticket. Please do not create multiple e2e tickets related to the same issue. I will go ahead and mark the other one as Resolved and we can continue on this one.

    Let me know if this is ok with you.

    Thanks,

    Sira

  • Kindly mark the other one as resolved and we can continue with this ticket only

  • Srinivas,

    I think your textual description and the figure don't tally. Anyway, I think I understand what you're trying to do.

    As I mentioned to you on the other thread, what you will need first is to develop an SCI Flash kernel for the F2808x device. The app note sprabv4 describes these and tells you which devices we have existing examples for.

    These typically run out of RAM. You will need to create a Flash build configuration, since you don't want to use the BootROM SCI bootloader. Most of our examples run out of RAM, only the F28004x example has a Flash build configuration - because we illustrate how to implement Live Firmware Update (LFU).

    I don't know whether you will be able to fit both the F2808x custom bootloader as well as your New application image in Sectors A and B. Assuming that is possible, the next important concern is that you have just one Flash bank, where your Custom bootloader, the existing application, as well as the new application are all resident.

    Since you cannot Read from and Write to Flash at the same time, what you will need to do is run some of the critical pieces of code from RAM (e.g. Flash APIs). This also depends on how you want to design the rest of your solution. Do you want to design it so you always have 2 valid application images in Flash? How exactly will the Firmware update take place - will the host send a command, the application recognizes the command, passes control to the custom bootloader, which then runs the critical pieces of code from RAM and programs the new application in the same Flash bank. Then after a device reset, control passes to the custom bootloader, which determine which application to boot (presumably based on a firmware version which can be written to specific Flash locations).

    Thanks,

    Sira

  • idHi Sira,

          Thanks for the reply,Actually the requirement has changed,As you mention above  the host sends a command, the application recognizes the command, passes control to the custom bootloader, which then receives the data from the host validates the data,erase the flash and write the data to the flash. Then after a device reset, control passes to the custom bootloader, which determine which application to boot (presumably based on a firmware version which can be written to specific Flash locations).

         In this requirement custom bootloader will be stored in Flash banks A&B and the application in Flash banks C&D.And we are not storing any application in banks A&B.We will receive data through RS232 and write to Flash banks C&D.

        Based on this requirement,kindly guide me on any example code or any appnote available for this controller or family TMS320F2808.

    Thanks,

    Srinivas

  • Hi Srinivas,

    Why can't you use the SCI ROM bootloader and just download the custom bootloader (Flash kernel) to RAM, which will then receive and program the application to Flash? Why do you need the custom bootloader to be resident in Flash? Is it because you always want to boot only in Flash boot mode?

    Even in this case, since you are going to Erase/Program sectors C and D, using the custom bootloader in Sectors A and B, you will need to run the necessary functions out of RAM.

    We have an example for how this can be done on a single Flash bank device - the F28002x. This custom bootloader example is not released in C2000Ware yet. It is available as a MSS (MySecureSoftware). You will have to request this software. I can't post the request link on a public forum here, so kindly send me a private message on e2e (you will likely need to add me a Friend to be able to do that).

    The above example will show you how you can setup the custom bootloader in Flash and use it to program an application in the same Flash bank, by running key functions from RAM.

    However, as I mentioned before, the F2808x custom bootloader will need to be created by you. A good starting point for it would be the F2802x or 03x or 33x custom bootloader examples, which are available in C2000Ware. Refer to the sprabv4 app note.

    Thanks,

    Sira

  • Hi SriRoa80,

          Thanks for sharing the F28002x sample code through MySecureSoftware. I walked through the code and I realised I need flash API library and header files to implement flash operations(ERASE,PROGRAM,VERIFY).Now I want to understand can I write my own ERASE,PROGRAM and VERIFY functions or else could you share these definitions of these flash functions for my analysis?

     Is this flash API mandatory to be included in my project or there is any other way to implement these flash operations?

    Thanks,

    SRINIVAS

     

  • Srinivas,

    If you use the Flash API library and associated header files, that's all you will need. This should already be done in the project. Why do you want to implement your own functions?

    I can check on your questions with an expert. Please give me a couple of days to get back to you.

    Thanks,

    Sira

  • Hi SriRao80,

         As per the customer requirement we should not use lib file for flash operations.We have to either write our own functions or get source of the lib file from TI.As I know the risk involved in writing custom functions.I request you to share the source of the lib file.

    Thanks,

    Srinivas

  • Srinivas, I have asked my colleague to help address your question. He should reply by Monday or so. Thank you for your patience.

    Sira

  • And, sorry for the delayed reply, I was Out of office for a few days in the week.

  • Hi Srinivas,

    F28002x and F2808 use two different flash APIs.  They are very different since the underlying flash wrappers, flash technology, safety features (ECC), program widths, program/erase times are different.  

    Regarding the flash API source code for this device: Please take a look at https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/780927/faq-f05-flash-does-ti-distribute-the-api-source-code 

    Let us know if your application falls in to the described category.  If yes, we can discuss on providing the flash API source code under NDA.  However, as mentioned, flash API should be used as provided by TI - This is to ensure the reliability and quality of the flash data.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

          We need this source code for avionics project.Kindly,let me the procedure to get this source code under NDA.

    Thanks,

    Srinivas

  • Srinivas,

    I need your email address so we can proceed - you can send it to me through a private e2e message.

    Thanks,

    Sira