AnsweredAssumed Answered

Cubemx  code generation bug for LL USART RX Active level Inversion

Question asked by David Fisher on Oct 17, 2017
Latest reply on Feb 8, 2018 by Jeanne Joly

The code generated for an F303CCTx LL Active level Inversion of USART1 RX is :-

LL_USART_SetRXPinLevel(USART1, UART_ADVFEATURE_RXINV_ENABLE);

which doesn't compile. Where as I think it should be :-
LL_USART_SetRXPinLevel(USART1, LL_USART_RXPIN_LEVEL_INVERTED);

The TX doesn't have this problem.

 

I also found that I need to add :-

 /* Enable RXNE and Error interrupts */
LL_USART_EnableIT_RXNE(USART1);
LL_USART_EnableIT_ERROR(USART1);

to enable the interrupts I need. As it would seem the best place to add these is in the MX_USART1_UART_Init function that is generated, would it be possible to add a user code section at the end of the function to add this code to. 

Outcomes