Skip to main content
Visitor II
August 14, 2024
Question

STM32C011 SPI with DMA on registers

  • August 14, 2024
  • 2 replies
  • 1333 views

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?

    This topic has been closed for replies.

    2 replies

    Super User
    August 14, 2024

    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

    Visitor II
    August 14, 2024

    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.

    Super User
    August 14, 2024

    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.