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.

MSPM0G3107: SysConfig does not generate edgeDetectMode in TIMG Compare mode

Part Number: MSPM0G3107
Other Parts Discussed in Thread: SYSCONFIG

Hi Champs,

Using MSPM0 SDK v1.0.1.3 and SysConfig 1.16.2, if one configures a timer in Compare mode to count from event trigger, edgeDetectMode for the struct gTIMER_....CompareConfig is not generated. This means that ACOND bits in CCCTRL_01 register are not set, so the timer doesn’t work correctly. This struct member should be set to DL_TIMER_COMPARE_EDGE_DETECTION_MODE_RISING.

If you confirm that this is a bug in SysConfig or the SDK, could you file an inquiry to have this fixed?


Best regards,
François.

  • Here is the SysCfg file:

    /**
     * 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 "MSPM0G350X" --package "VQFN-32(RHB)" --part "Default" --product "mspm0_sdk@1.00.01.03"
     * @versions {"tool":"1.16.2+3028"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const Board    = scripting.addModule("/ti/driverlib/Board");
    const COMPARE  = scripting.addModule("/ti/driverlib/COMPARE", {}, false);
    const COMPARE1 = COMPARE.addInstance();
    const GPIO     = scripting.addModule("/ti/driverlib/GPIO", {}, false);
    const GPIO1    = GPIO.addInstance();
    const GPIO2    = GPIO.addInstance();
    const GPIO3    = GPIO.addInstance();
    const GPIO4    = GPIO.addInstance();
    const SYSCTL   = scripting.addModule("/ti/driverlib/SYSCTL");
    const SYSTICK  = scripting.addModule("/ti/driverlib/SYSTICK");
    const WWDT     = scripting.addModule("/ti/driverlib/WWDT", {}, false);
    const WWDT1    = WWDT.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    const gate7  = system.clockTree["MFCLKGATE"];
    gate7.enable = true;
    
    const oscillator2           = system.clockTree["SYSOSC"];
    oscillator2.enableSYSOSCFCL = true;
    oscillator2.enableROSC      = true;
    
    Board.InitPriority2 = "/ti/driverlib/GPIO";
    
    COMPARE1.$name               = "TIMER_Tm_100us32bit_MSW";
    COMPARE1.timerClkSrc         = "MFCLK";
    COMPARE1.timerPeriod         = 65536;
    COMPARE1.triggerSelect       = "Trigger";
    COMPARE1.subscriberPort      = "FSUB0";
    COMPARE1.subscriberChannel   = 1;
    COMPARE1.retentionRestoreCnt = true;
    COMPARE1.peripheral.$assign  = "TIMG7";
    
    GPIO1.$name                                       = "GPIO_LIN";
    GPIO1.associatedPins.create(2);
    GPIO1.associatedPins[0].$name                     = "EN";
    GPIO1.associatedPins[0].assignedPort              = "PORTA";
    GPIO1.associatedPins[0].assignedPin               = "7";
    GPIO1.associatedPins[1].$name                     = "RX";
    GPIO1.associatedPins[1].direction                 = "INPUT";
    GPIO1.associatedPins[1].assignedPort              = "PORTA";
    GPIO1.associatedPins[1].assignedPin               = "11";
    GPIO1.associatedPins[1].interruptEn               = true;
    GPIO1.associatedPins[1].polarity                  = "FALL";
    GPIO1.associatedPins[1].pin.$assignAllowConflicts = "PA11";
    
    GPIO2.$name                          = "GPIO_Diag";
    GPIO2.associatedPins.create(3);
    GPIO2.associatedPins[0].$name        = "VBATT_MEAS_EN";
    GPIO2.associatedPins[0].assignedPort = "PORTA";
    GPIO2.associatedPins[0].assignedPin  = "3";
    GPIO2.associatedPins[1].$name        = "TestPin0";
    GPIO2.associatedPins[1].assignedPort = "PORTA";
    GPIO2.associatedPins[1].assignedPin  = "5";
    GPIO2.associatedPins[2].$name        = "TestPin1";
    GPIO2.associatedPins[2].assignedPort = "PORTA";
    GPIO2.associatedPins[2].assignedPin  = "6";
    
    GPIO3.$name                          = "GPIO_Radar";
    GPIO3.associatedPins.create(4);
    GPIO3.associatedPins[0].$name        = "TRIG0";
    GPIO3.associatedPins[0].direction    = "INPUT";
    GPIO3.associatedPins[0].assignedPort = "PORTA";
    GPIO3.associatedPins[0].assignedPin  = "17";
    GPIO3.associatedPins[1].$name        = "TRIG1";
    GPIO3.associatedPins[1].direction    = "INPUT";
    GPIO3.associatedPins[1].assignedPort = "PORTA";
    GPIO3.associatedPins[1].assignedPin  = "22";
    GPIO3.associatedPins[1].interruptEn  = true;
    GPIO3.associatedPins[1].polarity     = "RISE";
    GPIO3.associatedPins[2].$name        = "TRIG2";
    GPIO3.associatedPins[2].direction    = "INPUT";
    GPIO3.associatedPins[2].assignedPort = "PORTA";
    GPIO3.associatedPins[2].assignedPin  = "24";
    GPIO3.associatedPins[2].interruptEn  = true;
    GPIO3.associatedPins[2].polarity     = "RISE";
    GPIO3.associatedPins[3].$name        = "TRIG3";
    GPIO3.associatedPins[3].assignedPort = "PORTA";
    GPIO3.associatedPins[3].assignedPin  = "25";
    GPIO3.associatedPins[3].direction    = "INPUT";
    
    GPIO4.$name                                       = "GPIO_Unused";
    GPIO4.associatedPins.create(10);
    GPIO4.associatedPins[0].$name                     = "PA0";
    GPIO4.associatedPins[0].assignedPort              = "PORTA";
    GPIO4.associatedPins[0].assignedPin               = "0";
    GPIO4.associatedPins[1].$name                     = "PA1";
    GPIO4.associatedPins[1].assignedPort              = "PORTA";
    GPIO4.associatedPins[1].assignedPin               = "1";
    GPIO4.associatedPins[2].$name                     = "PA4";
    GPIO4.associatedPins[2].assignedPort              = "PORTA";
    GPIO4.associatedPins[2].assignedPin               = "4";
    GPIO4.associatedPins[3].$name                     = "PA8";
    GPIO4.associatedPins[3].assignedPort              = "PORTA";
    GPIO4.associatedPins[3].assignedPin               = "8";
    GPIO4.associatedPins[3].pin.$assignAllowConflicts = "PA8";
    GPIO4.associatedPins[4].$name                     = "PA9";
    GPIO4.associatedPins[4].assignedPort              = "PORTA";
    GPIO4.associatedPins[4].assignedPin               = "9";
    GPIO4.associatedPins[4].pin.$assignAllowConflicts = "PA9";
    GPIO4.associatedPins[5].$name                     = "PA12";
    GPIO4.associatedPins[5].assignedPort              = "PORTA";
    GPIO4.associatedPins[5].assignedPin               = "12";
    GPIO4.associatedPins[6].$name                     = "PA13";
    GPIO4.associatedPins[6].assignedPort              = "PORTA";
    GPIO4.associatedPins[6].assignedPin               = "13";
    GPIO4.associatedPins[7].$name                     = "PA14";
    GPIO4.associatedPins[7].assignedPort              = "PORTA";
    GPIO4.associatedPins[7].assignedPin               = "14";
    GPIO4.associatedPins[8].$name                     = "PA26";
    GPIO4.associatedPins[8].assignedPort              = "PORTA";
    GPIO4.associatedPins[8].assignedPin               = "26";
    GPIO4.associatedPins[9].$name                     = "PA27";
    GPIO4.associatedPins[9].assignedPort              = "PORTA";
    GPIO4.associatedPins[9].assignedPin               = "27";
    
    SYSCTL.clockTreeEn = true;
    SYSCTL.powerPolicy = "STANDBY1";
    
    SYSTICK.periodEnable    = true;
    SYSTICK.period          = 32000;
    SYSTICK.interruptEnable = true;
    
    WWDT1.$name              = "WWDT0";
    WWDT1.clockDivider       = "8";
    WWDT1.periodCount        = "10";
    WWDT1.peripheral.$assign = "WWDT0";
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    oscillator2.peripheral.$suggestSolution         = "SYSCTL";
    oscillator2.peripheral.roscPin.$suggestSolution = "PA2";
    Board.peripheral.$suggestSolution               = "DEBUGSS";
    Board.peripheral.swclkPin.$suggestSolution      = "PA20";
    Board.peripheral.swdioPin.$suggestSolution      = "PA19";
    GPIO1.associatedPins[0].pin.$suggestSolution    = "PA7";
    GPIO2.associatedPins[0].pin.$suggestSolution    = "PA3";
    GPIO2.associatedPins[1].pin.$suggestSolution    = "PA5";
    GPIO2.associatedPins[2].pin.$suggestSolution    = "PA6";
    GPIO3.associatedPins[0].pin.$suggestSolution    = "PA17";
    GPIO3.associatedPins[1].pin.$suggestSolution    = "PA22";
    GPIO3.associatedPins[2].pin.$suggestSolution    = "PA24";
    GPIO3.associatedPins[3].pin.$suggestSolution    = "PA25";
    GPIO4.associatedPins[0].pin.$suggestSolution    = "PA0";
    GPIO4.associatedPins[1].pin.$suggestSolution    = "PA1";
    GPIO4.associatedPins[2].pin.$suggestSolution    = "PA4";
    GPIO4.associatedPins[5].pin.$suggestSolution    = "PA12";
    GPIO4.associatedPins[6].pin.$suggestSolution    = "PA13";
    GPIO4.associatedPins[7].pin.$suggestSolution    = "PA14";
    GPIO4.associatedPins[8].pin.$suggestSolution    = "PA26";
    GPIO4.associatedPins[9].pin.$suggestSolution    = "PA27";
    

  • Hi Francois,

    Thanks a lot for notifying us about it. You’re right; it is a bug. We’ll fix it in the next SDK release.

    Best Regards,

    Diego Abad

  • Hi Diego,

    Thank you..


    Best regards,
    François.