Skip to main content
Ala
Senior
January 25, 2020
Solved

Do I need an crystal Oscillator?

  • January 25, 2020
  • 10 replies
  • 9075 views

..

This topic has been closed for replies.
Best answer by berendi

The external crystal is needed only for USB, or when some timing task requires better accuracy than HSI.

0690X00000BwYYgQAN.png

E.g. as an asynchronous UART requires 5% accuracy, it might not work reliably in extreme temperatures.

10 replies

dbgarasiya
Senior
January 25, 2020

you can use internal clock

Ala
AlaAuthor
Senior
January 25, 2020

Dear Dbarasiya

do you mean I don't not need to add a 8MHz crystal oscillator in my PCB?

berendi
berendiBest answer
Principal
January 25, 2020

The external crystal is needed only for USB, or when some timing task requires better accuracy than HSI.

0690X00000BwYYgQAN.png

E.g. as an asynchronous UART requires 5% accuracy, it might not work reliably in extreme temperatures.

berendi
Principal
January 25, 2020

Check the electrical characteristics chapter in the reference manual, both for ADC and the HSI internal oscillator. If they are adequate for your need, then no external components are needed apart from the decoupling capacitors.

Also read AN2834 How to get the best ADC accuracy in STM32 microcontrollers

dbgarasiya
Senior
January 25, 2020

hope you understand what i means as @berendi​  has explained

dbgarasiya
Senior
January 25, 2020

Best of luck

S.Ma
Principal
January 25, 2020

The internal frequency HSI has some tolerances across chips, temperature etc... you will get a min-max range from this.

Now check if all your peripherals are ok with this.

Using USB? Need probably HSE

Using high speed UART? Need probably HSE

Using RTC? Need probably 32.768kHz HSI

Ala
AlaAuthor
Senior
January 25, 2020

Dear .

so if I need UART, then I should add a 8MHz crystal oscillator, right?

berendi
Principal
January 25, 2020

Only if it would be used in a freezer, oven, or outdoors (i.e. outside the -10...85 °C range), and the usart speed is above 500 kbaud.