I added the GPIOTE driver for the project ble_app_blinky_c under the SDK13, where if I enable GPIOTE my current consumption in sleep mode jumps from 3uA to 5mA
The only thing I did to my program was adding the GPIOTE driver and enable it:
//top of my main
//top of my main.c
//inside int main()
nrf_drv_gpiote_out_config_t out_config =
APP_ERROR_CHECK( nrf_drv_gpiote_init() );
APP_ERROR_CHECK( nrf_drv_gpiote_out_init(28, &out_config) );
has something wrong the initialization for a gpiote pin as output?
Also, I noticed the same behavior on the peripheral/gpiote example (unmodified) where the current is above 6mA
I tried using nrf_gpio.g instead of gpiote driver
It reduced the current consumption considerably, but it seems still high to me around 1.5mA
Note: I am using a custom board where the pin I am enabling is a floating pin /
Did the current increase from 3 uA to 5 mA just by adding GPIOTE to the application? 5 mA indicates to me that the CPU is not entering sleep mode at all. Can you share your project?
The GPIOTE example in peripherals directory do not call __WFE(), and will thus never enter sleep mode. It is therefore not a surprise that this has a high current consumption. The example is showing how to use the GPIOTE to toggle pins without CPU intervention, it is not intended as a low-power example.
Hi Jorgen. I added this to my project and also to a project example central ble_app_blinky_c to compare if the same behavior occurs. In both cases I had the same result an increase in the current consumption
Can you post the complete project, for us to reproduce and debug this?