I am using the Zephyr SPI driver to control a WS2812 LED strip through the SPI interface. Since only the MOSI line is required for communication, I want to configure the SPI interface to use only MOSI while leaving MISO and SCK unassigned, since I want to use them for other purposes.
When I manually assign MISO and SCK to arbitrary pins, everything works as expected. However, when I try to explicitly disconnect them using the following configuration:
psels = <NRF_PSEL(SPIM_MOSI, 2, 8)>, <NRF_PSEL_DISCONNECTED(SPIM_MISO)>, <NRF_PSEL_DISCONNECTED(SPIM_SCK)>;
it results in the following error:
ASSERTION FAIL [nrf_gpio_pin_present_check(*p_pin)] @ WEST_TOPDIR/modules/hal/nordic/nrfx/hal/nrf_gpio.h:944
Questions:
-
Is it possible to use only the MOSI line for SPI communication in Zephyr?
-
If so, what is the correct way to configure SPI to disable MISO and SCK without causing an assertion failure?