Content originally posted in LPCWare by ezharkov on Sat Nov 15 17:05:50 MST 2014
Thanks Paul. Your reply made me to review my calculations. I think I understand what the problem was. I was trying to measure the startup time of the main oscillator (at the initial power-up; no deep sleep or power downs are involved (yet)). 4096 cycles for a 12 MHz crystal should take ~341 microseconds. But I was seeing significantly shorter times. Or so I thought. I was using one of the timers for that, but forgot that upon reset timers run at CCLK/4 by default. Therefore, my 570 IRC cycles are really 570 microseconds (and not 570/4 as I thought). Therefore, everything seems to make sense now. (I assume that the difference, 570-341=229 microseconds, is the oscillator start time (i.e., time before the first cycle))
Thanks,
Eugene