Debug Periphral view error??

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

Debug Periphral view error??

776 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ub3r on Wed Feb 13 05:57:16 MST 2013
Hi guys,

Im not sure if im doing something wrong or, or its a bug in the debugger..

Im resetting the timer32b0 TC like so:
LPC_CT32B0->TC = 0;

I add a breakpoint directly after the line of code, and the debugger gives me this: 0x79ac5d9. Much higher than the '0' i expect to see??:confused:

My settings are as follows:
void setTimer0(void){
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<9);  // Enable clock to timer 0 CT32b0

LPC_CT32B0->MR0 = 65000; 
LPC_CT32B0->MR1 = 65000; 

LPC_CT32B0->PR = 14; // 0.2us
LPC_CT32B0->TCR |= (1<<0);  // Enable timer 16-0

// INTERUPT CRAP
NVIC_EnableIRQ(CT32B0_IRQn);}


Anyone else seeing this?? Part is a LPC1345. Thanks in advance.:)
0 Kudos
Reply
2 Replies

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Brutte on Fri Feb 15 04:53:54 MST 2013

Quote: jeffaroo
Does anyone know of a way to halt the Timer while in the debugger?


+1
AFAIK only RIT has this feature in CMx LPC peripherals. And of course SysTick.

Actually I should have asked this question long time ago as this was one of primary reasons I decided to use STM32 (where you have full cotrol over selected timers, counters and encoders in case the core is being halted).
0 Kudos
Reply

768 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jeffaroo on Wed Feb 13 19:09:39 MST 2013
I believe the Timer continues to run while in the debugger (even though the processor is halted). This is a desirable behavior is many cases but not always.

Does anyone know of a way to halt the Timer while in the debugger?
0 Kudos
Reply