Hello,
I am using SDK v2.9.1 for a Bl653 (NRF52833) and was trying to use the Nordic Academy Example for how to setup the SPI bus. The Nordic Academy example states we must reference a SPI device "node", however, for the BL653 there does not seem to be one in any device tree files. I have tried using the name of the device "spi1" and the nrf52833's node for SPI but both of these result in a compilation error due to device tree linkage issues.
The device tree macro I am using:
struct spi_dt_spec spiSpec = SPI_DT_SPEC_GET(DT_NODELABEL(Some Node Goes Here), SPIOP, 0);
Bl653 Device Tree Overlay:
&spi1 { compatible = "nordic,nrf-spim"; interrupts = <4 2>; status = "okay"; cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi1_default>; pinctrl-1 = <&spi1_sleep>; pinctrl-names = "default", "sleep"; };
Below is the NRF52833's device tree SPI declaration with the required SPI node "st25r3911b."
&spi0 { compatible = "nordic,nrf-spi"; status = "okay"; cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi0_default_alt>; pinctrl-1 = <&spi0_sleep_alt>; pinctrl-names = "default", "sleep"; st25r3911b@0 { compatible = "st,st25r3911b"; reg = <0>; spi-max-frequency = <4000000>; irq-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; led-nfca-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; }; };
What node or alternative code should I be using to get my SPI bus working for the Bl653?