cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C011 SPI with DMA on registers

Michael2023
Associate II

Hello, I have been prubbing to run SPI transmission using DMA for some time now. So far I am trying to send a variable, but something is not working. Without DMA it works without any problem. Would anyone be able to help?

3 REPLIES 3
KnarfB
Principal III

In  SPI1_Transmit_DMA, the data_to_send parameter is already a pointer.

You should not pass that pointer's address to CMAR, but the pointer itself.

hth

KnarfB

thanks for the answer. I corrected, unfortunately it had no effect. I happen to have a logic state analyzer and it looks the same as before.

TDK
Guru

Can you better define "something is not working"? Have you looked at the signals? If so can you show what they look like?

You need to wait for the SPI transaction to complete by polling the BSY flag before raising CS.

If you feel a post has answered your question, please click "Accept as Solution".