2005-08-16 09:09 PM
ST7Lite29 - internal RC oscillator adjustment
2005-07-25 11:17 PM
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 WoRo2005-07-26 01:24 AM
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, EtaPhi2005-07-26 03:09 AM
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 WoRo2005-08-16 05:41 AM
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 Mustapha2005-08-16 09:09 PM
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