2023-05-09 12:05 PM
STM32CubeID, Ver 1.12.0
RM0454, Rev 5
STM32Cube_FW_G0_V1.6.1 drivers
We are using a new STM32G0B which requires we a shift to the new STM LL drivers and have come across a discrepancy with the USART ICR register drivers. RM0454 Pg 851 references bit 5 of the USART ICR register as RXFNE: RXFIFO not empty. The Low Level drivers v1.6.1 say that this bit is the TX FIFO empty flag. The drivers also declare a inline LL_USART_ClearFlag_TXFE() which uses this bit definition. Is the Reference manual correct or drivers? I'm guessing reference manual.
Thanks.
#define USART_ICR_TXFECF_Pos (5U)
#define USART_ICR_TXFECF_Msk (0x1UL << USART_ICR_TXFECF_Pos) /*!< 0x00000020 */
#define USART_ICR_TXFECF USART_ICR_TXFECF_Msk /*!< TXFIFO Empty Clear Flag */
/**
* @brief Clear TX FIFO Empty Flag
* @note Macro IS_UART_FIFO_INSTANCE(USARTx) can be used to check whether or not
* FIFO mode feature is supported by the USARTx instance.
* @rmtoll ICR TXFECF LL_USART_ClearFlag_TXFE
* @param USARTx USART Instance
* @retval None
*/
__STATIC_INLINE void LL_USART_ClearFlag_TXFE(USART_TypeDef *USARTx)
{
WRITE_REG(USARTx->ICR, USART_ICR_TXFECF);
}