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.

TMS320F280041C: MotorControl SDK 5_03 flash problem

Part Number: TMS320F280041C

Tool/software:

Greetings! I am not able to flash my uC. I am using XDS100v3 as a programmer. I have a switch and I can change the boot modes. I have 2K2 pulldown resistors on GPOI 32 and 24 and I have 56K pull up resistors which i can activate. In my code I have these 3 directives :

#pragma CODE_SECTION(mainISR, ".TI.ramfunc");

#pragma DATA_SECTION(userParams, "ctrl_data");

volatile MOTOR_Vars_t motorVars = MOTOR_VARS_INIT;
#pragma DATA_SECTION(motorVars, "ctrl_data");

There are not in the main.c file, but I don`t  think this matters. 

I have experience with F28069M and  usually there is a directive in the beginning of the main like this:

  #ifdef FLASH
   // Copy time critical code and Flash setup code to RAM
   // The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
   // symbols are created by the linker. Refer to the linker files.
   memCopy((uint16_t *)&RamfuncsLoadStart,(uint16_t *)&RamfuncsLoadEnd,(uint16_t *)&RamfuncsRunStart);
   #endif

But here there isn`t anything similar.

I tried the different boot modes -> no luck. Any suggestions what I am doing wrong?

There is somekind of a counter in the original lab07 which I am using as a reference, but I can`t find any meaning purpose of the counter...

Thanks!

  • Hello,

    How are you trying to flash the program into the device? Are you using Code Composer Studio?

    I have experience with F28069M and  usually there is a directive in the beginning of the main like this:

    Fullscreen
    1
    2
    3
    4
    5
    6
    #ifdef FLASH
    // Copy time critical code and Flash setup code to RAM
    // The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the linker files.
    memCopy((uint16_t *)&RamfuncsLoadStart,(uint16_t *)&RamfuncsLoadEnd,(uint16_t *)&RamfuncsRunStart);
    #endif
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    But here there isn`t anything similar.

    This code is run in programs that reside in flash so any functions placed in the .TI.ramfunc section are copied to RAM for execution. This won't affect your ability to load a .out file to the flash memory of the device. This is more relevant to run-time behavior on the device.

    Kind regards,

    Skyler

  • I am using code composer studio v 12. I changed the program build status to FLASH, changed the controller boot mode to selected one. Next I loaded the program and run it. But after restart nothing happens. 

  • I think I fix it! I don`t know the problem was. I think I have done something wrong in the beginning. But now I works just fine! 

    Thanks!

  • It's easy to miss, just switching memory type inside the dropdown box does not activate the change from RAM to FLASH. We have to activate the change inside the dropdown dialog selection box or it remains RAM upon exiting properties. You can delete the RAM folder after FLASH folder shows up in the tree to know if it ever switches back to RAM by some odd CCS magic event.