MSPM0C1106: Where to configure the IWDT?

Part Number: MSPM0C1106
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi Expert

Could you please help to guide me how to configure the IWDT in sysconfig? I look into the SDK IWDT demo code, I cannot find where to configure this spec, but can see the configuration is generated in ti_msp_dl_config.c file. Another question is in C1106 demo there is no GPIO interrupt handler, I find in G3507 demo, the handler is GROUP1_IQRHandler, will that work on C1106?

Thanks

Joe

  • Hi Joe,

    The configuration for the IWDT is in the SysConfig file: iwdt_periodic_reset.syscfg. The ti_msp_dl_config files you see are auto-generated from the SysConfig file when you build the project.

    As for the demo, the interrupt handlers are defined for each device per each peripheral. You can see what interrupt handlers are defined in the ti_msp_dl_config.h file. You will see definitions such as UART_INST_IRQHandler, BLINK_LED_TIMER_INST_IRQHandler, ADC12_0_INST_IRQHandler, etc, which all depend on the instance name defined in SysConfig.

    Best,

    Owen

  • Hi Owen

    For IWDT, I didn’t find the specific section to configure the IWDT. Could you please help to point out which sysconfig section is for IWDT configuration?

    For GPIO interrupt, if you add a GPIO interrupt with sysconfig, you will not see any interrupt handler definition in the generated .h file. 

    thanks

    Joe

  • Hi Joe,

    Sorry for the confusion. It seems like there is a bug in SysConfig that is "hiding" the IWDT peripheral from the GUI. I have submitted a ticket for this to be fixed as soon as possible.

    This is what the GUI should look like:

    A workaround to this would be to use the DriverLib functions at the beginning of the program or manually manipulate the registers to achieve the desired configuration.

    Below is the initialization code in the ti_msp_dl_config.c file for reference:

    SYSCONFIG_WEAK void SYSCFG_DL_IWDT_init(void)
    {
        /*
        *   Initialize IWDT with following settings:
        *   Watchdog Source Clock = (LFOSC Freq) / (IWDT Clock Divider)
        *                         = 32768Hz / 4 = 8.19 kHz
        *   Watchdog Period       = (IWDT Clock Divider) ∗ (IWDT Period Count) / 32768Hz
        *                         = 4 * 2^12 / 32768Hz = 500.00 ms
        */
        DL_IWDT_setClockDivider(IWDT_INST, DL_IWDT_CLOCK_DIVIDE_4);
        DL_IWDT_setTimerPeriod(IWDT_INST, DL_IWDT_TIMER_PERIOD_12_BITS);
    
        DL_IWDT_enableModule(IWDT_INST);
    }

    See the TRM references below for register level manipulation:

    As for the GPIO interrupt, the reason why an interrupt handler definition doesn't get generated for GPIO is because they are part of groups and not directly connected to the NVIC table:

    You can define handlers by group (such as GROUP0_IRQHandler) or by port (such as GPIOA_IRQHandler).

    Best,

    Owen

  • Hi Owen

    Could you please kindly check when the sysconfig will be updated to fix this issue?

    Thanks

    Joe

  • Hi Joe,

    I checked and it should be updated in the next release of the SDK.

    Best,

    Owen