cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G071 HSI RC (internal RC oscillator) accuracy // RC oscillator use for UART

ANest.1
Associate

Where is the accuracy if the HSI RC (internal oscillator) specified? I cannot find any data. There seems to be some presentation slides but this is no a valid specification. I need the worst case accuracy over the complete temperature range. I have read +/-1% at a dedicated temperature range and +/-2% over the complete temperature range.

Finally, is the internal RC oscillator is sufficient for UART application upto 38400 Baud?

2 REPLIES 2
TDK
Guru

0693W00000Bb2SfQAJ.png 

HSI characteristics are in the datasheet.

Whether or not 2% is acceptable will depend on your exact values. It's going to be near the top of what is allowable, but will probably work. See UART receiver tolerance specification in the reference manual.

If you feel a post has answered your question, please click "Accept as Solution".

I read the above table as

  • nominal HSI frequency is 16Mhz + 0.5% - 0.75%
  • due to temperature-induced drift, this changes to 16Mhz +2% -2.75%
  • voltage-induced drift is mostly negligible

To avoid error, the receiver has to correctly sample the stopbit, i.e. roughly speaking, the cumulative error from startbit to stopbit cannot be more than half the bit duration (details involve the exact sampling method and differ very slightly from this rule of the thumb). For the usual start+8+stop scheme it's roughly half bit out of 10 bits, i.e. 5%. This assumes a perfect counterpart; if your counterpart is equally imperfect, this value has to be halved. Up to now this all is baudrate-independent.

Now add the imperfection of baudrate generation; and yes, fractional baudrate is imperfect (although its exact impact is again relatively complicated to calculate exactly) and best to be considered as the worst of the two surrounding integer-divider baudrates.

Now add constant-time errors, mostly in the form of asymmetry between high and low states at the receiver, having many causes, e.g. asymmetric rise-fall time, asymmetric sampling level of receiver, jitter of PLL of the clock source (if any) etc. These of course have baudrate-dependent impact.

So, generally, HSI as USART clock source is mostly marginal. I personally would never use it in an environment where data transmission has to be ensured, i.e. it's OK for debugging on the bench, it's not OK for industrial application.

YMMV.

JW