nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
499 stars 139 forks source link

Running an MOSI only SPI (setting `sck` to `None`) causes SPI to hang #410

Open korken89 opened 1 year ago

korken89 commented 1 year ago

Hi,

I was testing using the SPI to drive a smart LED where I only needed the MOSI pin, so I set the sck pin to None. However if one does this the SPI gets stuck in nrf_hal_common::spim::Spim<T>::do_spi_dma_transfer. Adding back a clock pin does make it work again.

I'm not sure why this happens, and I can't find a reference in the datasheet to this behavior. Does anyone know how to get this to work without having to have an SCK pin defined?