Loss of debug functions within MCUXpresso IDE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Loss of debug functions within MCUXpresso IDE

跳至解决方案
759 次查看
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

 

 

标签 (1)
0 项奖励
1 解答
698 次查看
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 项奖励
4 回复数
709 次查看
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 项奖励
699 次查看
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 项奖励
685 次查看
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 项奖励
662 次查看
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 项奖励