Skip to main content
Associate III
October 31, 2024
Question

How to output CLK for receive-only (master) in SPI communication

  • October 31, 2024
  • 2 replies
  • 808 views

How to output CLK for receive-only (master) in SPI communication
We want to create a receive-only (master) in SPI communication.
However, SPI_CLK is not generated.
In the case of a transmit-only (master), I think that CLK will be generated if CLK is enabled when transmitting with HAL_SPI_TransmitReceive,
but in the case of a receive-only (master), how do you output CLK?
Will CLK be generated automatically if I call HAL_SPI_Receive?

2 replies

PGump.1
Senior II
October 31, 2024

Hi,

SPI is full-duplex. Except for a couple of odd single wire modes.

I don't use HAL. However, HAL_SPI_TransmitReceive() is the function you need to use...

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.
Andrew Neil
Super User
October 31, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.