Skip to main content
Peter Mather
Associate III
June 21, 2019
Solved

SPI clock issue in modes 2 and 3: H743

  • June 21, 2019
  • 2 replies
  • 2215 views

The clock and data lines on SPI seem to go tri-state off when not in use even though the SPI channel is left open. Is this expected behaviour? It causes issues with some connected chips as they see the re-establishment of the driven clock signal as a clock pulse

Code is:

HAL_SPI_TransmitReceive(&hspi3, mybufft.cTxBuffer, mybuffr.cRxBuffer, 1, 5000);

0690X000008j2JBQAY.jpg

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

see

void MX_SPI1_Init(void)

{

...

...

 hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE;

...

2 replies

waclawek.jan
Super User
June 21, 2019

> Code is:

> HAL_SPI_TransmitReceive(&hspi3, mybufft.cTxBuffer, mybuffr.cRxBuffer, 1, 5000);

That's no code. That's a call to a "library" function. Look at that what it does.

Or use bandaid a pullup.

JW

thomfischer
thomfischerBest answer
Senior
June 21, 2019

see

void MX_SPI1_Init(void)

{

...

...

 hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE;

...