2021-01-17 10:13 PM
Hi.
If you continue to receive packets while executing Uart for the first time, the operation stops.
If there is some delay, it's okay, but if there isn't, it suddenly stops.
However, if you update the STM32 directly, it will work again.
It works even if it is reset.
Why Uart Freezes And Is There A Solution???
I am using STM32F100C8T6.
I am using UART1.
USART_InitStructure.USART_BaudRate = 38400;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl =
USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx |
USART_Mode_Tx;
/* Configure USARTy */
USART_Init(USARTy, &USART_InitStructure);
// uart start
USART_ITConfig(USARTy, USART_IT_ORE | USART_IT_NE |
USART_IT_FE | USART_IT_PE, DISABLE);
MBD_RX_CRITICAL_EXIT
USART_Cmd (USARTy, ENABLE);