cancel
Showing results for 
Search instead for 
Did you mean: 

Real USART2 INT number

ilde
Associate
Posted on May 30, 2018 at 21:44

USART2 INT number # 26 instead of #

I'm building a new project that involve FreRTOS and USART2, when enabling the interruption for the USART2, (Configuration-> USART2 configuration->NVIC Settings) the application shows USART2 Global Interrupt / USART2 wake-up interrupt through EXTI line

i'm missing something here? the real int number for USART2 is not 28?

the code is generated with int number 28, reference manual andstm32l051xx.h point to .

here is about the environment:

STM32CubeMx 4.25, STM32Cube V1.0,Atollic TrueSTUDIO® for STM32, Built on Eclipse Neon.1a.,Version: 9.0.0,Build id: 20180117-1023

5 REPLIES 5
Tilen MAJERLE
ST Employee
Posted on May 30, 2018 at 21:58

Hello,

for NVIC, value 28 is index where interrupt is served. Before that, there is EXTI part of STM32 and it is mapped to 26 in this block.

Which MCU part number do you use?

Best regards,

Tilen

ilde
Associate
Posted on May 30, 2018 at 22:13

Thanks for the info, i'm using an ST32L051C8T3..

Posted on May 30, 2018 at 22:22

 ,

 ,

Tilen,

If interrupt ♯ 28 is the EXTI26 interrupt, which is presumably tied to the USART2's wakeup facility (i.e. USART_ISR.WUF), what's the interrupt number of the USART2, ie. the other USART_ISR flags?

Thanks,

JW

Posted on May 30, 2018 at 23:35

Hello Jan,

♯ 28 is for USART. This one is also served via EXTI to allow MCU wakeup from low-power modes. Similar to RTC.

RM0377, Table 53.

Best regards,

Tilen

Posted on May 31, 2018 at 10:06

Tilen,

Does this mean that output from EXTI26 and the 'cumulated' output from the USART2 interrupts are ORed before entering NVIC as interrupt 28?

This is not entirely clear from the RM - 'USART2 global interrupt through EXTI26' from Tab.52 to me says that *all* USART2 interrupts go through EXTI26 (i.e. that EXTI26 would need to be enabled in EXTI for *any* USART2 interrupt to work), which is IMO not the case.

The RM IMO needs clarification in this regard.

RTC is different from USART in that *all* its interrupts go through EXTI (at least that's what the RM appears to say).

Jan