Processor Expert Generated Interrupts

cancel
Showing results for 
Search instead for 
Did you mean: 

Processor Expert Generated Interrupts

Jump to solution
936 Views
eduardoumana
Contributor III

I created a KDS Project for the K22F Board. Under "Components" I see there are Interrupts and gpio pins already added. I am trying to toggle the RGB LED with interrupts so I went through I/O and renamed some pins etc... I also enabled an interrupt on rising edge for SW2 as seen in the image below:

16160_16160.jpgInterrupt.JPG.jpg

I expected to see an interrupt service routine function in Events.c to write my code but there isn't any. How can you auto generate this code?

 

As a side question, can anybody point me to a good resource for developing with KDS?

Labels (1)
Tags (3)
0 Kudos
1 Solution
367 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Eduardo:

Your observation is correct. Right now PEx + KSDK does not generate ISR functions. If you open one of the KSDK examples (C:\Freescale\KSDK_1.0.0\demos) you will see that the interrupt functions are declared in a fsl_xxx_irq.c file, where xxx is the module. In your case you need to add or copy the file fsl_gpio_irq.c from (C:\Freescale\KSDK_1.0.0\platform\drivers\gpio) to your project.

By the way, I think this will be improved in the next release of PEx for KSDK and the interrupt handlers will be included automatically in Events.c as you suggested.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
368 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Eduardo:

Your observation is correct. Right now PEx + KSDK does not generate ISR functions. If you open one of the KSDK examples (C:\Freescale\KSDK_1.0.0\demos) you will see that the interrupt functions are declared in a fsl_xxx_irq.c file, where xxx is the module. In your case you need to add or copy the file fsl_gpio_irq.c from (C:\Freescale\KSDK_1.0.0\platform\drivers\gpio) to your project.

By the way, I think this will be improved in the next release of PEx for KSDK and the interrupt handlers will be included automatically in Events.c as you suggested.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
367 Views
bosleymusic_com
Contributor IV

I can't answer the PE question, as I've avoided that like the plague as it just seems like one more layer of abstraction away from the hardware where something could go wrong.

As far as the side question, there's a blog I found and was later also pointed to by one of the freescale employees : MCU on Eclipse | Everything on Eclipse, Microcontrollers and Software

There are lots of entries on various topics, but many related to FRDM, Eclipse, KDS, etc...

There's also the documentation for the SDK API and demo applications in the docs folder of the respective root directories.

0 Kudos