Solved
How to edit USART BAUDRATE using only register header file?
Hello everyone.
I am trying to edit the baudrate using register header file without using HAL. I am working with STM32L4R5ZI and IAR complier.
I found these lines in the header files but don't know how to use them.
/****************** Bit definition for USART_BRR register *******************/
#define USART_BRR_DIV_FRACTION_Pos (0U)
#define USART_BRR_DIV_FRACTION_Msk (0xFUL << USART_BRR_DIV_FRACTION_Pos) /*!< 0x0000000F */
#define USART_BRR_DIV_FRACTION USART_BRR_DIV_FRACTION_Msk /*!< Fraction of USARTDIV */
#define USART_BRR_DIV_MANTISSA_Pos (4U)
#define USART_BRR_DIV_MANTISSA_Msk (0xFFFUL << USART_BRR_DIV_MANTISSA_Pos) /*!< 0x0000FFF0 */
#define USART_BRR_DIV_MANTISSA USART_BRR_DIV_MANTISSA_Msk /*!< Mantissa of USARTDIV */I am trying to config USART3 to transmit some char only. Oversampling rate = 8, usart _ker_ckpres = 4Mhz
Thank you guys in advance.
