SPI generates too many clocks in Bidirectional mode #11
Labels
bug
Something isn't working
hal
HAL-LL driver-related issue or pull-request.
needs clarification
Needs clarification or inputs from the user
spi
Serial Peripheral Interface
Describe the set-up
Describe the bug
Function
HAL_SPI_Receive
generate clock on SPI clock line a few octets too long, for example reading 6 octets generates 9 octets of clock, thus transmissions "with side effect" like for example reading FIFO from accelerometer can result in extremely confusing bugsMore detailed info:
http://efton.sk/STM32/gotcha/g32.html
How To Reproduce
Setup bidirectional SPI working at high clock and observe MISO/MOSI line with logic analyzer, use CubeMX autogenerated code.
Additional context
Instead of fixing it you can inform CubeMX users of the problem or even remove bidirectional SPI choice from CubeMX
The text was updated successfully, but these errors were encountered: