6 years, 2 months ago.

problem in the interrupt routine

Hi,

I always get stuck with the problem that when I use more than 5 inputs, the mbed gets stuck in the routine I wrote for the Interrupt pin. If I put // for 1 of the pin declarations, it goes through the Interrupt routine without any problem.

I use a mbed nxp lpc11u24 and an LCD that I control with the KS0108 library.

Working:

DigitalIn DOWN_BUTTON_PIN(p19);
//DigitalIn UP_BUTTON_PIN(p23);
DigitalIn LEFT_BUTTON_PIN(p7);
DigitalIn RIGHT_BUTTON_PIN(p30);
DigitalIn COUNT_CONTACT_PIN(p20);
InterruptIn TurnContact(p18);

Not working:

DigitalIn DOWN_BUTTON_PIN(p19);
DigitalIn UP_BUTTON_PIN(p23);
DigitalIn LEFT_BUTTON_PIN(p7);
DigitalIn RIGHT_BUTTON_PIN(p30);
DigitalIn COUNT_CONTACT_PIN(p20);
InterruptIn TurnContact(p18);

The code for the interrupt routine would probably help.

posted by Andy A 21 Sep 2018

+1 Andy

Jonas, without more details, there is not much we can help with. Try to provide as much details as possible

posted by Martin Kojtal 24 Sep 2018
Be the first to answer this question.