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.

TMS320F28335: help on reflashing boot via serial

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

Tool/software:

Hi everybody 

I have a proprietary  boot  to load  program in an external flash ( later to be loaded and execute in RAM ) 

now I woudl  like to update the boot  via  UART In the field : do you have an example w doc  on how to do this ? 

my boot executes in RAM .

any suggestion ?

thank you 

BR

Carlo

  • Hi Carlo,

    There's documentation for serial flash programming with examples within c2000ware you can reference. For F8xxx devices, here's a flash programming guide that may be of use. What do you mean by updating UART in field? Are you thinking of using the UniFlash tool or other third party software? 

    The flash kernel example can be found in your c2000ware root at: device_support\f2833x\examples\f28335_flash_kernel

    The serial flash programming examples can be found at: utilities\flash_programmers\serial_flash_programmer

    Best,

    Matt

  • Hi Matt

    I can use my bootloader to run any app from RAM, I can for example load and run the f28335_flash_kernel (after adjust the com port pins) but after there will be a PC application to communicate with the kernel? Because I have seen that serial_flash_programmer.exe before to send the code to be flashed load the kernel into RAM again.

    Regards Luca 

  • Sorry Matt

    I forgot to state the I will use only the UART because is not possible to connect the emulator

    Regards

  • Hi Luca,

    but after there will be a PC application to communicate with the kernel?

    Can you expand on this question? Are you asking for a serial_flash_programmer that only sends the application and doesn't send the kernel? If so, serial_flash_programmer_appln.exe does so.

    Kind regards,

    Skyler

  • Hi Skyler

    Yes I'm just looking for a PC application that is able to communicate with flash_kernel but that send only the data to be programmed in the micro internal flash. the serial_flash_programmer_appln.exe has the same command line parameters? where can I find the command line specification?

    Best Regards

  • Hi Luca,

    Yes, the serial_flash_programmer_appln.exe uses the same parameters as serial_flash_programmer.exe but the -k file is not sent. You can see a full list of commands by adding the -h option, or you can refer to section 6.2 of the serial flash programming document that Matt referred to above,

    Kind regards,

    Skyler

  • Hi Skyler

    I try but the programming procedure seems to fail...

    Best Regards

  • Hi Luca,

    What version of C2000Ware do you have?

    Kind regards,

    Skyler

  • Hi Skyler

    I have c2000ware 5.00.00, today I work from home but tomorrow I can share the kernel project I'm going to load.

    Regards

    Luca

  • Hi Luca,

    Okay, please verify that the GPIOs configured for SCI by your kernel project are correct.

    Kind regards,

    Skyler

  • Hi Skyler

    Sorry but yesterday it was not possible to access E2E site, I don't think is pin problem since the PC app showes Autobaud successful, I have noted that the kernel software doesn't call the InifFlash procedure provided in SysCtrl, may be it is useful?

    Best Regards

    Luca

  • Luca,

    Skyler is currently out of office and will return on Monday.

    Thanks,

    Alex

  • Hi Luca,

    Can you pause the execution of the kernel after the host gets stuck (as shown above) and see where the kernel is stuck at that point? If you can figure out where the kernel is stuck (may be waiting for data or there is some other issue), that will help us narrow down the root cause.

    Kind regards,

    Skyler

  • f28335_flash_kernel.zip

    Hi Skyler

    I have attached the kernel project and the screenshot where it stuks.

    Best Regards

  • Hi Luca,

    Where in the process is this happening? Receiving data occurs throughout the entire process of the kernel, but is it receiving application data? Receiving reserved words? Please look at the Debug window and see which functions have been called during this process.

    Kind regards,

    Skyler

  • Hi Skyler

    The kernel just stucks when receiving  the first two byte 0xAA 0x08, but I have noted that if I call the SCIA_GetWordData instead SCIA_GetOnlyWordData I can go a little bit ahead but after it stucks reveiving unused word, if I chenge the called procedure also for getting unused word it stucks getting long word...

    So wich is the right function with or without eco??

    Regards Luca 

  • Hi Luca,

    Can you verify that the host is sending the expected values (0x08AA)? I recommend doing this with an oscilloscope and verifying that the UART RX registers show these values on the device.

    Kind regards,

    Skyler

  • Hi Skyler

    I suppose you haven't read my previous post, I try to explain better: In the file SCI_Boot.c there are two funcitions to read a word from the host.

    when downloading the application the first action of the kernel is to check for  key value and for this use the SCI_GetOnlyWordData()

    but in this case the kernel stucks after receiving 0xAA, I think because the host is waiting for the eco from it. If I use instead the SCI_GetWordData() the process go ahead but stucks receiving the unused word.

    Regards

    Luca

  • Hi Luca,

    Yes, you should use SCI_GetWordData() so it echoes the data back to the host. What do you mean by this:

    the process go ahead but stucks receiving the unused word.

    What do you mean by unused word?

    Kind regards,

    Skyler

  • Hi Skyler

    I mean the eight word from 2 to 9 following the Key Value, see table below

    this word are readed by this kernel function:

    Also in this case source code is wrong because I can perform this step only using again SCI_GetWordData(); The same applies to get the entry point and I can solve this in the same way. After getting the enrty point the kernel erases the flash and after send back to the host the checksum but the value is wrong. Do you know how the host calculate this checksum? use all the values transmitted till now or something else?

    And when the host send a block of data is waiting for echoes for each byte or only for the block checksum?

    Best Regards

  • Hi Luca,

    So I've spent some time digging deeper into this issue, and I have to correct a few mistakes.

    Sending only the application through the host programmer is not supported on this device. Despite using serial_flash_programmer_appln.exe, the host will still send the kernel followed by the application. If you want to modify this behavior, you can open up the Visual Studio project and modify the f05_DownloadImage() function. You can simply comment out the portion of the function that sends the kernel (line 115-150).

    Do you still see the same behavior if you load the kernel to RAM first and then load the applicaiton?

    Kind regards,

    Skyler