Hi,
I’m using DWM1004C module, connected to power and ground (other pins are disconnected).
- LIS3DH accelerometer id powered off (pa4 is low)
- DW1000 is sending a blink once in 30 secs, and goes to DEEP SLEEP
- MCU enters SLEEP mode between UWB blinks. when DW1000 wakes up (~30 secs after a UWB blink), it wakes up the MCU, which sends a new blink, then DW1000 and MCU go to sleep and so on
My problem is that current consumption during the Sleep period (MCU in STOP mode, DW1000 in DEEP SLEEP mode) is ~80 uA, which is much higher tahn it should be (~7 uA)
My go_to_sloop code is based on DWM1004 Tag’s software example:
sending the UWB blink:
dwt_writetxdata(msgLen, (uint8 *) (&inst->msg), 0) ; // write the frame data
dwt_writetxfctrl(msgLen, 0, 0);dwt_starttx(DWT_START_TX_IMMEDIATE);
putting MCU in stop mode:
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
uint32_t Regulator = PWR_CR_LPSDSR | PWR_CR_LPDS;uint32_t tmpreg = 0U;
/* Select the regulator state in Stop mode ---------------------------------*/
tmpreg = PWR->CR;/* Clear PDDS and LPDS bits */
CLEAR_BIT(tmpreg, (PWR_CR_PDDS | PWR_CR_LPSDSR));/* Set LPSDSR bit according to PWR_Regulator value */
SET_BIT(tmpreg, Regulator);
SET_BIT(tmpreg, PWR_CR_ULP);/* Store the new value */
PWR->CR = tmpreg;/* Set SLEEPDEEP bit of Cortex System Control Register */
SET_BIT(SCB->SCR, SCB_SCR_SLEEPDEEP_Msk);/* Select Stop mode entry --------------------------------------------------/
{
/ Request Wait For Interrupt */
__WFI();
}/* Reset SLEEPDEEP bit of Cortex System Control Register */
CLEAR_BIT(SCB->SCR, SCB_SCR_SLEEPDEEP_Msk);
Please help me to unserstand what is wrong in my configuration?
Thanks in advacne
Harel