SPI CS pin input vs output inactive power consumption

Hi,

I was checking the HAL for SPI in master mode and notice that when pm_device_action_run(<spi_device>, PM_DEVICE_ACTION_SUSPEND); the CS pin isnt changed since it status change after every transmission to output inactive : https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/drivers/pinctrl/pinctrl_nrf.c#L136

On the other hand, in the spim driver the SS pin is set as input when the pm action is to suspend: https://github.com/nrfconnect/sdk-hal_nordic/blob/8f013ea950f41bf69b18bf688bfb0dd80a3fdc44/nrfx/drivers/src/nrfx_spim.c#L465 . However, the code never reaches this point because the pinctrl is taking care of setting the pins to suspend state.

My question is what is the difference between both, how setting the pin as input differ as setting the pin as ouput inactive.

Thank you!

Related