-1

I have a custom STM32 MCU board that interfaces with an RPi 3B+ via the SPI protocol. The MCU (STM32F407) has its SPI peripheral clock set at 84MHz and is configured as a slave device. For reliable transmission, the Master (in this case, the RPi) needs to have its SPI clock at 1/2 value i.e, at 24MHz or lower (I read that it needs to be an even number). From what I understand the RPi's SPI clock runs at 250MHz. How can I scale down this clock value?

1 Answer 1

0

Anyway you want.

Most people would either use the Linux SPI driver which lets you set the SPI bits per second or a library which lets you set the SPI bits per second.

E.g.

lg library lgSpiOpen

pigpio library spiOpen

1
  • You mean the spidev? Do you have any links you can point me to? Dec 29, 2020 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.