2018-06-15 01:12 AM
Dear all,
Now I meet a strange problem that when I set the uart1 and uart2 pull from PULLUP to PULLDOWN, then I got the Uart errror, HAL_UART_ErrorCallback is called.
May I know any limitation about the PULLDOWN setting about Uart ? Interest thing is if just one of them set to pull down, then it is OK. This error only happens when both of them set to PULLDOWN.
Any clues about that is really appreciated.
Thanks a lot
GPIO_InitStruct.Pin = GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF0_USART1; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);GPIO_InitStruct.Pin = GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF1_USART2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);2018-06-15 01:48 AM
Normally the usart rx line is high if inactive (no data transmission).
If the RX Pin is pulled low, the uart starts to sample for incoming bytes,it does not detect a stop bit, so you will get framing errors and possible other errors like overrun, parity error.See Usart frame format in reference manual.Usart Rx level should alway be pulled to inactive level, that is normally high