1
\$\begingroup\$

I'm using the STM32F405xx/407xx architectures, which is a Cortex-M4.

The online documentation and tutorials on this subject are overwhelmingly HAL-based. I am converting a project over from another uC architecture and would like to know how to set my function as interrupt service routine, assign the IRQ a priority, and clear its associated interrupt mask bit so that it is ready to handle timer update interrupt events.

Do I just write an address into the vector table itself? Would I follow that with a NVIC_SetPriority() and NVIC_EnableIRQ() call?

\$\endgroup\$
0

2 Answers 2

4
\$\begingroup\$

If you use the standard startup code, it defines the vector names. So you write a standard C function with the vector name and that will be the IRQ handler. The HAL just provides the handler for you if you use it.

\$\endgroup\$
0
\$\begingroup\$

You can edit the startup code assembly file. For example, startup_stm32f103xb.s has both a vector table "call site" and a symbol defined for TIM2_IRQHandler. That can be renamed to something else if you aren't using HAL to manage that timer peripheral.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.