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.
Tool/software:
Hi,
I am following the Serial Flash Programming of C2000 Microcontrollers App Note in order to get SCI programming working on my LAUNCHXL-F28P65X.
At the moment I am getting stuck at the point that the "serial_flash_programmer" running in Visual Studio reaches the "Attempting autobaud to load kernel..." as shown here:
My SCI UART Select Switch - S2 (0:1) and Boot Select Switch - S3 (0:1) are shown here:
I am trying to follow the troubleshooting question below in the app note.
7 Troubleshooting - 7.4 F28P65x - Question: With the LaunchPad, I cannot download the SCI Flash Kernel to RAM in SCI Boot, what steps should I take to do so?
But the "Answer:" does not make sense in some places. It seems to be referring to the ControlCARD and not the LAUNCHXL-F28P65X when mentioning the FTDI Chip and opening the Memory Window in CCS to change values in memory.
Can someone assist me in getting this working?
My ultimate goal is to use EtherCAT FoE to download the firmware to the C2000 and using the Live Firmware Update Without Device Reset on C2000 to perform a Live Firmware Update.
Thanks,
Rob McCullough
Hi Rob,
The SCI boot option that you're configuring with the default boot mode select table (using GPIO72/84 on S3) sets SCITXDA = GPIO12 and SCIRXDA = GPIO13. However, the XDS110 UART TX/RX are mapped to GPIO42 and GPIO43, as configured by S2.
To employ SCITXDA = GPIO42 and SCIRXDA = GPIO43, you'll need to use boot option 0x61. You can refer to the available SCI boot options for F28P65x devices in the datasheet.
You can test this boot mode by programming the emulation boot registers in RAM using JTAG. After verifying SCI boot functionality, you can access the 0x61 boot mode standalone by programming the OTP, but this is not advised for testing.
If you have any further questions, please let me know! I'm happy to clarify.
Best,
Matt
Hi Matt,
Thanks. That help me get a little further. Now it looks like it is getting stuck loading the kernel file, shown here.
C2000 Serial Firmware Upgrader Copyright (c) 2013 Texas Instruments Incorporated. All rights reserved. getting comm state building comm DCB adjusting port settings calling f021_DownloadKernel CPU1 Kernel Downloading c:\DevOps_SW\Workspace_Flash\flash_kernel_c28x_dual_ex1_c28x1.txt to device... Attempting autobaud to load kernel... Autobaud for kernel successful! Loading kernel file... aa
I am using the command line args: -d f28p65x -k c:\DevOps_SW\Workspace_Flash\flash_kernel_c28x_dual_ex1_c28x1.txt -a c:\DevOps_SW\Workspace_Flash\led_ex1_c28x_dual_blinky_cpu1.txt -b 9600 -p COM8 -v -w
I believe I am using the correct COM port # has shown here from the Windows Device Manager.
Do you have any suggestions?
Thanks,
Rob
Hi Rob,
I can confirm your COM port and command line args look correct.
Have you tried the troubleshooting steps from the Serial Flash Programming Guide (Section 7.4)?
You've already configured boot option 3 (0x61), but there are additional steps for configuring the flash kernel.
Best,
Matt
Hi Matt,
I rechecked everything in items 1-3 here in Serial Flash Programming Guide (Section 7.4) and I believe they are set correctly.
After stepping through the serial_flash_programmer code, it is getting stuck on the "ReadFile(file, &rcvData, 1, &dwRead, NULL);" in function "loadProgram".
Function "ReadFile" is not returning.
Any thoughts?
Thanks,
Rob
Hi Rob,
So it seems the host is sending the first byte (AA) and is not receiving it back from the device. What state is the device boot ROM in?
You can step through the device boot ROM by loading the boot ROM symbols (.out file) to the device. This option adds the symbols available in the generated project '.out' file for debugging purposes instead of loading the actual '.out' program onto the core via CCS - this is also why you can use this method with the boot ROM/built in bootloaders to debug and get visibility.
Best,
Matt
Hi Matt,
I do not see a 'view' > 'target configurations' menu item in the CCS, just a "Connected Targets" item. Is it because I am using a new version of CCS?
Rob
Matt,
I found the "Load Symbols" option and tried it.
But it did not open the source file. I was then able to get the debugger to break in what looks like the Boot ROM, but CCS is not finding the source files. Even if I click on the "Browse.." button below and select the file it can't find, it still will not show it.
Rob
Hi Rob,
Apologies, those steps were made for an earlier version of CCS (v12).
Just to confirm, you're browsing to this path (and only selecting the folder, not any specific files)?
C2000Ware_5_04_00_00\libraries\boot_rom\f28P65x\rev0\rom_sources\cpu1\F28P65x_ROM\bootROM\source
Best,
Matt
Matt,
It only lets me select files, not folders. So, I select C:\ti\c2000\C2000Ware_5_04_00_00\libraries\boot_rom\f28P65x\rev0\rom_sources\cpu1\F28P65x_ROM\bootROM\source\cpubrom_init_boot.asm.
But nothing happens.
Rob
Hi Rob,
That is unusual, I will check with the CCS team on how to load symbols on v20. If possible, I recommend using v12 for now to be able to debug in the boot ROM.
To confirm the steps I outlined above, I was able to successfully pass the autobaud lock and load an application to flash on my F28P65x LaunchPad, by only setting the predefined symbol in the kernel project (_LAUNCHXL_F28P65X) and changing the kernel's sciGetFunction() to take SCI_BOOT_ALT3 as an input (for boot option 0x61).
I just want to check a few things:
Best,
Matt
Hi Matt,
Using CCS v20, I was NOT able to step through the BootROM and see the Loaded Symbols. I have not tried on V12 and probably won't. But it would be good to still know how to get this working for the future.
I retry following the steps again this morning and was able to get the Serial Flash Programming working.
I think my problem was doing a debug "Restart" and not doing a "CPU Reset" after modifying the RAM registers (0xD00, 0xD01, 0xD04).
After understanding the correct sequences of steps, I have been able to program the flash via the SCI several times at different baud rates.
Thanks for all your help,
Rob
Hi Rob,
I'm happy to hear you were able to run it!
Using CCS v20, I was NOT able to step through the BootROM and see the Loaded Symbols. I have not tried on V12 and probably won't. But it would be good to still know how to get this working for the future.
When in a debug session go to the Run menu and select "Edit source search paths..." that will bring up a dialog like this:
You can then click the add button to add the following path:
C2000Ware_Root\libraries\boot_rom\f28P65x\rev0\rom_sources\cpu1\F28P65x_ROM
This will allow you to view/debug the boot ROM and SCI bootloader.
The users guide had some additional information: https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs/ccs_debug-main.html#debugging-library-code
Best,
Matt