I would like to integrate TI I/O expander to nRF5340 firmware. Does Nordic provide Zephyr sample code for I/O expander?
I would like to integrate TI I/O expander to nRF5340 firmware. Does Nordic provide Zephyr sample code for I/O expander?
Hello,
I can't find a board for the nRF5340 unfortunately, but the thingy:52 uses an IO expander:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.2/zephyr/boards/arm/thingy52_nrf52832/doc/index.html
You can find in the dts file that thingy:52 is using an sx1509b io expander as gpio-controller:
https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L143
Here is a description of the available node properties for the sx1509b io expander:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.2/zephyr/build/dts/api/bindings/gpio/semtech%2Csx1509b.html
And you can find that some of the pins in the dts file use the sx1509b io expander to control for instance leds:
https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/thingy52_nrf52832/thingy52_nrf52832.dts#L41
These leds should now be controllable like any other board having leds without io expander. So you should be able to run for instance zephyr\samples\basic\blinky\ build for thingy52 for test.
Kenneth
Thanks for your reply!