Hello
I'm using SDK v2.4.2 zephyr
Can I reconfigure the pin instead of using the overlay class?
Hello
I'm using SDK v2.4.2 zephyr
Can I reconfigure the pin instead of using the overlay class?
Hello,
It is possible to make the changes directly in the dts file. But is always better to do this in the overlay since it will overwrite the dts file while retaining the original configuration.
Regards.
Swathy
Thank you for your reply
Can we change that gpio from input to output state (or from spi to i2c...) while the program is running or edit it directly in the dts file and then flash the program to the hardware?
Hello,
Dinh Son said:Can we change that gpio from input to output state (or from spi to i2c...) while the program is running or edit it directly in the dts file and then flash the program to the hardware?
You could take a look at this : https://docs.nordicsemi.com/bundle/ncs-2.1.3/page/zephyr/samples/boards/nrf/dynamic_pinctrl/README.html
You can also edit the gpio configurations directly in the dts file.. But again, it is not recommended, as using an overlay is always the best option since the default settings will be retained in that case and will be easier for better debugging in case of any erors. Any free gpio pins can be used for spi, uart etc.
Best Regards,
Swathy