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.

Compiler/TMS320F28334: Using C2000 Serial Flash Programming into TMS320F28334 controller using USB to UART cable,code is not loading into controller

Part Number: TMS320F28334
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

Hi,
I have connected USB to UART cable from PC to TMS320F28334 controller and by referring Serial Flash Programming of C2000 application note,we are trying to flash the program into the controller...I tried but it was showing error..that screen shot Iam sharing, please go through that...am using latest C2000Ware_1_00_05_00 
It seems it was not erasing anything inside the controller and not flashing code into the controller,,actually we are using TMS320F28334 controller and PQCR.i00 is our file
below is the command am using for flashing into controller,if am giving anything wrong in this below command ,please correct me
C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x -k f28334_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v
Note:It has to detect the controller and kernel then and it should erase the previous data and replace the new code into the controller 
Iam waiting for your kind reply
Thanks & Regards
Gangadhara rao
  • Hi Gangadhara,

    The SCI connection may not be functioning properly. Please confirm that you are able to perform the autobaud lock correctly.

    You can do this without the serial flash programmer, by just opening the appropriate COM port and sending 'A' or 'a' and the same character should be echoed back.

    Once you are sure this is working, the serial flash programmer should be able to function fine.

    Hope this helps,
    sal
  • Hi Sal,

    Kindly please tell how to set auto baud lock, i don't know how to set.

    Iam waiting for your kind reply

    Thanks & Regards
    Gangadhara rao
  • Sending an 'A' or 'a' to the SCI boot loader of the SCI kernel which is expecting an 'a' or 'A' will cause the autobaud lock to work. This should be detailed in the serial flash programmer application report and certainly the Technical Reference Manual for the device.

    Regards,
    sal
  • Yes, loopback test is working fine. But serialflash programmer is unable to flash.

  • Please try the echoback example ass well. Make sure that the SCI pins you are using for communication are connected to the PC. Make sure that your board is configured properly.

    This thread may help: e2e.ti.com/.../728638

    Regards,
    sal
  • Hi Sal,

    Thank you very much replying,I have tested loop back test and i tested by using following command in command prompt.

    "C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x -k f28335_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v"

    i got auto baud successful but application auto baud successful not coming,please confirm me my code is flashed into controller or not,because ,in one of my previous blog you told that at the end "appilication auto baud successful" will come am i doing anything wrong in the arguments  in command prompt.

    Iam sharing the screenshot ,Please find the screenshot for reference

    Thanks &Regards

    Gangadhararao G

  • Hi,

    The command line arguments look good to me.

    Can you confirm that the kernel is using the same SCI pins as the bootloader? Make sure the SCI pins used for communication with the kernel are the same as the SCI pins you are using on the board.

    Regards,
    sal
  • Hi Sal,

    Yes Sal,am using the same SCI pins,and my controller was f28334 ,iam using f28335_flash_kernel.txt,because i don't have f28334_flash_kernel.txt.
    and device was "f2803x" once again please see the below command line anything i need to change.or else please share f28334 flash kernel file

    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x -k f28335_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v

    Iam waiting for your kind reply

    Thanks & Regards
    Gangadhararao G
  • Hi,

    I recommend trying to run the kernel from CCS while sending the application from the serial flash programmer using the Visual Studio project.

    I wonder if the kernel is hanging because the kernel is trying to erase flash sectors which are not on the f28334 device. Please make sure that the kernel is only erasing sectors which exist on the device. The f28334 may not have as many flash sectors as the f28335.

    Regards,
    sal
  • Hi,

    I'm not using CCS,am using with command prompt,i dont have f28334 kernel file ,so that i'm using f28335 kernel file,can you please send the f28334 kernel file

    Iam waiting for your kind reply,


    Thanks & Regards
    Gangadhararao G
  • Please modify the kernel as I described above if it is needed and test it. The kernel is provided in source as a starting place for customers to modify for their own use.

    sal
  •  Hi,

    I have edited f28335 into f28334 and run the command prompt,still it was showing same,and  If we use C2PROG, we can download successful. Which proves our hardware is OK?

    Iam sharing the screen shot please find the attachment

    Thanks & Regards

    Gangadhararao

  • Hi,

    Are you saying you modified the erase function properly in the kernel?

    My suggestion is to use CCS to help debug this issue. It appears the kernels autobaud is not working as expected. There may need to be a delay between finishing to download the kernel and sending the autobaud lock character to the kernel.

    Regards,
    sal
  • As per your previous mail,iam not getting any description for modifying kernel,can you please describe how to modify the kernel

    Thanks & Regards
    Gangadhararao G
  • Hi Sal,

    As per your previous mail,iam not getting any description for modifying kernel,can you please describe how to modify the kernel

    Thanks & Regards
    Gangadhararao G

  • Hi Sal,

    Iam not erasing anything manually,iam sending the command line in command prompt ,below is the command line,i don't have any f28334 kernel ,so just i edited f28335 flash kernel name and put it in arguments,please send the f28334 kernel,please have a look at below command line am i doing anything wrong in this command prompt ,please correct me,our controller was TMS320F28334

    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x  -k f28335_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v

    After running the above command in command prompt,it was coming upto "done waiting for kernel boot ...attempting autobaud" after that it was hanging and expecting at the end   "Application AutoBaud Successful  not coming",please see the below message coming after running command

    C2000 Serial Firmware Upgrader
    Copyright (c) 2013 Texas Instruments Incorporated. All rights reserved.

    getting comm state
    building comm DCB
    adjusting port settings

    calling f05_DownloadImage
    Downloading PQCR.i00 to device...

    Kernel AutoBaud Successful
    Kernel Loaded
    Done Waiting for kernel boot...attempting autobaud^C
    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x -k f28334_flash_kernel.txt -a PQCR.i00 -p COM15 -b 9600 -v

     

    I'm waiting for your kind reply,please reply soon

    I'm stuck up here,i already crossed my dead line ,past months am trying,kindly please help me to sort out this issue,i'm sending screenshots please find the attachment

    Because by using c2prog it was flashing into my controller

    Thanks & Regards

    Gangadhararao G

  • Hi,

    The command line seems fine. Can you try to debug using CCS?

    Please load the kernel in CCS and send it the flash application using the Visual Studio project to begin debugging your issue.

    I can try to look at this on the controlCard on Monday.

    Regards,
    sal
  • Hi Sal,

    Can you Please tell how to load the kernel in CCS and send it the flash application using the Visual Studio project to begin debugging my issue,and also please share f28335_flash_kernel.txt file.

    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x  -k f28335_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v

    After running the above command in command prompt,it was coming upto "done waiting for kernel boot ...attempting autobaud" after that it was hanging and expecting at the end   "Application AutoBaud Successful  not coming",please see the below message coming after running command

    C2000 Serial Firmware Upgrader
    Copyright (c) 2013 Texas Instruments Incorporated. All rights reserved.

    getting comm state
    building comm DCB
    adjusting port settings

    calling f05_DownloadImage
    Downloading PQCR.i00 to device...

    Kernel AutoBaud Successful
    Kernel Loaded
    Done Waiting for kernel boot...attempting autobaud

    Iam waiting for your kind reply

    Thanks & Regards

    Gangadhararao G

  • Hi Sal,

    iam sending the command line in command prompt ,below is the command line,i don't have any f28334 kernel ,so just i edited f28335 flash kernel name and put it in arguments,please send the f28334 kernel,please have a look at below command line am i doing anything wrong in this command prompt ,please correct me,our controller was TMS320F28334

    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer>serial_flash_programmer.exe -d f2803x  -k f28334_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v

    After running the above command in command prompt,it was coming upto "done waiting for kernel boot ...attempting autobaud" after that it was hanging and expecting at the end   "Application AutoBaud Successful  not coming",please see the below message coming after running command

    C2000 Serial Firmware Upgrader
    Copyright (c) 2013 Texas Instruments Incorporated. All rights reserved.

    getting comm state
    building comm DCB
    adjusting port settings

    calling f05_DownloadImage
    Downloading PQCR.i00 to device...

    Kernel AutoBaud Successful
    Kernel Loaded
    Done Waiting for kernel boot...attempting autobaud

     Yesterday we tried at customer location,it was not flashed into controller,again we came back..now we are realising we have done a big mistake by selecting this controller for our production,this is really a bad experience for us,we are stuck up here,we already crossed our timeline ,past months am asking.still it was not clear and for after sending message for getting reply it was taking days in TI community

    I'm waiting for your kind reply,please reply soon

    kindly please help me to sort out this issue,i'm sending screenshots please find the attachment

    Because by using c2prog it was flashing into my controller

    Thanks & Regards

    Gangadhararao G

  • Hi Gangadhararao,

    Can you add a delay in the serial flash programmer after loading the kernel and before sending the autobaud lock to the kernel to begin sending the flash application?

    It looks like the issue is that the kernel is not achieving autobaud lock.

    Also, can you load the kernel CCS project directly to the board using CCS debug, and run the kernel. Then modify the serial flash programmer to only send the flash application and not the kernel. This way you can debug sending the flash application to the kernel piece, since the ROM bootloader seems to be working fine.

    Hope this helps,
    sal
  • Hi Sal,

    How to add delay in the serial flash programmer,since we are using serial flash programmer.exe file ,we dont have source file for serial flash programmer.exe,can you please provide source file


    And can you please tell the procedure how to load the kernel ccs project to board using ccs debug,and run the kernel

    Thanks & Regards
    Gangadhararao
  • The Visual Studio project and srouce files are available in C2000Ware.

    Please review the code. There are delay functions in the code. It is a C++ program. Use the Sleep() funcciton like the code demonstrates.

    Just click the Debug button in CCS to load the image through the debugger. You must have loaded code to the device before using the emualtor and CCS.

    Please attempt to resolve this issue.

    sal
  • Hi Sal,

    Please provide f28334 flash kernel file,it is problem with flash kernel file

    Thanks & Regards
    Gangadhararao
  • Hi Sal,

    Please provide f28334 flash kernel file,then my problem will solve,it is problem with flash kernel file,

    Thanks & Regards
    Gangadhararao
  • Hi Sal,

    Please provide f28334 flash kernel file,it will solve our problem,i don't know why you are not giving f28334 flash kernel file,i asked so many times

    Please kindly send f28334 flash kernel file


    Thanks & Regards
    Gangadhararao
  • Hi Sal,

    Please provide f28334 flash kernel file,it will solve our problem,i don't know why you are not giving f28334 flash kernel file,i asked so many times

    Please kindly send f28334 flash kernel file


    Thanks & Regards
    Gangadhararao
  • Hi Sal,

    Please provide f28334 flash kernel file,it will solve our problem,atleast tell me where can i get f28334 flash kernel file,i asked so many times

    Please kindly send f28334 flash kernel file


    Thanks & Regards
    Gangadhararao
  • Hi Sal,

    Please provide f28334 flash kernel file,since hours am waiting for your reply.

    Please kindly send f28334 flash kernel file


    Thanks & Regards
    Gangadhararao
  • Gangadhararao,

    First, there is no need to continue to post the same question multiple times in short succession.

    Second, are you unable to find the C2000ware release or the location in the C2000ware package? Sal has provided a link to the package in his prior post. Please check the device_support directory.

    Regards,
    Bobby
  • Hi Bobby,

    i have installed the updated c2000Ware version i.e..(C2000Ware_1_00_05_00).there i didn't find for my device kernel file(my device was f28334 ).iam requesting please provide f28334 flash kernel file,so that my problem will solve.

    Iam waiting for your kind reply

    Thanks & Regards
    Gangadhararao
  • We provide the kernel for the super-set of the device family.

    Please implement the suggestion I made before. Add a Sleep() before sending the flash application. And begin debugging by loading the kernel to the device via CCS and run it. Then send the flash application with the serial flash programmer.

    Thank you for trying these suggestions.

    sal
  • Hi Sal,

    As you told before i didn't find visual projects inC2000Ware ..that too upto now we have created custom GUI and by using command prompt we are flashing code into ontroller..

    I'm sure there is a prooblem with flash kernel because an using f28335 flash kernel instead of f28334

    I have checked with c2prog my code is flashing into controller. .hardware also checked its working ,for reference previously i have shared screen shot to you

    Please provide f28334 flash kernel. our project was in critical position. .we are under production

    Thanks &Regards

    Gangadhararao G

  • Hi Sal,

    From previous blog you are saying that you can't share f28334 flash kernel file,Atleaset please provide f28234 flash kernel ,because in c2prog, i can able to program with f28234 flash kernel file into my f28334 controller and it was working 

    I'm waiting for your kind reply

    Thanks & Regards

    Gangadhararao G

  • G,

    Please go into the kernels properties in CCS and change the entry point to _InitBoot. See below:

    sal

  •  Hi Sal,

    From previous blog you are saying that you can't share f28334 flash kernel file without that how can i flash my code into controller,my client is going to escalate the project, to sort out this issue ,at least please provide f28234 flash kernel or any below flask kernels which is suitable to our controller , because in c2prog, i can able to program with f28234 flash kernel file into my f28334 controller and it was working.

    Because here we are using .out application file which was provided by customer, i can't modify that file, by using C2000Ware command prompt only "sci"  am flashing into controller,iam sharing screen shot please find the attachment

    I'm waiting for your kind reply

    Thanks & Regards

    Gangadhararao G

  • Sir,

    The F28335 kernel works for F28334. It works for your device. There are very few changes between these devices, which should not affect the kernel itself. Please understand this.

    Did you try making the change I suggested?

    Also, why can't you just use C2Prog?

    sal
  • After attempting to flash the device using the serial flash programmer, can you confirm that the flash sectors are being erased?

    sal
  • I believe there is an issue with the flash erase operation in the kernel. Can you confirm the kernel you have is able to erase the flash.

    sal
  • Hi,

    1) Please find the serial flash programmer Visual Studio project here:
    C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer\serial_flash_programmer.sln

    2) Please use the attached file: f05_DownloadImage.cpp and replace it with the one in C2000Ware for this VS project.
    DOwnload the file and place it here: C:\ti\c2000\C2000Ware_1_00_05_00\utilities\flash_programmers\serial_flash_programmer\serial_flash_programmer\source

    3) Add the below InitFlash(); function to main.c of the SCI kernel.

    //
    // GPIO and SCI are still setup from Sci_Boot()
    // Setup sysctl and pll
    //
    DisableDog();
    InitPll(DSP28_PLLCR,DSP28_DIVSEL);

    InitFlash();

    Please rebuild the VS project and the SCI flash kernel and let me know if this solves the problem.

    Also please set me know if the kernel is able to successfully erase the flash.

    Currently, I am blocked from working on this further because my installation of Visual Studio has been corrupted. I am working to resolve this so I can continue some testing.

    Regards,
    sal