Skip to main content
Johannes
Senior
Mar 29, 2020 5:43 PM UTC
Solved

CubeIDE 1.3.0 for STM32L4R5 MCUPackage 1.15.1 creates faulty LPUART1 IRQ Handler

I use CubeIDE 1.3.0 and STM32L4 MCU Package 1.15.1.

I wanted to setup a demo project for Nucleo-L4R5ZI.

these boards route LPUART1 to STLINK debug Uart port.

If you enable NVIC for LPUART1, the firmware package creates a faulty IRQ handler. It should pass HLPUART1 to the IRQ handler but it passes HUART1 (which is not used and not initialized)

void LPUART1_IRQHandler(void)
{
 /* USER CODE BEGIN LPUART1_IRQn 0 */
 
	/* USER CODE END LPUART1_IRQn 0 */
 HAL_UART_IRQHandler(&huart1);
 /* USER CODE BEGIN LPUART1_IRQn 1 */
 
 /* USER CODE END LPUART1_IRQn 1 */
}

Workaround:

void LPUART1_IRQHandler(void)
{
 /* USER CODE BEGIN LPUART1_IRQn 0 */
 HAL_UART_IRQHandler(&lphuart1);
 return;
 
	/* USER CODE END LPUART1_IRQn 0 */
 HAL_UART_IRQHandler(&huart1);
 /* USER CODE BEGIN LPUART1_IRQn 1 */
 
 /* USER CODE END LPUART1_IRQn 1 */
}

This topic has been closed for replies.
Khouloud OTHMAN
Khouloud OTHMANBest answer
Associate
Mar 2, 2021 5:23 PM UTC

Hello @jvisser,

Good news :) I am pleased to inform you that this issue is fixed in the latest STM32CubeMX version 6.2.0.

The LPUART1 IRQ Handler is correctly generated by CubeMX.

Thank you for your contribution.

Khouloud.

2 replies

Amel NASRI
ST Technical Moderator
Apr 17, 2020 5:01 PM UTC

Hi @Johannes​ ,

Thanks for bringing this issue to our attention. It is reported to our STM32CubeMX development team.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Khouloud OTHMAN
Khouloud OTHMANBest answer
Associate
Mar 2, 2021 5:23 PM UTC

Hello @jvisser,

Good news :) I am pleased to inform you that this issue is fixed in the latest STM32CubeMX version 6.2.0.

The LPUART1 IRQ Handler is correctly generated by CubeMX.

Thank you for your contribution.

Khouloud.