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.

[FAQ] LAUNCHXL-F28P65X: F28P65x: Unable to Flash using CPU2 on CCS Theia

Part Number: LAUNCHXL-F28P65X
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG, UNIFLASH

Tool/software:

Hello,
I am unable to flash my program to CPU2 in F28P65x using CCS Theia 20.2. I am trying to run the example from C2000Ware_6_00_00_00\driverlib\f28p65x\examples\c28x_dual\empty_projects where in I have two CCS projects - one that needs to be flashed to CPU1 and one that needs to be flashed to CPU2. I want to use Flash Bank 0, Bank 1 and Bnak 2 in order to flash from CPU1 and Flash Bank 3 and Flash Bank 4 to flash from CPU2. I am able to succesfully build both the projects. When I try the "Flash Project" option in CCS Theia to flash CPU1, it works. However, when I do the same for CPU2 I get the following error. Please help. 

  • Hello, here's how you can flash CPU2 in CCS Theia.

    CCS Theia Method

    1. Build project and start projct-less debug session

    • Firstly, build both the examples empty_c28x_dual_sysconfig_cpu1 and empty_c28x_dual_sysconfig_cpu2 using the "FLASH" build configuration. This will create the .out file that you want to flash to the respective CPUs. Next, follow the below steps:-
    • Locate the empty_c28x_dual_sysconfig_cpu1 CCS project in the Explorer menu. Right click on the Target Config file (.ccxml file) and choose "Start Project-Less Debug".

               

    • Once you do this, it will launch a debug session. You should be able to see all the available cores under the "THREADS" section on the left side in the debug session window. You should be able to see "C28xx_CPU1", "C28x_CPU2" and "CPU1_CLA1"  here.

                 

    2. Connect both the CPUs

    • Now, right click on the "C28x_CPU1" thread and click on "Connect Target" - it should now say "HALTED" next to it. Do this for "C28xx_CPU2" as well.

                 

    3. Open Flash Settings for CPU1

    • Now, right click on the "C28x_CPU1" thread and select "Properties". In the category bar, choose "Flash Settings".

                

                

    4. Set Flash Bank Map Settings for CPU1

    • In the Flash Settings, scroll down to Flash Bank Map Settings and change the option from 0 to 1 ONLY for Bank 3 and Bank 4, since we want to assign these to CPU2.

                

    5. Set Flash Erase Settings for CPU1

    • Then scroll to Erase settings and make sure it is set to "Selected Banks Only" and then make sure ONLY Bank 0, Bank 1 and Bank 2 are selected.

                

                

    6. Configure the Clock for CPU1

    • Next, scroll up to the "Configure Clock" button and select it once - this will configure the clock for both the CPUs. 

                

    7. Open Flash Settings for CPU2

    • Now, click on the dropdown in the "Core" field and choose C28xx_CPU2 and go to Flash Settings. 

    8. Set Flash Settings for CPU2

    • Scroll down to the Erase settings and make sure it is set to "Selected Banks Only" and then make sure ONLY Bank 3, Bank 4 are selected. The Flash Bank Map Settings should already be set to what we had set it CPU1. Once you do this, hit Save and Close.

                 

    9. Run CPU1 thread

    • Now, click on the C28x_CPU1 thread and hit continue to get it running. If you don't do this the device might go into reset.

                 

    10. Flash the program on CPU1

    • Now, click on the C28xx_CPU1 thread and go to Run -> Load -> Load Program and navigate to the .out file for the CPU1 CCS project from your workspace and hit OK. You have now flashed the Banks 0, 1 ,2 (assigned to CPU1) with this .out file.

                 

                 

    11. Flash the program on CPU2

    • Similarly, do the exact same thing for CPU2 and choose the .out file for CPU2 CCS project. You have now flashed the Banks 3 and 4 (assigned to CPU2) with this .out file.

     

                

                

    NOTE : If you see that while loading the program, CCS throws an error that says "Error erasing BANKx" when x is a bank that was not supposed to be assigned to this CPU, please recheck the Flash Erase Settings for both the CPUs and make sure that they are allowed to Erase only the Banks that are assigned to them.

    If you do not want to manually load your program, you can use TI's UniFlash tool to flash CPU2 as well. Here's how to do that.

    UniFlash Method

    1. Start a new sesson and open "Settings and Utilities"

    •  Start a new session with Uniflash, and under "Settings and Utilities" choose C28x_CPU1. Once you do this, configure the same settings as we did above  in UniFlash in he following way.

    2. Set Flash Bank Map Settings

    • Set the Flash Bank Map Settings by changing the setting for Bank 3 and Bank 4 to 1 and hit configure clock.

             

    3. Set the Erase settings

              

    4. Similarly, for C28xx_CPU2 do the following settings.

    • Set the Flash Bank Map Settings and hit configure clock.

                

    • Set the Erase settings

                

    5. Flash both the CPUs with your .out file

    • Now go to "Program" and upload your .out file for both the CPUs and click on "Load Image" and you should be able to succefsully Flash the device.

     

                

    Thank You!