2024-08-13 10:25 PM
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?
2024-08-13 10:42 PM - edited 2024-08-13 10:42 PM
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
2024-08-14 12:11 AM
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.
2024-08-14 05:32 AM
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.