Author Topic: enable_irq(INT_FTM0-16)  (Read 8248 times)

Offline internship2

  • Newbie
  • *
  • Posts: 11
    • View Profile
enable_irq(INT_FTM0-16)
« on: March 06, 2013, 02:18:45 PM »
Hi
I am trying to do this operating
enable_irq(INT_FTM0-16)
but i need to find a other way to do it, some one there now a way?


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3237
    • View Profile
    • uTasker
Re: enable_irq(INT_FTM0-16)
« Reply #1 on: March 06, 2013, 02:42:51 PM »
Hi

Check out the routine:

static void fnEnterInterrupt(int iInterruptID, unsigned char ucPriority, void (*InterruptFunc)(void))

in kinetis.c

Typical use:
fnEnterInterrupt(irq_ETH_RX_ID, PRIORITY_EMAC, _fec_rx_frame_isr);

IDs to be used with FTM modules are

irq_FTM0_ID, irq_FTM1_ID and irq_FTM3_ID

Regards

Mark

P.S. If you call the function from outside of kinetis.c you will need to make it extern and add a prototype for it


Offline internship2

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: enable_irq(INT_FTM0-16)
« Reply #2 on: March 07, 2013, 09:02:25 AM »
Hi Mark
I think this giving me some problems. I am having the interrupt outside the kinetis.c. I am making a prototype:
extern void fnEnterInterrupt(int, int, void (*InterruptFunc)(void)); and put it to timer.h, then i check that there is a connection to kinetis.c, and it is working. I am using the function in timer.c, in the end off my timer configuration. The compiler is getting a error saying, undefined: "fnEnterInterrupt"
i have be trying to define the variables in the prototype but it still get error ?


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3237
    • View Profile
    • uTasker
Re: enable_irq(INT_FTM0-16)
« Reply #3 on: March 07, 2013, 01:50:53 PM »
Hi

Make sure that the function in kinets.c has been changed from static to extern

Regards

Mark