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

Power managment on NRF52 using Zephyr

Hello guys,

I wanted to start to implement the power management feature on the NRF52 using the Zephyr kernel for a bluetooth application. Unfortunately I am running in a lot of problems. I understood that the hookup functions are called once the kernel goes to idle/waking up. I assume that in those functions I have to turn on/off the components.

In order to be able to wakeup after going to sleep I wanted to use the RTC component. Unfortunately I am not able to set it up:

I used CONFIG_RTC=y in config file, tried with CONFIG_NRF_RTC_TIMER, CONFIG_SOC_FAMILY_NRF5, CONFIG_CLOCK_CONTROL_NRF5 as well. Once I am looking for the device with device_get_binding("RTC_0") I always get a NULL pointer which means the device was not found. RTC_0 should be the default name for the component, according to the Kconfig file.

Hope someone can help me: Am I on the right track for implementing the power managment? Does someone has experience with the Power managment on the NRF52 using Zephyr? What am I doing wrong with the RTC?

  • Hi Tobi, Power management feature for which peripheral are you focusing? What type of sleep, system off?

    Default configuration of supported boards in Zephyr are implicitly in low power.

    RTC0 is used by BLE controller and RTC1 is used as system timer. There is no RTC driver, hence you will not be able to bind. There is work in progress to add counter driver though. Please refer to Jira or email to mailing list to know more about areas to contribute.

    Cheers, Vinayak

  • Hi Vinayak, thousand thanks for your answer! A chip from Cypress (CY8C4248LQI) is acting as peripheral. I would like to reduce the power consumption as much us possible. So basically you are saying that Zephyr is using the low power modes by default? Is there any documentation? I could not found anything on the official Zephyr page... Is there the possibility to see somehow when which mode is active? E.g. by setting some pins? I guess this could be done in the hookup functions but without an RTC I do not know how it should be able to wakeup the component... Best regards, Tobi

  • Hi Tobi,

    This is the documentation for PMU in nRF5 chips: infocenter.nordicsemi.com/.../pmu.html

    Our hardware's intelligent power management keeps consumption ultra low needing no hook function in software to power manage the peripheral (by peripheral, RTC, Radio, Timers etc.).

    But hook functions can be used, for instance, if chip is being powered off then to setup correct wake up sources,or say, external peripherals (external components as you call it) connected through nRF5 SoC transport peripheral (UART, SPI, etc.) can be instructed to enter/exit low power states etc.

    In short, peripherals in nRF5 SoC need no explicit software to power control them.

    If you are observing power consumptions on nRF5 that dont match our documented values (in our info center), please give details of Zephyr commit hash you are using, your application and its Kconfig file details.

    If you are interested in reducing power consumption of CY8Cxxxx chip, this is not the right forum ;-)

    Regards, Vinayak

  • Hi guys, any progress on that? I am facing issues to use the RTC (with Zephyr) on my board nrf52840_pca10056.

    Thank you.

  • As advised in your previous post, you may be better served/get a quicker response by asking the Zephyr community. There is also an IIRC channel so that you can communicate with the devs directly.

    regards,

Related