Zephyr + NRF5340: change GPIO function in runtime

The project uses nRF5340. A signal is connected to P0.27/AIN6, and during "normal" mode the pin is used as an ADC.

Before going into sleep mode we would need this pin to become a GPIO Input with enabled interrupt, so as to waking up the MCU (and then back again to ADC during "normal mode").

Some previous posts state that Zephyr did not allow for runtime configuration of pins. Is that still the case? If this is not available and we use direct configuration of the MCU's registers, what are the "special concerns" in the device tree that we have to take in order not to mess up Zephyr usage of the pin?

Parents Reply Children
No Data
Related