How to map a ftm interrupt vector function by driver code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to map a ftm interrupt vector function by driver code

Jump to solution
1,272 Views
jason_zhang
Contributor III

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

Labels (1)
0 Kudos
Reply
1 Solution
1,109 Views
jeremyzhou
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,110 Views
jeremyzhou
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

1,109 Views
jason_zhang
Contributor III

Hi Ping

That make sense!

Thank you very much!

Jason

0 Kudos
Reply