Hello all.
I am creating a project without PE or KSDK.
Just created a project to KL25 Microcontroller and start to code.
now i am trying to configure the NVIC and what i could see is that there is no reference to it
in the MKL25z4.h rev 2.5. I am using the KDS 3.0 but when i create a project with pe they are using rev 1.8 and there it is all the definitions.
If it is not a bug do i have to define everything from scratch?
** Reference manual: KL25P80M48SF0RM, Rev.3, Sep 2012
** Version: rev. 2.5, 2015-02-19
** Build: b150220
Solved! Go to Solution.
Hello ,
In fact, do you use PE or not ?
(1) If you use PE, please add your interrupt code to the "Events.c" file .
For example, the component "TimerInt_LDD" , after generate code , we can see :
.
(2) If your project without PE,
you need write a function : void PIT_IRQHandler () {} , then add your interrupt code into it.
And if you want change the name of interrupt function , you need change the two place you mentioned.
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi i have already found a way to enable NVIC.
NVIC_EnableIRQ(PIT_IRQn); using the #include <core_cm0plus.h>
I know that using PE i could make the program works fast. but as i came from 8 bits microcontrollers. first i have to understand what i am doing.
Ok now i have this file startup_MKL25Z4.s
where the i have some definitions to vector.
How can i ovewrite for example the PIT_IRQHandler to my function. I can see it is defined in the first .long and after i think it is informed to compiler to rout this interrupt to the default interrupt i think.
Any help would be valuable.
.long PIT_IRQHandler /* PIT interrupt*/
def_irq_handler PIT_IRQHandler
Hello ,
In fact, do you use PE or not ?
(1) If you use PE, please add your interrupt code to the "Events.c" file .
For example, the component "TimerInt_LDD" , after generate code , we can see :
.
(2) If your project without PE,
you need write a function : void PIT_IRQHandler () {} , then add your interrupt code into it.
And if you want change the name of interrupt function , you need change the two place you mentioned.
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------