Hi,
All documentation I have consulted about 'S08 5.5V Series - ICS trimming' indicates that 'Trim Resolution' is :
+/-0.2% typ. of untrimmed frequency (8bit, SCFTRIM not in use)
+/-0.1% typ. of untrimmed frequency (9 bit, SCFTRIM in use)
But S08PA16 Reference Manual, pag. 186, 'Example 8.3.1.1', says :
TRIM_VALUE_39K0625HZ; /* FLL output 20MHz, TRIM_VALUE_39K0625HZ is ~0x50 typically
TRIM_VALUE_31K25HZ; /* FLL output 16MHz, TRIM_VALUE_31K25HZ is ~0x90 typically */
With these data, and assuming untrimmed frequency = 36kHz typ., I can calculate :
(39.0625 kHz - 31.25 kHz)
-----------------------------------
(0x50 - 0x90)
------------------------------------------- x100 = 0.34% typ of untrimmed frequency (8 bit)
36 kHz
This calculated 0.34% is slightly worse than the specified 0.2%.
Am I correct ? Is datasheet wrong ?
Thank you very much for your assistance
JoseAntonio Berruezo
Hello Jose,
Indeed, the Internal Reference Clock (IRC) is trimmed by a 9-bit value in the ICS registers, which gives a typical resolution of 0.1% of the IRC’s untrimmed frequency. Unlike many other internal references, this IRC can be trimmed to a range of frequencies, from 31.25 kHz to 39.06 kHz. When used as the FLL reference, this allows the user to set the bus frequency anywhere with 0.1% resolution. After trimming, the typical deviation from the trimmed frequency is only +0.5% to –1% typical and only ±2% maximum.
In case of the S08PA, you may refer to the following information:
The parameters mentioned above are based on the S08PA16 datasheet, more specifically at Table 10.
Where did you get that formula?
I hope the last information will be useful for you.
If I misunderstood your question, please let me know. I will be glad to help.
Have a great day,
David
Hello David,
What I have done is to try to verify the 'trim resolution' indicated by Manufacturer, with my own calculations.
For that :
- Example 8.3.1.1 says:
- The IRC gives 39.0625kHz with SCTRIM typically ~ 0x50 (by neglecting SCFTRIM we are working with 8 bits)
- The IRC gives 31.25kHz with SCTRIM typically ~ 0x90
- Then, typically, a variation of SCTRIM = 0x90 - 0x50 = 0x40 = 64 causes a frequency variation IRC = 31.25kHz - 39.0625kHz = -7.8125kHz
- By definition, the absolute resolution is the minimum change in input / output that a system is able to measure / generate, so I understand that 'absolute resolution of IRC trimer' is the lowest frequency variation which is capable of producing, what happens when SCTRIM varies 1 point
- So I can calculate a typical absolute resolution = -7.8125kHz / 64 = -0.122kHz. ie typically a variation of 1 point in SCTRIM causes a variation of -0.122kHz in the frequency of IRC
- And I can now calculate a 'relative resolution, on a percentage, with a typical untrimmed frequency of 36kHz' = 0.122kHz / 36kHz · 100 = 0.34%
- The data that I get to my calculations, 0.34%, is worse than the data specified by the manufacturer, working with 8-bit, 0.2%
Which is the correct value? I think I need to have a value of 'typical trim resolution' reliable to avoid having to calibrate an IRC that I want it works at a different frequency to the factory trimmed.
Thank you very much for your assistance
Have a nice day,
Jose