AnsweredAssumed Answered

PININT on port 2 LPC11U68

Question asked by Pavel Hudeček on Jun 20, 2016
Latest reply on Jun 20, 2016 by Pavel Hudeček

Hi,

programming custom board with LPC11U68JBD100.

I initialize PININT on port 0 pins 2 and 20, port 2 pins 2 and 5 using these functions:

 

Chip_GPIO_Init(LPC_GPIO);

Chip_GPIO_SetPinDIRInput(LPC_GPIO, ...

 

Chip_Clock_SetIOCONFiltClockDiv(0, 64);

 

Chip_IOCON_PinMuxSet(LPC_IOCON, ... (IOCON_FUNC0 | IOCON_MODE_PULLUP | IOCON_CLKDIV(0) | IOCON_HYS_EN | IOCON_S_MODE(3))

 

Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_PINT);

 

Chip_SYSCTL_SetPinInterrupt(n, ...

Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH(n));

(n is 0 to 3)

 

NVIC_ClearPendingIRQ(name);

NVIC_EnableIRQ(name);

(names are PIN_INT0_IRQn to PIN_INT3_IRQn)

 

Created four handlers ( PIN_INT0_IRQHandler() ... PIN_INT3_IRQHandler() )

Handlers execute:

 

Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH(int number));

and blink with LEDs.

 

int 0 and 1 (port 0.2 and 0.20) working properly, LEDs blinks after pin pulled low

int 2 and 3 (port 2.2 and 2.5) not working

 

What's wrong?

 

Thanks

Outcomes