I'm trying to write a bare metal ISR; however I can't find any of the IRQ files in the SDK for the TWR-K21F120M. I have been using this document attached below to set up the ISR, but the path that they show in 4.1 isn't the same. Is there another path that I should be using?
Hi Brent,
Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.
I was wondering if you can tell me what exactly version of the KSDK you use, as the current version is V2.0.
The interrupt handling with KSDK and Kinetis Design Studio file is suit for both KSKD V 1.2 and V 1.3.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Brent,
Regarding to the KSDK V2.0, for instance, you can set up the PIT interrupt function PIT_LED_HANDLER() in following.
#define PIT_LED_HANDLER PIT0_IRQHandler
#define PIT_IRQ_ID PIT0_IRQn
void PIT_LED_HANDLER(void)
{
/* Clear interrupt flag.*/
PIT_ClearStatusFlags(PIT, kPIT_Chnl_0, PIT_TFLG_TIF_MASK);
pitIsrFlag = true;
}
vodi main()
{
~~~~~
/* Enable at the NVIC */ | |
EnableIRQ(PIT_IRQ_ID); |
~~~~~
}
And the PIT0_IRQn and PIT0_IRQHander are defined in MKxx.h and startup_MKxx.s respectively.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
yeah... that wasn't what I was looking for. In the PDF at the section I mentioned there is a file path to the IRQ files however I don't have the same path on my files (these files were generated the normal way. I didn't do any special pathing) is there something wrong with the PDF?
Hi Brent,
The architecture of the KSDK v2.0 has changed a lot, versus the KSDK v1.2 and v1.3.
So the IRQ file is not exist in the KSDK v2.0.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------