Hello
I'm attempting to get the following example to work on a nRF5340DK using 'nRF Connect for VS Code' as a first attempt to use SPI on a Nordic controller:
- https://github.com/too1/ncs-spi-master-slave-example
I've started the project with 'basic/blinky' and copied the following code from the example to project:
- "nrf52840dk_nrf52840.overlay",
- "prj.conf" and
- "main.c"
I initially attempted to build with nRF Connect SDK v2.2.0 and subsequently on v2.1.1 (as per the "README.rst") and on both attempts this failed to build with the following errors :
C:\ncs\v2.1.1\zephyr\include\zephyr\drivers\pinctrl.h:89:10: error: 'PINCTRL_STATE_DT_N_S_soc_S_peripheral_50000000_S_spi_b000_PINCTRL_IDX_0_UPPER_TOKEN' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_spi_a000_PINCTRL_IDX_0_UPPER_TOKEN'?
89 | _CONCAT(PINCTRL_STATE_, \
| ^~~~~~~~~~~~~~
C:\ncs\v2.1.1\zephyr\include\zephyr\drivers\pinctrl.h:89:10: error: 'PINCTRL_STATE_DT_N_S_soc_S_peripheral_50000000_S_spi_b000_PINCTRL_IDX_1_UPPER_TOKEN' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_peripheral_50000000_S_spi_a000_PINCTRL_IDX_1_UPPER_TOKEN'?
89 | _CONCAT(PINCTRL_STATE_, \
| ^~~~~~~~~~~~~~
Looking at the following "zephyr.dts" extract below am I right to assume that spi@b000 (the slave SPI) has not been set up correctly so is offering the master instead? If so, how do I overcome this? (Has something in the background changed since the example has been saved?)
I'll be grateful for any suggestions on how to overcome this build issue.
Thanks
RoW