cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401 SPI CLK turns off with DMA

MatthewsEffects
Associate III

Hello

 

Got a weird issue, to further test I created  blank project with no other code to rule out conflict. 

When I put in 
HAL_SPI_Receive_IT(&hspi3, SPI_RX_BUF, 2);
,According to my logic analyzer, the clk and data pins stay high and dont move. 
When I comment it out the clk and data pins move correctly. 

I've turned on the DMA and have it configured correctly I believe. Im using this chip to talk to a H7 and that chip receives data , when the dma is off, no problem and I have this DMA configured in the same way. 

I have the h7 disconnected for testing purposes.  

I've tried everything I can come up with and I'm completely lost and out of ideas. 

i-3.jpgi-2.jpgi-1.jpgi-4.jpg

1 REPLY 1
Amel NASRI
ST Employee

Hi @MatthewsEffects ,

As you are configuring DMA, you should call HAL_SPI_Receive_DMA for processing.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.