Skip to main content
FColl.1
Associate III
February 17, 2022
Solved

UBEMX generated EXTI IRQ handler with wrong symbolC

  • February 17, 2022
  • 2 replies
  • 1437 views

I have two gpios enabled one as an output another as a interrupt input. PA11 and PI11 respectively. There are two pin defines generated by CUBEMX, for argument call them MYPINA_Pin and MYPINB_Pin respectively.

For the interrupt handler CUBE generates code like this...

void EXTI15_10_IRQHandler(void)
{
 /* USER CODE BEGIN EXTI15_10_IRQn 0 */
 /* USER CODE END EXTI15_10_IRQn 0 */
 HAL_GPIO_EXTI_IRQHandler(MYPINA_Pin);
}

While this results in correct machine code because MYPINA_Pin == MYPINB_Pin, it is quite alarming and reduces my confidence in CUBEMX. Not to mention confusing. If I want to track down some code and I search for MYPINB_Pin I will not find the interrupt handler.

Has anyone else seen this and/or reported it to ST?

This topic has been closed for replies.
Best answer by Sara BEN HADJ YAHYA

Hello @FColl.1​ , @Zaher​ ,

This issue is fixed from CubeMX v6.5.0.

Sara.

2 replies

TDK
Super User
February 18, 2022
FColl.1
FColl.1Author
Associate III
February 18, 2022

Thanks for that. It is a hard issue to come up with a good search query string!

Zaher
Senior II
July 12, 2022

Oh yeah, I've been struggling with interrupts on STM32L552ZE since yesterday. I just figured out that the EXTI handlers generated from STM32CubeMX 6.4.0 had wrong GPIO Pin names. I just replaced the names for the EXTI handlers to get interrupts working.

One more thing to add, the edge detector didn't detect the interrupt when the signal goes through line driver buffer. I used the buffer as a 5v <> 3v translator, along with a 16-bit bus transceiver. I wanted to ensure complete bus isolation on a given device while reading/writing another one that shares the same bus/IO. signals. I had to use a jumper wire and assign a different EXTI for direct connection between the external interrupt signal and the STM32.

Sara BEN HADJ YAHYA
Technical Moderator
July 12, 2022

Hello @FColl.1​ , @Zaher​ ,

This issue is fixed from CubeMX v6.5.0.

Sara.

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.
Zaher
Senior II
July 12, 2022

Hello @Sara BEN HADJ YAHYA​ ,

Thank you very much for letting me know. I will update CubeMX pretty soon!

Rgs,

Zaher