Skip to content

Commit 4b66483

Browse files
committed
Update submodule, revert direction change
1 parent 87d58b3 commit 4b66483

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ports/stm/common-hal/busio/SPI.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,8 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
238238

239239
self->handle.Instance = SPIx;
240240
self->handle.Init.Mode = SPI_MODE_MASTER;
241-
// Implementing one-directional recieve-only SPI as per [RefMan RM0090:884]
242-
// results in BSY bit related hangs. Using MOSI as an IO works fine without it,
243-
// so it's unclear why this mode is present in the first place.
244-
//self->handle.Init.Direction = (self->mosi == NULL) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES;
245-
self->handle.Init.Direction = SPI_DIRECTION_2LINES;
241+
// Direction change only required for RX-only, see RefMan RM0090:884
242+
self->handle.Init.Direction = (self->mosi == NULL) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES;
246243
self->handle.Init.DataSize = SPI_DATASIZE_8BIT;
247244
self->handle.Init.CLKPolarity = SPI_POLARITY_LOW;
248245
self->handle.Init.CLKPhase = SPI_PHASE_1EDGE;

ports/stm/st_driver

Submodule st_driver updated 892 files

0 commit comments

Comments
 (0)