STM32 – Measuring HSE Frequency of STM32F2

clockstm32

I am programming an STM32F2 (manual here). I am having clock problems and would like to check every clock using an oscilloscope. The first clock I want to check is HSE, which stands for: High Speed External (Clock).

How can I use an oscilloscope to measure the HSE frequency of my chip?

Best Answer

I don't know what HSE is, but it shouldn't matter (if it does, you need to add relevant information to your question).

A oscilloscope displays voltage as a function of time. Capture a single cycle or known multiples of cycles and measure the elapsed time on the X axis. Divide the number of cycles by that time and you you get the frequency. Yes, it really is that easy.

It can be even easier. Even low end digital scopes have a frequency counter function built in. These usually work off the trigger pulses, so you have to set up the scope to trigger on each cycle. The scope then shows you directly what the frequency is. This probably won't work though if the signal is irregular.

A better answer will require a better question.