


Currently, I have configured cs-gpios in the device tree and loaded the SPI in the main function. Why is D0 (representing CS) kept high in my experimental waveform, and SCLK (D2), MOSI (D4), and MISO (D6) also behave abnormally?



Currently, I have configured cs-gpios in the device tree and loaded the SPI in the main function. Why is D0 (representing CS) kept high in my experimental waveform, and SCLK (D2), MOSI (D4), and MISO (D6) also behave abnormally?
Hi,
Are you testing on a nRF5340-DK?
If yes, then P0.15 is not routed to the pin header:
https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/hw_drawings.html
P0.03 is a nfc pin, and must also be handled accordingly on the DK:
https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/hw_nfc_if.html#d47e117
In addition, this is required in device tree to use NFC pins as generic GPIOs:
&uicr {
nfct-pins-as-gpios;
};
Kind regards,
Håkon
Hi,
Are you testing on a nRF5340-DK?
If yes, then P0.15 is not routed to the pin header:
https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/hw_drawings.html
P0.03 is a nfc pin, and must also be handled accordingly on the DK:
https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/hw_nfc_if.html#d47e117
In addition, this is required in device tree to use NFC pins as generic GPIOs:
&uicr {
nfct-pins-as-gpios;
};
Kind regards,
Håkon