Skip to main content
Muhammed Güler
Senior III
June 18, 2021
Question

STM32H7 SPI low speed stabilization problem

  • June 18, 2021
  • 3 replies
  • 1099 views

I am communicating Nucleo H743 with several PN532s using SPI. I edited waveshare's stm32 codes, I didn't use DMA or interrupt. I am trying to reduce the SPI speed so that the reader can work when I extend the cable length. Since I could choose the SPI clock other than the bus speed, I thought I could run SPI at very low speeds while the processor was running at full speed. however, when I try to operate SPI1 at less than 1/128th of the bus speed and SPI5 at less than 1/256 of the bus speed, I have problems communicating with the PN532. When I reduce the processor speed, I can reduce the communication speed within the above rates. I don't have anything else working with SPI right now, I don't know if the problem will repeat on other devices. What I am encountering is a known issue? I plan to use ethernet communication in the same application. I don't want to reduce the processor speed. Is there a way to slow down the SPI speed without reducing the processor speed?

This topic has been closed for replies.

3 replies

TDK
June 18, 2021

> I have problems communicating with the PN532

What problems are those?

> Is there a way to slow down the SPI speed without reducing the processor speed?

Both SPI1 and SPI5 have multiple clocks available as the source. You can use a different one and configure it accordingly.

0693W00000BbQ26QAF.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
Muhammed Güler
Senior III
June 18, 2021

Strangely, I have a communication problem when I set the spi prescaler for baud rate to 256 after reducing the spi speed from these settings. When I reduce the speed, sometimes the PN532 can read the card's ID, sometimes the wrong reading code is returned.

Pavel A.
June 19, 2021

Have you seen this thread? Do you use counted transfer mode (EOT)?