This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

System off draws more then 80µA

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() ;


}
Parents
  • Ok. Don't worry about it. Sometimes the blog engine is a little flaky. Off hand that seems like a really messy way to do a system power off. I personally haven't had to do a system power off since just disabling the ble and doing a power manage gives you about 2 microamps of power consumption. Which is pretty small.

    I would suggest you search in the blogs for info on this. There are two approaches. 1. you call the api sd_power_system_off 2. You write to the register as you did.

    To make your code a little easier on yourself, you might consider writing FF's to the outclear register and a similar process to config to make them inputs. Actually you only need to make them inputs to stop the power loss, so your choice. Clearing all the individual gpio using the driver would seem maddening.

    Then just init your wakeup pin and once you come out of system off do a re-init of all the gpio.

    Based on the current consumption, I would guess that the HF clock isn't powering down.

Reply
  • Ok. Don't worry about it. Sometimes the blog engine is a little flaky. Off hand that seems like a really messy way to do a system power off. I personally haven't had to do a system power off since just disabling the ble and doing a power manage gives you about 2 microamps of power consumption. Which is pretty small.

    I would suggest you search in the blogs for info on this. There are two approaches. 1. you call the api sd_power_system_off 2. You write to the register as you did.

    To make your code a little easier on yourself, you might consider writing FF's to the outclear register and a similar process to config to make them inputs. Actually you only need to make them inputs to stop the power loss, so your choice. Clearing all the individual gpio using the driver would seem maddening.

    Then just init your wakeup pin and once you come out of system off do a re-init of all the gpio.

    Based on the current consumption, I would guess that the HF clock isn't powering down.

Children
No Data
Related