How to configure the WAKEUP pin

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:

  1. set PA1 output mode and pull down
  2. call dwt_entersleep
  3. sleep some seconds
  4. pull up PA1, delay 1ms, then pull down PA1
  5. 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:

  1. set PA1 output mode and pull up
  2. call dwt_entersleep
  3. sleep some seconds
  4. pull down PA1, delay 1ms, then pull up PA1
  5. 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?