2018-02-10 10:56 AM
How do I calculate the SPI baudrate in nucleo STM32F103RB?
In reference manual it says,
Bits 5:3 BR[2:0]: Baud rate control
000: fPCLK/2001: fPCLK/4010: fPCLK/8011: fPCLK/16100: fPCLK/32101: fPCLK/64110: fPCLK/128111: fPCLK/256What does it mean??
#stm32f103rb #stm32-f3 #spi-communication2018-02-10 11:19 AM
Take the APB clock that the SPI peripheral is attached too and divide it down.
ie
rate = HAL_RCC_GetPCLK2Freq() / 8;
For a 72 MHz bus this would be a 9 MHz SPI1