Skip to main content
David Fisher
Associate II
October 17, 2017
Solved

Cubemx code generation bug for LL USART RX Active level Inversion

  • October 17, 2017
  • 2 replies
  • 777 views
Posted on October 17, 2017 at 19:04

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. 

    This topic has been closed for replies.
    Best answer by Jeanne Joly
    Posted on February 08, 2018 at 14:50

    Hello

    Fisher.David.003

    ,

    Sorry for my late reply.

    This issue is now solved. Please, update your CubeMX release with the current one (CubeMX-4.24).

    BR. Jeanne

    2 replies

    ST Technical Moderator
    October 20, 2017
    Posted on October 20, 2017 at 14:16

    Hi,

    Your reported issue is raised internally for further investigation.

    Best Regards

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Jeanne Joly
    Jeanne JolyBest answer
    Associate
    February 8, 2018
    Posted on February 08, 2018 at 14:50

    Hello

    Fisher.David.003

    ,

    Sorry for my late reply.

    This issue is now solved. Please, update your CubeMX release with the current one (CubeMX-4.24).

    BR. Jeanne