2020-01-14 12:46 AM
Hi all...
I having an issue with HAL SysTick interrupt on STM32F072B mcu:
With default configuration (see the image) and an external 8MHz oscillator,
if i toggle a pin in the SysTick interrupt, i get a state change every 0.75 ms instead of 1 ms...
What is wrong? I have to set a calibration register or similar?
Thank you all for support 8)
Matteo
Solved! Go to Solution.
2020-01-14 06:26 AM
Thank you all... but I found the mistake !
I was using a broken oscilloscope, with wrong time base calibration !!!!!
:persevering_face: :pouting_face: :face_screaming_in_fear:
Regards!
2020-01-14 01:41 AM
> With default configuration (see the image) and an external 8MHz oscillator,
> if i toggle a pin in the SysTick interrupt, i get a state change every 0.75 ms instead of 1 ms...
Check the schematics of your board, I suppose the default 8 MHz quartz frequency is not correct.
2020-01-14 01:47 AM
Read out and check the systick registers.
If possible, output SYSCLK to MCO and check.
Alternatively, try to use HSE as SYSCLK directly, without using PLL. How does the systick clock change?
> external 8MHz oscillator
Is HSEBYP set in RCC.CR?
JW
2020-01-14 06:26 AM
Thank you all... but I found the mistake !
I was using a broken oscilloscope, with wrong time base calibration !!!!!
:persevering_face: :pouting_face: :face_screaming_in_fear:
Regards!
2020-01-14 06:51 AM
Thanks for coming back with the solution.
Please select your post as Best so that the thread is marked as solved.
JW
2020-01-14 06:56 AM
this is why every PCB should always contain atleast one led, make it blink with X second intervals. easy to observe with eye if the clock speed is totally off from expected.
something i learned the hard way with my first embedded projects.