Skip to main content
Explorer II
September 17, 2024
Question

SPI slave master DMA 4Mhz not working

  • September 17, 2024
  • 2 replies
  • 1305 views

Hi,
I am using a STM32H5 as SPI slave DMA (the main clock is at 250Mhz and SPI clock is at 160Mhz)... I am trying to receive data (2072 Bytes) from a master with a clock of 4Mhz and I am having some OVVERUN is this normal. When the master clock is at 2Mhz I don't have any issue.

 

Thank you

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    September 17, 2024

    Hello @aabba.1 

    Did you check the Datasheet on SPI characteristics and tips of maximum clock frequency?

    SPI maximum clock frequency for STM32H5 MCUs devic... - STMicroelectronics Community

    aabba.1Author
    Explorer II
    September 17, 2024

    sorry did want to approuve as the best solution not sure how to revert back

    Super User
    September 17, 2024

    @aabba.1 wrote:

    sorry did want to approve as the best solution not sure how to revert 


    Instructions here: 

    https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

    Super User
    September 17, 2024

    No it's not normal. The DMA can easily keep up at a 4 MHz clock speed. Probably a code bug.

    aabba.1Author
    Explorer II
    September 17, 2024

    I am using it with some other task FreeRtos... Do you have any idea what can be the problem?

    Thank you

    Super User
    September 17, 2024

    Yeah, a code bug. If you showed your code, maybe something more precise could be said. Guessing at problems is not useful. Be objective, debug the code.