Hello, we use an MDBT40 Module from Raytek with an nrf51822 chip. We take this module for building a ble remote control. The remote control is central and the receiver is peripheral... The remote control has a second µC. This µC has to wakeup the module over an negative impuls over the TXD ( RXD of the module ). We use the nus service. To save energy the the nrf51822 is set to the power off mode. The problem is, that there is a current of about 80µA. We spent dozen of hours to find out where the current came from. We have desolderd the module ( with the nrf51822 ) to find out wether it is the nref51822 or the second µC. The second µC draws <1µA, so that was not the problem... Then we have set all unused IO's set to output and logical zero, so there are no floating inputs. ( the only to pins are used are RXD and TXD ) We make power cycle with deattached debugger , but we alway measure ~ 80µA Any Ideas what could cause this current ??
Our powerdown code.
void PowerDown(void)
{
uint32_t err_code ;
printf("POW1\r\n");
err_code = softdevice_handler_sd_disable() ;
APP_ERROR_CHECK(err_code) ;
printf("POW2\r\n");
nrf_delay_ms(2) ;
nrf_gpio_cfg_output(0) ;
nrf_gpio_pin_clear(0) ;
nrf_gpio_cfg_output(1) ;
nrf_gpio_pin_clear(1) ;
nrf_gpio_cfg_output(2) ;
nrf_gpio_pin_clear(2) ;
nrf_gpio_cfg_output(3) ;
nrf_gpio_pin_clear(3) ;
nrf_gpio_cfg_output(4) ;
nrf_gpio_pin_clear(4) ;
nrf_gpio_cfg_output(5) ;
nrf_gpio_pin_clear(5) ;
nrf_gpio_cfg_output(6) ;
nrf_gpio_pin_clear(6) ;
nrf_gpio_cfg_output(7) ;
nrf_gpio_pin_clear(7) ;
nrf_gpio_cfg_output(10) ;
nrf_gpio_pin_clear(10) ;
nrf_gpio_cfg_output(11) ;
nrf_gpio_pin_clear(11) ;
nrf_gpio_cfg_output(12) ;
nrf_gpio_pin_clear(12) ;
nrf_gpio_cfg_output(13) ;
nrf_gpio_pin_clear(13) ;
nrf_gpio_cfg_output(14) ;
nrf_gpio_pin_clear(14) ;
nrf_gpio_cfg_output(15) ;
nrf_gpio_pin_clear(15) ;
nrf_gpio_cfg_output(16) ;
nrf_gpio_pin_clear(16) ;
nrf_gpio_cfg_output(17) ;
nrf_gpio_pin_clear(17) ;
nrf_gpio_cfg_output(18) ;
nrf_gpio_pin_clear(18) ;
nrf_gpio_cfg_output(19) ;
nrf_gpio_pin_clear(19) ;
nrf_gpio_cfg_output(20) ;
nrf_gpio_pin_clear(20) ;
nrf_gpio_cfg_output(21) ;
nrf_gpio_pin_clear(21) ;
nrf_gpio_cfg_output(22) ;
nrf_gpio_pin_clear(22) ;
nrf_gpio_cfg_output(23) ;
nrf_gpio_pin_clear(23) ;
nrf_gpio_cfg_output(24) ;
nrf_gpio_pin_clear(24) ;
nrf_gpio_cfg_output(25) ;
nrf_gpio_pin_clear(25) ;
nrf_gpio_cfg_output(26) ;
nrf_gpio_pin_clear(26) ;
nrf_gpio_cfg_output(27) ;
nrf_gpio_pin_clear(27) ;
nrf_gpio_cfg_output(28) ;
nrf_gpio_pin_clear(28) ;
nrf_gpio_cfg_output(29) ;
nrf_gpio_pin_clear(29) ;
nrf_gpio_cfg_output(30) ;
nrf_gpio_pin_clear(30) ;
__disable_irq() ;
NRF_UART0->ENABLE = UART_ENABLE_ENABLE_Disabled;
NRF_UART0->PSELRXD = UART_PIN_DISCONNECTED ;
NRF_UART0->PSELTXD = UART_PIN_DISCONNECTED ;
NRF_GPIO->PIN_CNF[RX_PIN_NUMBER] = 0x030000; // sense for low level ( wakeup )
nrf_delay_ms(2) ;
NRF_POWER->SYSTEMOFF =0x1 ;
__DSB() ;
__NOP() ;
}