Part Number: CC2538
Hello All,
I am desperate with the last problem with our CC2538 board.
It is supposed to be simple. I just wanted to enable watchdog on a low-power board that constantly stays in PM2.
The code is exactly like below:
// Some code to set sleep timer
REG(SCB_SYSCTRL) |= SCB_SYSCTRL_SLEEPDEEP;
REG(SYS_CTRL_PMCTL) = 2;
__asm volatile( "dsb" );
__asm volatile( "wfi" );
__asm volatile( "isb" );
PRINTF("WAKEUP\n");
When watchdog is enabled the board is always reset by watchdog. without reaching printing "WAKEUP".
When watchdog is not enabled. code "wfi" will ake up by sleep timer after a few seconds and everything is running nicely!
It is driving me crazy! I can't imagine anything could possibly go wrong!
BTW, I am using external 32K crystal. And PD6 and PD7 are correctly set as analog input!
Any help is appreciated!