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.

LAUNCHXL-F2800137: 280013x_generic_flash_lnk.cmd Freezes at SysCtl_delay(23U);

Part Number: LAUNCHXL-F2800137


Tool/software:

Hello TI,

I am trying epwm_ex8_deadband and can't seem to get the 280013x_generic_flash_lnk.cmd working. Adding the linker command file to the project results in the code freezing at,

//
// Delay of at least 120 OSCCLK cycles required post PLL bypass
//
SysCtl_delay(23U);

Does anyone have any advice on how to fix this?

Thanks,

Allan

  • Hello TI,

    I was able to fix this problem by adding CMD in the SysCfg tool. 

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "F280013x" --part "F280013x_64PM" --package "64PM" --context "system" --product "C2000WARE@5.05.00.00"
     * @v2CliArgs --device "TMS320F2800137" --package "64PM" --context "system" --product "C2000WARE@5.05.00.00"
     * @versions {"tool":"1.24.0+4110"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const epwm  = scripting.addModule("/driverlib/epwm.js", {}, false);
    const epwm1 = epwm.addInstance();
    const epwm2 = epwm.addInstance();
    const epwm3 = epwm.addInstance();
    const epwm4 = epwm.addInstance();
    const epwm5 = epwm.addInstance();
    const epwm6 = epwm.addInstance();
    const CMD   = scripting.addModule("/utilities/cmd_tool/cmd_syscfg/source/CMD");
    const CMD1  = CMD.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    epwm1.$name                                                      = "myEPWM1";
    epwm1.epwmTimebase_period                                        = 2000;
    epwm1.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm1.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm1.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm1.epwmCounterCompare_cmpA                                    = 500;
    epwm1.epwmCounterCompare_cmpB                                    = 1500;
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm1.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm1.epwm.$assign                                               = "EPWM1";
    epwm1.epwm.epwm_aPin.$assign                                     = "GPIO0";
    epwm1.epwm.epwm_bPin.$assign                                     = "GPIO1";
    
    epwm2.epwmDeadband_enableRED                                     = true;
    epwm2.epwmDeadband_enableFED                                     = true;
    epwm2.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm2.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm2.epwmTimebase_period                                        = 2000;
    epwm2.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm2.epwmCounterCompare_cmpA                                    = 500;
    epwm2.epwmCounterCompare_cmpB                                    = 1500;
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm2.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm2.$name                                                      = "myEPWM2";
    epwm2.copyUse                                                    = true;
    epwm2.copyFrom                                                   = "myEPWM1";
    epwm2.epwmDeadband_delayRED                                      = 400;
    epwm2.epwmDeadband_delayFED                                      = 200;
    epwm2.epwm.$assign                                               = "EPWM2";
    epwm2.epwm.epwm_aPin.$assign                                     = "GPIO2";
    epwm2.epwm.epwm_bPin.$assign                                     = "GPIO3";
    
    epwm3.epwmDeadband_polarityRED                                   = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm3.epwmDeadband_polarityFED                                   = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm3.epwmDeadband_enableRED                                     = true;
    epwm3.epwmDeadband_enableFED                                     = true;
    epwm3.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm3.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm3.epwmTimebase_period                                        = 2000;
    epwm3.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm3.epwmCounterCompare_cmpA                                    = 500;
    epwm3.epwmCounterCompare_cmpB                                    = 1500;
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm3.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm3.$name                                                      = "myEPWM3";
    epwm3.copyUse                                                    = true;
    epwm3.copyFrom                                                   = "myEPWM1";
    epwm3.epwmDeadband_delayRED                                      = 400;
    epwm3.epwmDeadband_delayFED                                      = 200;
    epwm3.epwm.$assign                                               = "EPWM3";
    epwm3.epwm.epwm_aPin.$assign                                     = "GPIO4";
    epwm3.epwm.epwm_bPin.$assign                                     = "GPIO5";
    
    epwm4.epwmDeadband_polarityFED                                   = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm4.epwmDeadband_enableRED                                     = true;
    epwm4.epwmDeadband_enableFED                                     = true;
    epwm4.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm4.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm4.epwmTimebase_period                                        = 2000;
    epwm4.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm4.epwmCounterCompare_cmpA                                    = 500;
    epwm4.epwmCounterCompare_cmpB                                    = 1500;
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm4.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm4.$name                                                      = "myEPWM4";
    epwm4.copyUse                                                    = true;
    epwm4.copyFrom                                                   = "myEPWM1";
    epwm4.epwmDeadband_delayRED                                      = 400;
    epwm4.epwmDeadband_delayFED                                      = 200;
    epwm4.epwm.$assign                                               = "EPWM4";
    epwm4.epwm.epwm_aPin.$assign                                     = "GPIO22";
    epwm4.epwm.epwm_bPin.$assign                                     = "GPIO7";
    
    epwm5.epwmDeadband_polarityRED                                   = "EPWM_DB_POLARITY_ACTIVE_LOW";
    epwm5.epwmDeadband_enableRED                                     = true;
    epwm5.epwmDeadband_enableFED                                     = true;
    epwm5.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm5.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm5.epwmTimebase_period                                        = 2000;
    epwm5.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm5.epwmCounterCompare_cmpA                                    = 500;
    epwm5.epwmCounterCompare_cmpB                                    = 1500;
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm5.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm5.$name                                                      = "myEPWM5";
    epwm5.copyUse                                                    = true;
    epwm5.copyFrom                                                   = "myEPWM1";
    epwm5.epwmDeadband_delayRED                                      = 400;
    epwm5.epwmDeadband_delayFED                                      = 200;
    epwm5.epwm.$assign                                               = "EPWM5";
    epwm5.epwm.epwm_aPin.$assign                                     = "GPIO8";
    epwm5.epwm.epwm_bPin.$assign                                     = "GPIO9";
    
    epwm6.epwmTimebase_clockDiv                                      = "EPWM_CLOCK_DIVIDER_4";
    epwm6.epwmTimebase_hsClockDiv                                    = "EPWM_HSCLOCK_DIVIDER_4";
    epwm6.epwmTimebase_period                                        = 2000;
    epwm6.epwmTimebase_counterMode                                   = "EPWM_COUNTER_MODE_UP_DOWN";
    epwm6.epwmCounterCompare_cmpA                                    = 500;
    epwm6.epwmCounterCompare_cmpB                                    = 1500;
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_UP_CMPA   = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_A_ON_TIMEBASE_DOWN_CMPA = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_ZERO      = "EPWM_AQ_OUTPUT_LOW";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_UP_CMPB   = "EPWM_AQ_OUTPUT_HIGH";
    epwm6.epwmActionQualifier_EPWM_AQ_OUTPUT_B_ON_TIMEBASE_DOWN_CMPB = "EPWM_AQ_OUTPUT_LOW";
    epwm6.$name                                                      = "myEPWM6";
    epwm6.copyUse                                                    = true;
    epwm6.copyFrom                                                   = "myEPWM1";
    epwm6.epwmDeadband_outputSwapOutA                                = true;
    epwm6.epwmDeadband_outputSwapOutB                                = true;
    epwm6.epwm.$assign                                               = "EPWM6";
    epwm6.epwm.epwm_aPin.$assign                                     = "GPIO10";
    epwm6.epwm.epwm_bPin.$assign                                     = "GPIO11";
    
    CMD.activateCMD = true;
    CMD.activeCMD   = "CMD_FLASH";
    
    CMD1.$name                               = "CMD_FLASH";
    CMD1.sectionMemory_ramfunc               = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_ramfunc          = true;
    CMD1.sectionRun_ramfunc                  = ["RAMLS0"];
    CMD1.sectionRunFromDifferentAddr_ramfunc = true;
    CMD1.sectionMemory_text                  = ["FLASH_BANK0_SEC_16_23","FLASH_BANK0_SEC_24_31","FLASH_BANK0_SEC_8_15"];
    CMD1.sectionAlignEnable_text             = true;
    CMD1.sectionMemory_binit                 = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_binit            = true;
    CMD1.sectionMemory_cinit                 = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_cinit            = true;
    CMD1.sectionMemory_switch                = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_switch           = true;
    CMD1.sectionMemory_stack                 = ["RAMM1"];
    CMD1.sectionMemory_bss                   = ["RAMLS0"];
    CMD1.sectionMemory_init_array            = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_init_array       = true;
    CMD1.sectionMemory_const                 = ["FLASH_BANK0_SEC_32_29"];
    CMD1.sectionAlignEnable_const            = true;
    CMD1.sectionMemory_data                  = ["RAMLS0"];
    CMD1.sectionMemory_sysmem                = ["RAMLS0"];
    CMD1.sectionMemory_ovly                  = ["FLASH_BANK0_SEC_0_7"];
    CMD1.sectionAlignEnable_ovly             = true;
    CMD1.sectionMemory_codestart             = "0x080000";