cancel
Showing results for 
Search instead for 
Did you mean: 

SPI clock issue in modes 2 and 3: H743

Peter Mather
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
thomfischer
Senior

see

void MX_SPI1_Init(void)

{

...

...

 hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE;

...

View solution in original post

2 REPLIES 2

> 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
Senior

see

void MX_SPI1_Init(void)

{

...

...

 hspi1.Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE;

...