Last active
June 5, 2021 15:43
-
-
Save utkarshsethi/dc09c9caa9944b6a22b0fb8acabffd14 to your computer and use it in GitHub Desktop.
STM32 CMSIS CHEATSHEET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USART: | |
//BRR = (Pclk + (BaudRate / 2)) / BaudRate | |
static uint16_t calc_brr(uint32_t Pclk, uint32_t BaudRate) | |
{ | |
uint16_t brr = (Pclk + (BaudRate / 2)) / BaudRate; | |
return brr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment