STM32G0B0 USART1 data incorrect
- STM32G0B0 USART1 receiving RS485 data via interrupt driven data collection.
Our micro is attached to a RS485 interface(38400, 8,N,1) receiving BACnet data. The data taken on the 485 bus is different from what we receive in the USART buffers. We have reviewed the USART config many times over and can not find anything obvious.
485: 55 FF 01 11 0C 00 00 DC
USART: 55 00 7F 7A DE FF EB 00
Notes: All the 485 packets seem to be 8 bytes in length and the micro received packets can be seven or 8 bytes. The scope trace is taken going into the micro after the 485 chip(THVD1410DR). The scope trace seems to show the second byte as all ones.
We have tried different USART1 configs but the received data always seems wrong after the first byte. Any help is appreciated.

LL_USART_InitTypeDef USART_InitStruct = {0};
USART_InitStruct.PrescalerValue = LL_USART_PRESCALER_DIV1;
USART_InitStruct.BaudRate = 38400;
USART_InitStruct.DataWidth = LL_USART_DATAWIDTH_8B;
USART_InitStruct.StopBits = LL_USART_STOPBITS_1;
USART_InitStruct.Parity = LL_USART_PARITY_NONE;
USART_InitStruct.HardwareFlowControl = LL_USART_HWCONTROL_NONE;
USART_InitStruct.TransferDirection = LL_USART_DIRECTION_TX_RX;
USART_InitStruct.OverSampling = LL_USART_OVERSAMPLING_16;
LL_USART_Init(USART1, &USART_InitStruct);
LL_USART_DisableFIFO(USART1);
LL_USART_ConfigAsyncMode(USART1);void USART1_IRQHandler(void)
{
if(LL_USART_IsActiveFlag_RXNE_RXFNE(USART1) != RESET)
{
/* Read one byte from the receive data register and log the current time stamp */
uart1RxBuffer[rxHead][uart1RX[rxHead].rxSize] = LL_USART_ReceiveData8(USART1);
uart1RX[rxHead].rxTime[uart1RX[rxHead].rxSize] = timer3_get_count();
uart1RX[rxHead].rxSize++;
}
}

