We have a pretty basic custom board with a CC2640R2LRGZR, some buttons, and some switches. We aren't using any of the BLE or wireless features. We just want to use the standby mode and wake up when one of the buttons/switches changes state.
As a test, we tried using the pinStandby example project - the only things we changed were the BoardGpioInitTable to set all the pins (IOID_0 to IOID_30) as low outputs (PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL) and modified the mainThread to the following since we don't have any LEDs:
void *mainThread(void *arg0)
{
while(1) {
/* Sleep, to let the power policy transition the device to standby */
sleep(standbyDuration);
}
}
When we measure the current draw of this it's around 850uA. Looking at the datasheet it should be around 1uA!
To see if there is something else that is causing the higher current we decided to try putting the device into shutdown mode. We changed the mainThread to the following:
void *mainThread(void *arg0)
{
Power_shutdown(0, 0);
}
When we measured the current draw of this it's around 145nA, which matches the datasheet expected value.
It seems like the device isn't really going into standby mode or something. What could cause this?
For reference, we are using a JLink to program the board then disconnecting the JLink, resetting the board, and then measuring the current.
Thanks,
David