2018-03-13 05:06 PM
Hi, I'm following a TI tutorial where the author is creating a Init Vector to determine which exception and interrupts are able to that program...
He's basically creating an array of pointers to int and pass function pointers.
I know that the microcontroller in that TI board is the same than the STM32F4 (Arm cortex M4).
I did a overview of the manual and I couldn't figure out how to set your own Vector.
Here you call it Interrupt Vector but, it's equal to their Init Vector...
The memory of this vector starts at 0x0000.
I just need some guidance or example to set this vector in my STM32F4
Thanks in advance.
#stm32f4Solved! Go to Solution.
2018-03-14 01:25 PM
Thanks Neil!
2023-12-23 02:16 AM
Hello Carlos,
I'm very new to MC dev myself and I've just start working on them. I suspect you were following Miro Samek tutorial. I'm following that myself. I want to override the default interrupt handler for SysTICK interrupt. This is what i could find in start up code in startup_stm32f401xx.s:
PUBWEAK SysTick_Handler
SECTION .text:CODE:REORDER:NOROOT(1)
SysTick_Handler
B SysTick_Handler
How and where do I override this handler to do my own defined activities (such as glowing an LED) when ISR is hit?
I am using an STM32F410RE on a nucleo board
. @Andrew Neil @Carlos Hernandez @David SIORPAES . Would really appreciate some help on this.
2024-01-10 07:21 AM
The key is in the "weak" in "PUBWEAK"
The "weak" means, "here is a definition of this symbol, but any other definition will override it"
So all you have to do is to provide your own definition of SysTick_Handler; ie, just define a function with the name SysTick_Handler.
eg, the HAL will automatically create one in the stm32xxxxx_it.c file:
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}