Calculate the Baudrate in SPI?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-02-10 10:56 AM
Posted on February 10, 2018 at 19:56
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-communication
Labels:
- Labels:
-
SPI
-
STM32F1 Series
-
STM32F3 Series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-02-10 11:19 AM
Posted on February 10, 2018 at 20:19
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
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
