[STM32F411RE Nucleo Board] How to set SPI interface to a baudrate of 100kHz or less? #11202
-
Hi All, I want to set the baudrate of the SPI to 100khz or less because the peripheral I want to talk to is only specified for up to 100khz. I learned already here that there are three options to achieve this: Option 1: Using pyb.SPI setting the prescaler Option 2: Using pyb.SPI or machine.SPI setting the baudrate Option 3: Adjusting the CPU clock using pyb.freq() or machine.freq() My question is how can I adapt the CPU clock to be able to adjust the SPI baudrate to 100khz or less by reducing the CPU clock? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to solve the problem by using Soft SPI implemented in the machine module. |
Beta Was this translation helpful? Give feedback.
I was able to solve the problem by using Soft SPI implemented in the machine module.
Soft SPI is described here It is not very acurate, but sufficient.