Skip to main content
xhan.11
Associate II
December 27, 2021
Solved

HAL_SPI SPI_DIRECTION_1LINE mode Send 4 more cycles

  • December 27, 2021
  • 1 reply
  • 1963 views

HI:

STM32F103

STM32CUBEMX V4.25.1

As shown in the figure, I read one byte in 1line mode, but sent five bytes, four more than I wanted.

0693W00000HppB5QAJ.jpgthanks

This topic has been closed for replies.
Best answer by TDK

That's just how the hardware works in one line receive mode. The clock continues until the peripheral is disabled which takes some time, particularly at high data rates.

You can use two line mode, or use your own drivers to control the peripheral more exactly.

0693W00000HppDzQAJ.png 

1 reply

TDK
TDKBest answer
December 27, 2021

That's just how the hardware works in one line receive mode. The clock continues until the peripheral is disabled which takes some time, particularly at high data rates.

You can use two line mode, or use your own drivers to control the peripheral more exactly.

0693W00000HppDzQAJ.png 

"If you feel a post has answered your question, please click ""Accept as Solution""."
xhan.11
xhan.11Author
Associate II
December 27, 2021

Thank you for your reply, which solves my problem. Unfortunately, I have to use single line mode.