AnsweredAssumed Answered

LPC1347 group pin int problem

Question asked by lu bo on Aug 2, 2016
Latest reply on Aug 3, 2016 by soledad

Hi,

I have push buttons connected to ground on pins PIO0_1, PIO0_3 and PIO0_11. I want to use GROUP INTs on all three pins. If I use only 1 and 3 - it works! But if I include 11 - it doesn't.

 

Any help or ideas are appreciated! (tried software polling - everything is OK, they work, no hardware problems)

 

Regards,

L. B.

===========================================================================

#include "board.h"

#include "uart.h"

 

void GINT0_IRQHandler(void)

{

    Chip_GPIOGP_ClearIntStatus(LPC_GPIO_GROUP_INT0, 0);

    DEBUGOUT("INT\n\r");

}

 

int main(void)

{

    SystemCoreClockUpdate();

 

    Board_Init();

 

    init_uart();

 

    DEBUGOUT("Starting ...\n\r");

 

    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 1, IOCON_FUNC0 | IOCON_MODE_PULLUP);

    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 3, IOCON_FUNC0 | IOCON_MODE_PULLUP);

    Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 11, IOCON_FUNC1 | IOCON_MODE_PULLUP);

  

 

    Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 1);

    Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 3);

    Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 11);

 

 

    Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_GROUP0INT);

 

    Chip_GPIOGP_SelectLowLevel(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 1);

    Chip_GPIOGP_SelectLowLevel(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 3);

    Chip_GPIOGP_SelectLowLevel(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 11);

 

 

    Chip_GPIOGP_EnableGroupPins(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 1);

    Chip_GPIOGP_EnableGroupPins(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 3);

    Chip_GPIOGP_EnableGroupPins(LPC_GPIO_GROUP_INT0, 0, 0, 1 << 11);

 

 

    Chip_GPIOGP_SelectOrMode(LPC_GPIO_GROUP_INT0, 0);

    Chip_GPIOGP_SelectEdgeMode(LPC_GPIO_GROUP_INT0, 0);

 

    NVIC_EnableIRQ(GINT0_IRQn);

 

    while (1) {    }

 

    return 0;

}

Outcomes