Hello,
I'm using a LINK2 to debug a program for chip LPC11U68 on our own PCB. The C program and the debugger software all functioned well yesterday. (I am in the process of trying to get a PIN (1_21) interrupt to work and invoke its interrupt handler ). Some of that code is shown below.
Today, the debug function compiles and loads the program, but the debug window remains empty instead of showing current status, etc. The console window shows "[MCUXpresso Semihosting Telnet console for 'L3M LinkServer Debug' started on port 51600 @ 127.0.0.1]".
The step and run keys and icons do not respond. For example F5 (step into) and F8 (continue) keys do not function. However, control ^ F2 stops the debugger as advertised. When reset, the program in the LPC11U68 runs OK except for the PIN INT code which I would like to debug.
The last thing I was doing before shutting down for the night was to look in the NVIC window in the peripherals window.
Curiously, the GDB debugger functions still seem to operate correctly from the debugger console!
Do I need to reinstall the IDE?
The code that I am having problems with is:
void PIN_INT0_IRQHandler()
{
Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH0);
CycleCount = 1;
} //PIN_INT0_IRQHandler()
//******************
// Phase Pin
Chip_IOCON_PinMuxSet(LPC_IOCON, 1, 21, (IOCON_FUNC0 ));
Chip_GPIO_SetPinDIRInput(LPC_GPIO, 1,21);
Chip_SYSCTL_SetPinInterrupt(0 , 1, 21);
Chip_PININT_EnableIntLow(LPC_PININT, PININTCH0); // Falling edge
Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH0);
NVIC_ClearPendingIRQ(PIN_INT0_IRQn);
then later:
NVIC_EnableIRQ(PIN_INT0_IRQn);
the IRQ handler is never called.
Thanks, jDrum
Solved! Go to Solution.
Thank you @xiangjun_rong
We got the debugger to work again by upgrading to the newest IDE
MCUXpresso IDE v11.8.0 [Build 1165] and then changing the workspace back to the original.
Your suggestion of turning on the sys clock worked as well (with the change of LPC_ prefix).
LPC_SYSCON->SYSAHBCLKCTRL|=(1<<6)|(1<<16)|(1<<19);
Notes: the documentation in "pinint_8c_source.html" from our LPCopen download two years ago does not include this line.
this line.
The example project from the same download would not work without additional hardware on the LPC11U68 test PCB.
Hi,
Firstly, pls restart your PC and load the MCUXPresso tools, then load a simple example for example toggle a LED with GPIO pin, can you debug or not?
This is LPCOpen package for LPC11U68, you can download it:
Regarding your PINT0 configuration, I do not see the code to enable module gated clock for IOCON, GPIO and PINT.
SYSCON->SYSAHBCLKCTRL|=(1<<6)|(1<<16)|(1<<19);
The line enable GPIO, IOCON and PINT gated clock, pls add it before you write register of above modules.
Hope it is helpful
BR
XiangJun Rong
Thank you @xiangjun_rong
We got the debugger to work again by upgrading to the newest IDE
MCUXpresso IDE v11.8.0 [Build 1165] and then changing the workspace back to the original.
Your suggestion of turning on the sys clock worked as well (with the change of LPC_ prefix).
LPC_SYSCON->SYSAHBCLKCTRL|=(1<<6)|(1<<16)|(1<<19);
Notes: the documentation in "pinint_8c_source.html" from our LPCopen download two years ago does not include this line.
this line.
The example project from the same download would not work without additional hardware on the LPC11U68 test PCB.
Hi,
Pls refer to section 4.4.19 System clock control register in UM10732.pdf
Hope it is helpful
BR
XiangJun Rong