Skip to main content
Johannes
Senior
March 29, 2020
Solved

CubeIDE 1.3.0 for STM32L4R5 MCUPackage 1.15.1 creates faulty LPUART1 IRQ Handler

  • March 29, 2020
  • 2 replies
  • 879 views

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.
Best answer by Khouloud OTHMAN

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
Technical Moderator
April 17, 2020

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
March 2, 2021

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.