Sir Ferdek 8 Posted April 11, 2012 Share Posted April 11, 2012 Snippet: //... //DCO 1MHz if(CALDCO_1MHZ == 0xFF || CALBC1_1MHZ == 0xFF){ P1OUT |= BIT0; while(true); } else { BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; } //... BCSCTL1 = 0x8F; Can anyone reasonably explain to me why setting all bits of RSELx stops DCO in this configuration? I've found this when implementing random number generator based on drift of VLO and DCO clocks. It took me 3 hours to finally figure out that it was crashing my almost finished app . Thx in advance. Quote Link to post Share on other sites
RobG 1,892 Posted April 11, 2012 Share Posted April 11, 2012 See errata page 3. Function Switching RSEL can cause DCO dead time Description After switching RSELx bits (located in register BCSCTL1) from a value of >13 to a value of <12 OR from a value of <12 to a value of >13, the resulting clock delivered by the DCO can stop before the new clock frequency is applied. This dead time is approximately 20 ms. In some instances, the DCO may completely stop, requiring a power cycle. Workaround Sir Ferdek 1 Quote Link to post Share on other sites
Sir Ferdek 8 Posted April 11, 2012 Author Share Posted April 11, 2012 Just after reading your post I've realized I was reading it some time ago, but it seemed to me I won't be using any other frequency settings than precalibrated... Yeah, right. Thank you. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.