[STM32C011J4-SO8N] Clock Jitter
Hello,
MCU : STM32C011J4-SO8N
Board : Custom
I am working on a Teleruptor and one of the feature is to control relay based on zero crossing due to relay latency.
My test code is simple:
while(1){
if(HAL_GPIO_ReadPin(ZERO_CROSSING_GPIO_Port, ZERO_CROSSING_Pin) == GPIO_PIN_SET)
{
RELAY_CTRL_GPIO_Port->BSRR = RELAY_CTRL_Pin;
}
else
{
RELAY_CTRL_GPIO_Port->BRR = RELAY_CTRL_Pin;
}
}I run my system at 3Mhz (Consumption matter) and I see a big clock jitter of (8-10us). Please see image below.

Normally, this shouldn’t take more than 1-2us.
I tried using EXTI but got the same issue.
I tried to run system at 12Mhz and issue is resolved but I can’t.
Question:
Is this behavior normal at this speed?
Is there any way I can reduce the jitter?
Thanks,
Ayoub
