Different interrupts from the same port

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

Different interrupts from the same port

Jump to solution
794 Views
gsanchez
Contributor III

Hello. I have the following scenario in a kinetis k60 custom board:

On the same port (for example PTE), 'x' pins configured as inputs (for example for switch buttons).

I configure a component GPIO_LDD in processor expert for those inputs. Of course, for one component, it is only one the OnPortEvent function created. But I want that each input execute a different action. If a configure a different component from every input, I have the error that the Interrupt is already used. So, here is my question: How can my program execute a different action from interrupts that become from the same port but different pins? Or, in the other way, how can I detect the pin (not the port) that generate the interruption?

Additional info: The project is bareboard (by now), and I use Codewarrior v10.2.

Thanks for your help.

PS: English is not my native language.

Labels (1)
1 Solution
411 Views
vfilip
NXP Employee
NXP Employee

Hello,

I would recommend to update to the CW V10.3 and use ExtInt_LDD component instead of GPIO_LDD. It should provide the interface you need.

best regards

Vojtech Filip

Processor Expert Support Team


View solution in original post

2 Replies
412 Views
vfilip
NXP Employee
NXP Employee

Hello,

I would recommend to update to the CW V10.3 and use ExtInt_LDD component instead of GPIO_LDD. It should provide the interface you need.

best regards

Vojtech Filip

Processor Expert Support Team


411 Views
jvasil
Contributor III

Using PEx 10.4, I configured two ExtInt_LDD components using two pins of the same GPIO port.  Both components are auto initialized but are configured to be disabled initially.

When using this configuration, the processor never gets to code after the call to PE_low_level_init() that is made in main() [defined in ProcessorExpert.c].  The system basically seems to hang after calling __set_BASEPRI(CPU_INT_PRIORITY); which effectively enables interrupts.

Further investigation shows that what seems to be happening is that Cpu_ivINT_PORTB() [in Cpu.c] is being called continuously even though

a) both of the ExtInt_LDD components are disabled, and

b) both of the ExtInt_LDD components are configured to interrupt only on an edge.

Cpu_ivINT_PORTB() calls the two service routines (that do nothing since the interrupts are disabled) but I cannot figure out why the PORTB interrupt is being called in the first place.

Any help on how to fix this will be appreciated!!

Thanks,

James

0 Kudos