cancel
Showing results for 
Search instead for 
Did you mean: 

where is address of usart interrupts?

hosseinam1370
Associate II

I want to know when USART interrupts, such as the completion of data reception, occur, to which address does the processor refer? I searched the manual reference but couldn't find this address. The addresses for all interrupts are in the Nested Vectored Interrupt Controller, but I can't locate the address for the completion of USART data interrupt.

 

 

What I mean is, where does the compiler know these addresses from, or which header file are these addresses coming from? And when interrupts occur, how does it direct to those addresses?

 

stm32CUBIDE
HAL library
stm32f030

1 ACCEPTED SOLUTION

Accepted Solutions

Read NVIC chapter in Programming Manual for Cortex-M0.

At 0x0000'0000, there's a Vector Table containing vectors (addresses) of every Interrupt service routine (ISR). By default the FLASH is mapped also at 0x0000'0000, so the table should be at the beginning of FLASH. In translator, it's usually located in the startup file, https://github.com/STMicroelectronics/cmsis_device_f0/blob/07ef49138cfcc1f71e13a76e01e100209469c3ae/Source/Templates/gcc/startup_stm32f030x6.s#L112

JW

View solution in original post

3 REPLIES 3

Read NVIC chapter in Programming Manual for Cortex-M0.

At 0x0000'0000, there's a Vector Table containing vectors (addresses) of every Interrupt service routine (ISR). By default the FLASH is mapped also at 0x0000'0000, so the table should be at the beginning of FLASH. In translator, it's usually located in the startup file, https://github.com/STMicroelectronics/cmsis_device_f0/blob/07ef49138cfcc1f71e13a76e01e100209469c3ae/Source/Templates/gcc/startup_stm32f030x6.s#L112

JW

hosseinam1370
Associate II

Thank you for your response.

In the link you provided, I found the address for USART1_IRQHandler, where the processor goes to execute the code when the interrupt occurs. However, I couldn't locate the address for the interrupt function HAL_UART_RxCpltCallback. This function should be called when data is received, and the receive data interrupt occurs. I want the processor to go to that address and execute our written code.

My point is that in AVR, there was a specific memory and address for sending and receiving interrupt data, but in STM32, I cannot find this address. Is the mechanism for processing interrupts different?

TDK
Guru

HAL_UART_RxCpltCallback isn't an IRQ Handler. It is called from HAL.

The call stack goes like this:

USART1_IRQHandler -> HAL_UART_IQRHandler -> HAL_UART_RxCpltCallback

If you feel a post has answered your question, please click "Accept as Solution".