SRM32WB55 junk data over LPUART in interrupt mode
Hello,
We came across a strange problem with LPUART on STM32WB55 chip.
When using FIFO in interrupt mode (receiving data), if you use FIFO depth more than 1 byte (even 2 or 8) you will occasionally (one out of ~1000 reads) get complete junk bytes (not always first byte of transition); If everything is the same, and you use 1byte FIFO (HAL_UARTEx_SetRxFifoThreshold(UART_RXFIFO_THRESHOLD_1_8))- it always works fine.
Obviously the other (sender) side never changes, it is always sending in junks of 4-8 bytes.
Note that we use flow control.
Apparently this is coming directly from RDR register in UART_RxISR_8BIT_FIFOEN.
Below is the init code. LPUART running on 32Mhz system clock - it never changes.
P.S. This issue is not mentioned in errata
P.P.S. We would sniff the data to make sure its not line issue, but it is a IPC lines berried deep inside the PCB.
Anyone came across something like this before?
Thanks in advance
hlpuart1.Instance = LPUART1;
hlpuart1.Init.BaudRate = 1000000;
hlpuart1.Init.WordLength = UART_WORDLENGTH_8B;
hlpuart1.Init.StopBits = UART_STOPBITS_2;
hlpuart1.Init.Parity = UART_PARITY_NONE;
hlpuart1.Init.Mode = UART_MODE_TX_RX;
hlpuart1.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS;
hlpuart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
hlpuart1.Init.OverSampling = UART_OVERSAMPLING_16;
hlpuart1.Init.ClockPrescaler = UART_PRESCALER_DIV1;
hlpuart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
hlpuart1.FifoMode = UART_FIFOMODE_ENABLE;
HAL_UART_Init(&hlpuart1);
HAL_UARTEx_SetRxFifoThreshold(&hlpuart1,UART_RXFIFO_THRESHOLD_1_2);
HAL_UARTEx_EnableFifoMode(&hlpuart1);