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.

programming the TMS320F28069 - flash programming and bootloader

Other Parts Discussed in Thread: TMS320F28069, CONTROLSUITE, MOTORWARE

I used the Insstaspin motor control labs to play with my custom board with a TMS320F28069. I can do what I want through JTAG but now my goal is to 

1) program it through some source and make sure the program stays and the board functions on power up ( I am using the Blackhawk USB100v2 JTAG Emulator)

2) Be able to program the board through UART, ( for cases when JTAG is not available). I guess its called a Bootloader. 

I could not find any options on Code Composer Studio for this. Can someone please point me to right applications notes and resources for the same?

thanks

  • Hi Subrat,

    Please have a look at Serial Flash Programmer utility available in cotrolSUITE (controlSUITE\device_support\~Utilities\serial_flash_programmer).

    Regards,

    Vivek Singh

     

  • I was using Motorware for Instaspin labs. I anyways downloaded Control Suite from Ti website and I see the files inside

    C:\ti\controlSUITE\device_support\~Utilities\serial_flash_programmer

    Now, what? where is the documentation on how to use it? And when i try to run the .exe a page opens and goes away. May be you assumed I was using ControlSuite. Do, I have to be using Control Suite?
  • Hello subrat nayak,

    I have just opened a similar thread to yours, just I'm already a little bit further in my development, so I guess I can give you a couple of advices.

    1) For this you need to program your code into flash. For this you need to do a couple of steps. A detailed explanation is given in SPRA958L. But going thoroughly through this document could be painful. So my quick guide how to program your code to flash is (that worked last time for me, although it might be completely wrong way of doing it!):

    1. Add linker .cmd file F28069.cmd from ti\controlSUITE\device_support\f2806x\v141\F2806x_common\cmd
    2. Exclude from the project previous .cmd file F2806x_generic_ram.cmd (or whatever you used)
    3. Add 3 extern Uint16 variables: RamfuncsLoadStart, RamfuncsLoadSize, RamfuncsRunStart to your main C file.
    4. Add string  "_FLASH" to Project->properties->C2000 Compiler->Predifined Symbols.
    5. Add  InitFlash() function after InitPieVectTable().

    This worked when I used examples from controSUITE. If you created a completely new project this probably won't work so easily, and  you will need to go carefully though the document I mentioned above.

    2) This is a little bit trickier and takes more time to implement. First you need to go through the SPRUFN6A document. And take special care on sections 2.11 "Bootloader Data Stream Structure" and 2.16 "SCI_Boot Function". To program your code via SCI to flash you need to go even further and take a look on this SPRABV4A document (this on is nice, it's short and easy to read). Then you will need to use serial flash programmer software. How to use it is explained in that document. But be aware that you cannot simply open .exe file. You either need to run it through a command line (cmd), or open it through Visual Studio. In either way you need to pass some arguments when opening the file.


    Hope it helps!

  • Hi Andrei,

    I am stuck with F28069F_ram_lnk.cmd that came with instaspin. They strongly advised me not to use any other .cmd file because it has all the addresses for the instaspin code in the ROM.

    Also, FYI I am not using Control Suite, I am using Instaspin. So, I dont have InitPieVectTable() in my code.

    Yet, I will take a look at the pdf that you suggested.

    thanks
  • I have no experience with instaspin, sorry. Hopefully, someone more advanced can help with it.
    I can only suggest you to carefully examine both linker .cmd files and to read the article about internal flash programming. Maybe there are also some instructions in pdfs related to instaspin about it. Wish you good luck.