bug in timer_11xx.c

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

bug in timer_11xx.c

318 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kutu on Thu May 23 04:35:37 MST 2013

I had been trying to use the second 32bit timer on a LPC11C24 for the whole previous day but hadn't been to able to succeed. Finally, I' ve noticed that there was a small bug which prevented the clock from being activated. As you see, following function will never return with the clock for the CT32B1. First "else if" block must be updated with LPC_TIMER32_1 and SYSCTL_CLOCK_CT32B1 symbols.


/* Returns the clock from the speicifc timer base address */


static CHIP_SYSCTL_CLOCK_T Chip_Timer_GetClock(LPC_TIMER_T *pTMR) { CHIP_SYSCTL_CLOCK_T clk;


if (pTMR == LPC_TIMER32_0) { clk = SYSCTL_CLOCK_CT32B0; }


else if (pTMR == LPC_TIMER32_0) { clk = SYSCTL_CLOCK_CT32B0; }


else if (pTMR == LPC_TIMER16_0) { clk = SYSCTL_CLOCK_CT16B0; }


else { clk = SYSCTL_CLOCK_CT16B1; }


return clk;


}


Cheers,


Utku Genc

Labels (1)
0 Kudos
2 Replies

285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Jun 03 10:15:00 MST 2013

Yes, this is a bug (ehh - cut and paste?). Someone submitted a tracker issue @ http://www.lpcware.com/content/bugtrackerissue/lpc11xx-timer-initialization-issue


This will be fixed in the next release and the issue has been listed in the known issue lsit for the v1.03 release @ http://www.lpcware.com/content/page/lpcopen-releases-and-versioning-information

0 Kudos

285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andyyau on Wed May 29 16:31:08 MST 2013

This is defintely a bug.

0 Kudos