This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is this right? (NVIC Interrupts)

Hello everyone, i'm working on NVIC, i need enable the TIMER2 IRQ, but without CMSIS HAL, just native C code, so i have got this:

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

As you can see, first i enable the IRQ on NVIC_ISER0 (IRQ28 = TMR2 so my register is NIVC_ISER0, isn''t it? after that, i clear interrupts, and I copy to vector table just the function what i want! (0xb0 is the offset into the vector table where the TIMER2 is from)

What's wrong on this?

the function TIMER2_IRQHandle should be pointing to the TIMR2 Vector addres really? i trie to turn on LED (timer is is configured) but it doesn't work

Thanks

UPDATE:

I just try this:

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

i figured out how to enter in privileged mode, just doin SVC (supervisor call), after that i try to write NVIC_ISER0 the 28 bit, and READ the IABR so that to know whether the IRQ's active or no, if is, turn on the LED, but it doesn't work yet :(, the LED doesn't turn on. therefore it is not activeted! why?¿ any idea?

0