Hi,
I have a question regarding the nRF power management APIs. I'm trying to implement power management in my code, and I found that the pm_device_action_run()
API can be used to manage peripheral power consumption by putting the peripheral into a PM_DEVICE_ACTION_SUSPEND or PM_DEVICE_ACTION_SUSPEND state.
I tried using this API with the I2C peripheral in my code,However, when I call the API to put the I2C peripheral into the PM_DEVICE_ACTION_SUSPEND
state, I receive a return value of -120, which indicates that the "device is already at the requested state."
Is it necessary to call the pm_device_action_run()
API to put the I2C peripheral to sleep, or is the power management of I2C peripherals already handled by the I2C driver provided by Zephyr?
I'm using SDK version: v2.4.2.
toolchain version: v2.4.2
nrf board: nrf5340
Thanks.