Unable to program GPIO pins on ngx xplorer with blinky example

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

Unable to program GPIO pins on ngx xplorer with blinky example

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by verybadalloc on Mon Mar 07 20:49:34 MST 2016
Hello there,

I am having a very basic issue with the NGX Xplorer 4330, whereby I am unable to program any pin other than the LED ones. I know that I can control the LED pins because I am connecting it to an oscilloscope, and I can see the voltage levels toggling.
I am using Xplorer 8.0, with an LPC Link 2 for programmer.
Here is the code I am using:

#include "board.h"
#include <stdio.h>

const uint32_t ExtRateIn = 0;
const uint32_t OscRateIn = 12000000;

#define TICKRATE_HZ1 (1000)/* 10 ticks per second */

void SysTick_Handler(void) {
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 0, 1, state);
Chip_GPIO_SetPinState(LPC_GPIO_PORT, 1, 12, state);
state = !state;
}

int main(void)
{
SystemCoreClockUpdate();
Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 1, 12);
Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 0, 1);

/* Enable and setup SysTick Timer at a periodic rate */
SysTick_Config(SystemCoreClock / TICKRATE_HZ1);

while (1) {
__WFI();
}
return 0;
}


As you can see, the same logic is applied to both the LED pin (GPIO1[12]), and that of GPIO0[1] (I took this pin randomly, none of the other pins work either),

Is there anything that I am missing in my setup that would explain why I can't write to this pin? Any help would be greatly appreciated.

Thank you!
Labels (1)
0 Kudos
Reply
2 Replies

449 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Fri Mar 11 06:41:50 MST 2016
Do you configure the pins used by GPIO1[12] and GPIO0[1] in the same way as the pins which are used for the LEDs?

Look for Chip_IOCON_PinMux(...) or Chip_IOCON_SetPinMuxing(...).

Maybe these two pins (P0_1 and P2-12) are not set to GPIO function. In this case your GPIO configuration is useless, because the multiplexer just in front of the pin is set to another function.

Regards,
NXP Support Team
0 Kudos
Reply