How to map a ftm interrupt vector function by driver code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to map a ftm interrupt vector function by driver code

ソリューションへジャンプ
1,304件の閲覧回数
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,141件の閲覧回数
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,142件の閲覧回数
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,141件の閲覧回数
jason_zhang
Contributor III

Hi Ping

That make sense!

Thank you very much!

Jason

0 件の賞賛
返信