Skip to main content
N.F. Singh
Associate
January 11, 2020
Solved

Can't enable interrupt for LPUART1 using STM32CubeMX (for STM32L072)

  • January 11, 2020
  • 1 reply
  • 1592 views

I'm able to configure LPUART1 fine and have been communicating on it. However, for the life of me I can't find the way to enable RX/TX interrupts via CubeMX. I'd rather use the UI if I can.

Please see the screenshot attached. As you can see, I have LPUART1 enabled... but there are no entries available in the NVIC list.

Any ideas?

This topic has been closed for replies.
Best answer by Houssem CHAABANI

Dear @N.F. Singh​ ,

To enable interrupt for LPUART1 you need to :

  • Activate LPUART1 under connectivity
  • Enable RNG and LPUART1 interrupts under System Core -> NVIC and set the priority.
  • Then next to NVIC under Code generation you need to enable the Generate IRQ handler and the Call HAL handler.

After that you can generate your code and you will find all the necessary function generated and the interruption configured.

Hope that this solve your issue,

Kind regards,

Houssem

1 reply

Houssem CHAABANI
Houssem CHAABANIBest answer
Visitor II
November 18, 2020

Dear @N.F. Singh​ ,

To enable interrupt for LPUART1 you need to :

  • Activate LPUART1 under connectivity
  • Enable RNG and LPUART1 interrupts under System Core -> NVIC and set the priority.
  • Then next to NVIC under Code generation you need to enable the Generate IRQ handler and the Call HAL handler.

After that you can generate your code and you will find all the necessary function generated and the interruption configured.

Hope that this solve your issue,

Kind regards,

Houssem