Fix the STM32L4 SPI driver. That SPI driver is quite different. They now handle frames of arbitrary size between 4 and 16 bits. It was broken before a new bit has to be set (rx fifo threshold) to handle <= 8-bit transactions. If not set, the default is 16-bit packed >=8-bit frames and the RXNE bit is never set (it is set when 16-bits are received). weird things as always.

This also add 8-bit access routines to the data register, because a 16-bit access to the data register when the frame size is below 9 bits is interpreted as a packed dual frame exchange.
This commit is contained in:
Sebastien Lorquet
2016-04-13 17:21:49 -06:00
committed by Gregory Nutt
parent ecf0bcf13c
commit bef518095f
2 changed files with 181 additions and 27 deletions
+10
View File
@@ -11629,3 +11629,13 @@
no longer qualifies for inclusion in the open source repositories.
The code as of this data is still available in the Obsoleted
repository at configs/nucleus2g (2016-04-12).
* arch/arm/src/stm32l4: Fix the STM32L4 SPI driver. That SPI driver is
quite different. They now handle frames of arbitrary size between 4
and 16 bits. It was broken before a new bit has to be set (rx fifo
threshold) to handle <= 8-bit transactions. If not set, the default is
16-bit packed >=8-bit frames and the RXNE bit is never set (it is set
when 16-bits are received). weird things as always.
This also add 8-bit access routines to the data register, because a
16-bit access to the data register when the frame size is below 9 bits
is interpreted as a packed dual frame exchange. Sebastien Lorquet
(2016-04-13).