Tool/software:
Hello,
I am using MSPM0G3107 in two modes STANDBY1 and RUN0/SLEEP0. I need to keep the current consumption in the range of micro-amperes for my requirement. So before going into standby mode, I turn off the UART. Wake up from standby mode is done via a specific GPIO interrupt. Now after coming out of Standby mode, I am powering ON the UART and receiving certain amount of data via an interrupt. This operation works perfectly in debug mode. But once i move back to normal operation, the controller comes out of STANDBY0 mode (Checked by the runtime current consumption), but is unable to receive any UART data in Run0 mode inspite of turning back the UART module ON...
The main() function code is as follows:
int main(void) { SYSCFG_DL_init(); NVIC_EnableIRQ(BOLT_INT_IRQN); while (1) { modeTogglePolicy = false; modeTogglePolicy2 = false; DL_UART_disablePower(UART_0_INST); NVIC_DisableIRQ(TIMER_0_INST_INT_IRQN); uartStatus = DL_UART_isEnabled(UART_0_INST); DL_SYSCTL_setPowerPolicySTANDBY1(); while (modeTogglePolicy == false) { __WFE(); } DL_SYSCTL_setPowerPolicyRUN0SLEEP0(); delay_cycles(640000); __WFE(); // Add a small delay DL_UART_enablePower(UART_0_INST); delay_cycles(640000); DL_UART_Main_enable(UART_0_INST); delay_cycles(640000); DL_UART_Main_enableInterrupt(UART_0_INST, DL_UART_MAIN_INTERRUPT_RX); NVIC_EnableIRQ(UART_0_INST_INT_IRQN); delay_cycles(640000); NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN); uartStatus = DL_UART_isEnabled(UART_0_INST); while (modeTogglePolicy2 == false) { __WFE(); } } }
Can someone please guide me regarding this issue,
Thanks and Regards,