Skip to main content
Visitor II
August 17, 2005
Question

ST7Lite29 - internal RC oscillator adjustment

  • August 17, 2005
  • 5 replies
  • 998 views
Posted on August 17, 2005 at 06:09

ST7Lite29 - internal RC oscillator adjustment

    This topic has been closed for replies.

    5 replies

    Visitor II
    July 26, 2005
    Posted on July 26, 2005 at 08:17

    Hi,

    is there anybody who can help me calibrating the internal RC-oscillator of the Lite29? In my approach to the problem I found out a unexplainable phenomenon.

    - The problem:

    According to AN1324 I am trying to calibrate the RC oscillator measuring a defined interval (20ms @ 50Hz) and successive reloading the RCCR.

    --> Sometimes the new values stored at RCCR don't cause any effect, sometimes the result is o.k.

    There is no advancement when I wait for about 100ms (without reset) after each change of RCCR before I take a new sample.

    Restarting the micro after each change brings the assumed effect.

    Any idea??

    Thanks

    WoRo

    Visitor II
    July 26, 2005
    Posted on July 26, 2005 at 10:24

    WoRo,

    the RC oscillator frequency depends not only on RCCR value, but also on temperature, supply voltage, ...

    For this reason a small change may cause no effect (as are the ones that you observed).

    After a reset, the RCCR is set to $FF, i.e. the slowest frequency. Therefore the value you write in RCCR causes a measurable effect.

    If you need more control on RC oscillator, why do not you implement a software PLL: measure the actual frequency, compute the error and adjust accordingly the RCCR. This solution however needs the continuos availability of the reference signal, and I do not know if it fits well in your application.

    Regards,

    EtaPhi

    Visitor II
    July 26, 2005
    Posted on July 26, 2005 at 12:09

    EtaPhi,

    thank you for your answer.

    *******

    ... the RC oscillator frequency depends not only on RCCR value, but also on temperature, supply voltage, ...

    *******

    The fact is, that temperature or supply effects I can surely disregard. Because the timings of both procedures are nearly identical.

    Only, at the faulty one I set RCCR with the new value but don't reset the micro but with the successful procedure I add a reset after each new voting (RCCR is copied to EEPROM_RCCR_5V).

    The time between two samples is about 150ms - in both cases.

    *****

    If you need more control on RC oscillator, why do not you implement a software PLL: measure the actual frequency, compute the error and adjust accordingly the RCCR.

    *****

    Tracing the samples shows me that sometimes there is no change in the frequency when changing RCCR without resetting the micro.

    Furthermore I calibrate my RC in a test control unit and only there I generate the 20ms signal. In my final device there is no such a signal.

    Best regards

    WoRo

    Visitor II
    August 16, 2005
    Posted on August 16, 2005 at 14:41

    Dear Woro,

    About the calibration AN1324, I met some problems which I can not explain.

    I use this application every hour , and sometimes the micro stucks. Do you have the same problem?

    So I used another application which I developped.

    Regards

    Mustapha

    Visitor II
    August 17, 2005
    Posted on August 17, 2005 at 06:09

    Hi Mustapha,

    seems so!

    I can't explain the effect, that sometimes setting a new value to the RCCR does not change the frequency. Only, each time when I set RCCR after a reset the new value has been taken into account.

    But the micro didn't stuck at all...

    By the way: Where are the :o ST application engineers or our :o Moderator helping us with solving our/their problems!!

    Where can we find information about known malfunctions?

    Best Regards

    WoRo