Chinese Board Advice (Clock drift)
Posted: Sat Apr 15, 2023 7:49 pm
Hola!, I found the pefect SMT32 STM32G030C8 board for my project, I'm looking to boot from power off as fast as possible and this model boot up into the loop in under 2ms , however I realize that clock accuracy it's way off, I'm talking about 150ms drift every 100 seconds
I don't know if this may be counterfit chip? or maybe crystal quality? I would like to listen your opinion, would be great if I can just replace the component myself in order to get more accuracy
I understand this can't be a software related thing but anyway I made a ino test where I connect to my oscilloscope, I'm enabling a gpio output every 10 seconds and from oscilloscope I get arround 9988ms everytime, so 12ms off in just 10secs

I don't know if this may be counterfit chip? or maybe crystal quality? I would like to listen your opinion, would be great if I can just replace the component myself in order to get more accuracy
I understand this can't be a software related thing but anyway I made a ino test where I connect to my oscilloscope, I'm enabling a gpio output every 10 seconds and from oscilloscope I get arround 9988ms everytime, so 12ms off in just 10secs
Code: Select all
unsigned long power_on = 0;
void setup()
{
pinMode(PC13, OUTPUT);
power_on=millis();
digitalWrite(PC13, HIGH);
delay(2);
digitalWrite(PC13, LOW);
}
void loop()
{
if (millis()-power_on >= 10000){
power_on=millis();
digitalWrite(PC13, HIGH);
delay(2);
digitalWrite(PC13, LOW);
}
delay(0);
}