cancel
Showing results for 
Search instead for 
Did you mean: 

UBEMX generated EXTI IRQ handler with wrong symbolC

FColl.1
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @FColl.1​ , @Zaher​ ,

This issue is fixed from CubeMX v6.5.0.

Sara.

View solution in original post

5 REPLIES 5
TDK
Guru
FColl.1
Associate III

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

Zaher
Senior II

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.

Hello @FColl.1​ , @Zaher​ ,

This issue is fixed from CubeMX v6.5.0.

Sara.

Hello @Sara BEN HADJ YAHYA​ ,

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

Rgs,

Zaher