power manager policy nrf52833 dts

Hello,

we are developing few products based on the nRF52833 and we found something interesting in the nrf52833 dts file (https://github.com/nrfconnect/sdk-zephyr/blob/ncs-v3.1.0/dts/arm/nordic/nrf52833.dtsi)

The zephyr,pm-device-runtime-auto flag is assigned to the i2c0/1 and adc nodes but not to the spi0/1 nodes.

We would like to understand if there is a specific reason behind it.

We could assign it through the board overlay but will be nice to understand why it is not enabled by default.

Similar question for the USB device, although it seems the driver do not even support power management, but I could be wrong...

Kind Regards,

Andrea

  • Hi,

     

    The zephyr,pm-device-runtime-auto flag is assigned to the i2c0/1 and adc nodes but not to the spi0/1 nodes.

    SPI is a synchronous protocol, and keeping this enabled in sleep does not provide a penalty in terms of sleep current (unless you're using SPIM3, which is high speed capable).

    I2C will draw more current if kept enabled while in sleep, unfortunately. This is the reason why this supports the flag.

     

    Similar question for the USB device, although it seems the driver do not even support power management, but I could be wrong...

    USB has specific protocol mandated states, powered / configured / etc, and will be able to give an event based on the NRF_POWER->EVENTS_USBPOWERED event. This is shown in the cdc_acm sample:

    https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/subsys/usb/cdc_acm/src/main.c#L50-L60

     

    Kind regards,

    Håkon 

Related