Hi all, I have got a problem here with switch the SMCLK source from LFXTCLK to DCO. I am using a msp430f1121 controller and use timerA and CCR1 to create a 10ms timeinterval. The processor is running with a 4MHz crystal connected to LFXTCLK in high frequency mode. Every tick I toggle the P1.1 output pin. After startup, a 50 Hz signal is on P1.1. (period of 2*10ms = 20ms) The nmi oscillator fault detection is enabled. When an oscillator fault occurs a non maskable interrupt is generated. In the ISR I switch the clock source from LFXTCLK to DCO because otherwise I loose my system tick. The problem is that the SMCLK is not always switched to DCO. The oscillator fault is detected and the nmi interrupt occurs as it should, but the SMCLK seems to be stucked on the LFXTCLK. Can someone help me? Thanks! Sipke
switching SMCLK source from LFXTCLK to DCO
Started by ●September 23, 2003
Reply by ●September 23, 20032003-09-23
Try turning the crystal off, this should automatically engage DCO as the SMCLK source. Then use conventional crystal start up procedures to recover the clock. What concerns me more is why you are losing clock sync? Except where I force this to happen, by overclocking at temperature extremes or other non-desirable conditions I have never logged a spontaneous clock oscillator fault. Al
Reply by ●September 24, 20032003-09-24
Thank you for info. I forced an oscillator fault by removing (!) the crystal during operation ... Sipke >>> onestone <onestone@ones...> 09/23 4:36 PM >>> Try turning the crystal off, this should automatically engage DCO as the SMCLK source. Then use conventional crystal start up procedures to recover the clock. What concerns me more is why you are losing clock sync? Except where I force this to happen, by overclocking at temperature extremes or other non-desirable conditions I have never logged a spontaneous clock oscillator fault. Al . ">http://docs.yahoo.com/info/terms/
Reply by ●September 24, 20032003-09-24
That'll do it! ;@}
Wow! and I thought I did some extreme things. Seriously I'd guess that
in removing it you may also have not cleanly disconnected the crystal.
Al
Sipke de Leeuw wrote:
> Thank you for info.
> I forced an oscillator fault by removing (!) the crystal during
> operation ...
>
> Sipke
>
>
>>>>onestone <onestone@ones...> 09/23 4:36 PM >>>
>
> Try turning the crystal off, this should automatically engage DCO as the
> SMCLK source. Then use conventional crystal start up procedures to
> recover the clock. What concerns me more is why you are losing clock
> sync? Except where I force this to happen, by overclocking at
> temperature extremes or other non-desirable conditions I have never
> logged a spontaneous clock oscillator fault.
>
> Al
>
>
>
>
>
> .
>
>
>
> ">http://docs.yahoo.com/info/terms/
>
>
>
>
>
> .
>
>
>
> ">http://docs.yahoo.com/info/terms/
>
>
>
Reply by ●September 24, 20032003-09-24
Hmmm, I agree. But removing the crystal should be detected by the msp430. Ans it is detected because the MCLK switched to DCO, but the SMCLK stayed on LFXT1. But I don't think that removing the crystal is that extreme. When a crystal stops operating, it can be the same effect as removing it ... Sipke >>> onestone <onestone@ones...> 09/24 12:19 PM >>> That'll do it! ;@} Wow! and I thought I did some extreme things. Seriously I'd guess that in removing it you may also have not cleanly disconnected the crystal. Al Sipke de Leeuw wrote: > Thank you for info. > I forced an oscillator fault by removing (!) the crystal during > operation ... > > Sipke > > >>>>onestone <onestone@ones...> 09/23 4:36 PM >>> > > Try turning the crystal off, this should automatically engage DCO as the > SMCLK source. Then use conventional crystal start up procedures to > recover the clock. What concerns me more is why you are losing clock > sync? Except where I force this to happen, by overclocking at > temperature extremes or other non-desirable conditions I have never > logged a spontaneous clock oscillator fault. > > Al > > > > > > . > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > . > > > > ">http://docs.yahoo.com/info/terms/ > > > . ">http://docs.yahoo.com/info/terms/
Reply by ●September 24, 20032003-09-24
Sipke de Leeuw wrote: > Hmmm, I agree. But removing the crystal should be detected by the msp430. > Ans it is detected because the MCLK switched to DCO, but the SMCLK > stayed on LFXT1. > > But I don't think that removing the crystal is that extreme. When a crystal > stops operating, it can be the same effect as removing it ... I would expect it to die instantly, and peacefully, or instantly and violently, not to basically bounce the connection. That unclean disconnection won't help in any way. Al > > Sipke > > > > >>>>onestone <onestone@ones...> 09/24 12:19 PM >>> > > That'll do it! ;@} > > Wow! and I thought I did some extreme things. Seriously I'd guess that > in removing it you may also have not cleanly disconnected the crystal. > > Al > > Sipke de Leeuw wrote: > > >>Thank you for info. >>I forced an oscillator fault by removing (!) the crystal during >>operation ... >> >>Sipke >> >> >> >>>>>onestone <onestone@ones...> 09/23 4:36 PM >>> >> >>Try turning the crystal off, this should automatically engage DCO as the >>SMCLK source. Then use conventional crystal start up procedures to >>recover the clock. What concerns me more is why you are losing clock >>sync? Except where I force this to happen, by overclocking at >>temperature extremes or other non-desirable conditions I have never >>logged a spontaneous clock oscillator fault. >> >>Al >> >> >> >> >> >>. >> >> >> >>">http://docs.yahoo.com/info/terms/ >> >> >> >> >> >>. >> >> >> >>">http://docs.yahoo.com/info/terms/ >> >> >> > > > > > . > > > > ">http://docs.yahoo.com/info/terms/ > > > > > > . > > > > ">http://docs.yahoo.com/info/terms/ > > >