2020-08-13 09:20 AM
Steps to reproduce:
Enable asynchronous UART
Enable Tx and Rx pins swapping
Select LL driver instead of HAL.
Code generated at end of MX_UART4_Init:
LL_USART_Enable(UART4);
LL_USART_SetTXRXSwap(UART4, LL_USART_TXRX_SWAPPED);
Reference manual states pins must be swapped before UART is enabled.
Solved! Go to Solution.
2020-08-17 01:31 AM
I confirm the issue, even while using 6.0.0 (my previous post was wrong).
Some initialisation parameters are taken into account prior calling LL_USART_Enable(UART4), but not all.
I will report the bug to STM32CubeMx team in order to solve it in next release.
Regards
2020-08-14 12:20 AM
Hello @PBogu.475
What is your CubeMx version and on which STM32 are you working ?
I tried to reproduce your issue using CubeMx 6.0.0 on STM32G4, and I don't observe similar generated code than you (LL_USART_Enable() call is placed after TxRXswap setting).
Regarding the sequence, you're absolutely right : Tx/Rx setting should be done prior UE bit enabling.
If your are already using latest CubeMx version, please let me know your STM32 serie, and i will raise an internal error report, for solving this sissue.
Regards
2020-08-14 09:47 AM
I am not using the latest version. I'm using 5.6.1 with the STM32F745VETx.
Thank you,
2020-08-17 01:31 AM
I confirm the issue, even while using 6.0.0 (my previous post was wrong).
Some initialisation parameters are taken into account prior calling LL_USART_Enable(UART4), but not all.
I will report the bug to STM32CubeMx team in order to solve it in next release.
Regards