cancel
Showing results for 
Search instead for 
Did you mean: 

How to continously (without time gaps) stream bytes to SPI interface (Transmit only) ?

bully
Senior

Hello,

I'm trying to generate continous stream of random bits on SPI MOSI (for eye pattern analysis).

I'm making tests with 2 byte sequences.

I'm starting DMA transfer with : 

 

HAL_SPI_Transmit_DMA(&hspi2, &spi_outdata, 2);

 

 

in the HAL_SPI_TxCpltCallback I start another SPI transfer.

 

I notice few tenths (cca. 60) of microseconds gaps on clock and data signals on SPI MOSI output.

Is there any way to achieve continuous clock and data signals on SPI ?

If I try to send on Half Callback, DMA is busy - it doesn't send. 

Can I somehow only add to output buffer on half-complete callback or any other solution?

 

Thanks in advance,

regards.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Which STM32?

> Is there any way to achieve continuous clock and data signals on SPI ?

Yes - use circular DMA.

JW

View solution in original post

1 REPLY 1

Which STM32?

> Is there any way to achieve continuous clock and data signals on SPI ?

Yes - use circular DMA.

JW