I have a DW1000 board and want to put the DW1000 in deepsleep mode, and wakeup it later through the WAKEUP pin or SPICSn.
The DW1000 sleep configure is:
dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG | DWT_TANDV,
DWT_WAKE_WK | DWT_WAKE_CS | DWT_SLP_EN);
First, used the WAKEUP pin (PA1), configure as following steps:
- set PA1 output mode and pull down
- call dwt_entersleep
- sleep some seconds
- pull up PA1, delay 1ms, then pull down PA1
- sleep 5ms and read the SYS_STATUS_ID, it’s value is 0x02000003 (CLKPLL_LL set),
the RF_STATUS is 0x3.
But, chang to following steps:
- set PA1 output mode and pull up
- call dwt_entersleep
- sleep some seconds
- pull down PA1, delay 1ms, then pull up PA1
- sleep 5ms and read the SYS_STATUS_ID, it’s value is 0x3, the RF_STATUS is 0x1.
If use the SPICSn wakeup, must pull up the WAKEUP pin, too. Otherwise, the SYS_STATUS_ID will be 0x02000003, and RF_STATUS is 0x3.
It should always keep the WAKEUP pin (PA1) pull up when it work? Do need pull down the WAKEUP pin when it had waken?