How to map a ftm interrupt vector function by driver code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to map a ftm interrupt vector function by driver code

跳至解决方案
1,276 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,113 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
1,114 次查看
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,113 次查看
jason_zhang
Contributor III

Hi Ping

That make sense!

Thank you very much!

Jason

0 项奖励
回复