Skip to main content
aabba.1
Associate III
September 17, 2024
Question

SPI slave master DMA 4Mhz not working

  • September 17, 2024
  • 6 replies
  • 1329 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.

6 replies

ST 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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
aabba.1
aabba.1Author
Associate III
September 17, 2024

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

Andrew Neil
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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
September 17, 2024

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

"If you feel a post has answered your question, please click ""Accept as Solution""."
aabba.1
aabba.1Author
Associate III
September 17, 2024

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

Thank you

TDK
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.

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