Greetings developers,
I am using nrf connect sdk 2.7.0 with nrf52811 soc.
1) present situation:
My application sequential in nature and does not have multiple thread.
prj.conf:
#oscilators CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n #flash CONFIG_FLASH=y # #rtc # CONFIG_COUNTER=y # CONFIG_RTC=y # CONFIG_NRFX_RTC0=y # wdt CONFIG_WATCHDOG=y # ADC CONFIG_ADC=y CONFIG_NRFX_SAADC=y CONFIG_ADC_NRFX_SAADC=y #RNG CONFIG_ENTROPY_GENERATOR=y CONFIG_ENTROPY_NRF5_RNG=y #SPI CONFIG_SPI=y #GPIO CONFIG_GPIO=y CONFIG_PINCTRL=y #oscilators CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n #flash CONFIG_FLASH=y # #rtc # CONFIG_COUNTER=y # CONFIG_RTC=y # CONFIG_NRFX_RTC0=y # wdt CONFIG_WATCHDOG=y # ADC CONFIG_ADC=y CONFIG_NRFX_SAADC=y CONFIG_ADC_NRFX_SAADC=y #RNG CONFIG_ENTROPY_GENERATOR=y CONFIG_ENTROPY_NRF5_RNG=y #SPI CONFIG_SPI=y #G#oscilators CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n #flash CONFIG_FLASH=y # #rtc # CONFIG_COUNTER=y # CONFIG_RTC=y # CONFIG_NRFX_RTC0=y # wdt CONFIG_WATCHDOG=y # ADC CONFIG_ADC=y CONFIG_NRFX_SAADC=y CONFIG_ADC_NRFX_SAADC=y #RNG CONFIG_ENTROPY_GENERATOR=y CONFIG_ENTROPY_NRF5_RNG=y #SPI CONFIG_SPI=y #GPIO CONFIG_GPIO=y CONFIG_PINCTRL=y #PM CONFIG_PM=y CONFIG_POWEROFF=y CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_TICKLESS_KERNEL=yPIO CONFIG_GPIO=y CONFIG_PINCTRL=y #PM CONFIG_PM=y CONFIG_POWEROFF=y CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_TICKLESS_KERNEL=y #PM CONFIG_PM=y CONFIG_POWEROFF=y CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_TICKLESS_KERNEL=y
2) What i want?:
I want to implement low functionality so that it puts device into low power mode and only wakeup from there and continue execution on rtc or gpio interrupt.
Also, as nrf connect is zephyr rtos based sdk, there will be periodic rtos tick which may wakeup system which i do not want to continue with.
So rtc and gpio interrupt should be only reason of wakeup here.
3) What i have tried?:
I tried putting system on sleep using k_sleep() but problem is it does not yield if any gpio interrupt occurs.
I am getting 10 uA to 13 uA here.
I think there should be better alternative.
Before this my application was in nrf5-sdk 17.1.0 and there i was using __WFE(), __WFI() and __SEV() instructions.
Looking forward for you advice.
Thanks you very much in advance.