Loss of debug functions within MCUXpresso IDE

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

Loss of debug functions within MCUXpresso IDE

Jump to solution
728 Views
jDrum
Contributor III

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

 

 

Labels (1)
0 Kudos
1 Solution
667 Views
jDrum
Contributor III

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.

The user guide for the LPC11U68 chip also does not mention it.  We have not yet located the chip data sheet.
 
Problem solved.
jDrum

 

 

View solution in original post

0 Kudos
4 Replies
678 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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:

https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/lpcopen-libr...

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

 

0 Kudos
668 Views
jDrum
Contributor III

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.

The user guide for the LPC11U68 chip also does not mention it.  We have not yet located the chip data sheet.
 
Problem solved.
jDrum

 

 

0 Kudos
654 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to section 4.4.19 System clock control register in UM10732.pdf

xiangjun_rong_0-1693278919378.png

Hope it is helpful

BR

XiangJun Rong

0 Kudos
631 Views
jDrum
Contributor III
Thanks for the reference.
We have previously used this clock for I2C and UART and possibly for Flash. I plan to look at a general ARM manual to see if I can finally figure out how the LPC clocks work. Very complex.
jDrum
0 Kudos