Hi,
By PE the ftm interrupt event code can write in the function of below.
How can I make such a funtion in the driver code(without PE) that attached.
Thanks!
MCU :KEAZ128
/*
** ===================================================================
** Event : Timer_OnInterrupt (module Events)
**
** Component : Timer [FreeCntr]
*/
/*!
** @brief
** This event is called when a compare matches the counter
** value (if compare or reload is selected as a interrupt
** source) or a counter overflows (for free-running devices).
** It is valid only when the component is enabled - <"Enable">
** and the events are enabled - <"EnableEvent">. The event is
** available only if <Interrupt service/event> is enabled.
*/
/* ===================================================================*/
void Timer_OnInterrupt(void)
{
/* Write your code here ... */
system_clock_Acc++;
}
Jason
Original Attachment has been moved to: ftm.c.zip
Original Attachment has been moved to: ftm.h.zip
Solved! Go to Solution.
Hi Jason,
First of all, you should find the interrupt vector, then define the interrupt function and link the function to the corresponding interrupt vector.
I'd highly recommend that you can refer to the FRDM-KEXX Driver Library Package 1.2.1 which include the CW demos for details.
And you can download the driver through the link as below.
https://cache.nxp.com/files/microcontrollers/software/device_drivers/KEXX_DRIVERS_V1.2.1_DEVD.zip
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jason,
First of all, you should find the interrupt vector, then define the interrupt function and link the function to the corresponding interrupt vector.
I'd highly recommend that you can refer to the FRDM-KEXX Driver Library Package 1.2.1 which include the CW demos for details.
And you can download the driver through the link as below.
https://cache.nxp.com/files/microcontrollers/software/device_drivers/KEXX_DRIVERS_V1.2.1_DEVD.zip
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ping
That make sense!
Thank you very much!
Jason