summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucian Copeland <hierophect@gmail.com>2020-07-02 15:38:37 -0400
committerLucian Copeland <hierophect@gmail.com>2020-07-02 15:38:37 -0400
commit4b66483757048be03c7d34fd07d2028693a629a3 (patch)
tree48b8e6e27516e1f7427ed5d4fe319b3eab872e72
parent87d58b3b0a7b9d1c67e3234680a14a18ca55189c (diff)
Update submodule, revert direction change
-rw-r--r--ports/stm/common-hal/busio/SPI.c7
m---------ports/stm/st_driver0
2 files changed, 2 insertions, 5 deletions
diff --git a/ports/stm/common-hal/busio/SPI.c b/ports/stm/common-hal/busio/SPI.c
index 380302da6..65eeb8ebc 100644
--- a/ports/stm/common-hal/busio/SPI.c
+++ b/ports/stm/common-hal/busio/SPI.c
@@ -238,11 +238,8 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
self->handle.Instance = SPIx;
self->handle.Init.Mode = SPI_MODE_MASTER;
- // Implementing one-directional recieve-only SPI as per [RefMan RM0090:884]
- // results in BSY bit related hangs. Using MOSI as an IO works fine without it,
- // so it's unclear why this mode is present in the first place.
- //self->handle.Init.Direction = (self->mosi == NULL) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES;
- self->handle.Init.Direction = SPI_DIRECTION_2LINES;
+ // Direction change only required for RX-only, see RefMan RM0090:884
+ self->handle.Init.Direction = (self->mosi == NULL) ? SPI_DIRECTION_2LINES_RXONLY : SPI_DIRECTION_2LINES;
self->handle.Init.DataSize = SPI_DATASIZE_8BIT;
self->handle.Init.CLKPolarity = SPI_POLARITY_LOW;
self->handle.Init.CLKPhase = SPI_PHASE_1EDGE;
diff --git a/ports/stm/st_driver b/ports/stm/st_driver
-Subproject 3fc2e0f3db155b33177bb0705e0dd65cadb5841
+Subproject 1900834751fd6754457874b8c971690bab33e0a