Other Parts Discussed in Thread: MSPM0G3507
Hi, M0 Team.
I'm testing timer example (timx_timer_mode_periodic_standby_LP_MSPM0G3507_nortos_ticlang)
This example seems like to enter STANDBY mode.
What should I do to change from STANDBY mode to RUN mode?
I want to wake up from STANDBYmode whenever a timer interrupt occurs.
I make a counter variable. But gMainloopCounter does not increment.
#include "ti_msp_dl_config.h" int16_t gInteruptCounter = 0; int16_t gMainloopCounter = 0; int main(void) { SYSCFG_DL_init(); NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN); DL_SYSCTL_enableSleepOnExit(); DL_TimerG_startCounter(TIMER_0_INST); while (1) { __WFI(); gMainloopCounter++; } } void TIMER_0_INST_IRQHandler(void) { switch (DL_TimerG_getPendingInterrupt(TIMER_0_INST)) { case DL_TIMER_IIDX_LOAD: gInteruptCounter++; DL_GPIO_togglePins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN); break; default: break;
In the case of msp430, functions like __bic_SR_register_on_exit(LPM3_bits) is used within the ISR.
Should M0 also use function?