0
\$\begingroup\$

Using a STM32F407 if I generate a 200 Hz signal it looks like this:

enter image description here

If I want a higher frequency, for instance 10 kHz I get this: enter image description here

I am using a PicoScope 2205A, resolution 8 bits at 200Ms/s, bandwith 25MHz.

Does anyone know what is happening ?

P.S I configured the pin as very high speed in the OSPEED register.

\$\endgroup\$
  • 3
    \$\begingroup\$ Looks like your scope is unable to sample this frequency properly. Or the settings you are using it with are not appropriate for this frequency. \$\endgroup\$ – Eugene Sh. Feb 22 at 16:08
  • 2
    \$\begingroup\$ What is the time scale on your scope in the second image. Is it adjustable? You may just be seeing tons of aliasing (the signal might actually be switching much faster, you are just massively undersampling it). \$\endgroup\$ – Justin Feb 22 at 16:08
  • 1
    \$\begingroup\$ From some internet articles I see that the picoscope software has a setting/display of the sampling rate for the given signal. What is it in your case? Or even better, post the screen of the full window where we can see all of the data. \$\endgroup\$ – Eugene Sh. Feb 22 at 16:12
  • 3
    \$\begingroup\$ Yeah, I found the mistake. It had a sample of 6kS in the settings for the channel. Also the time scale was 3ms/div. I changed the sampling rate and now works fine.... Sorry for bothering you, guys. \$\endgroup\$ – pantarhei Feb 22 at 16:18
  • 2
    \$\begingroup\$ Have seen this kind of problem from picoscope users especially. @EugeneSh. & Justin recognize a suspect display problem that may be caused by a small section of a long record being viewed. Recognizing a digital sampling problem is an additional skill that newer 'scope users must overcome. Another is the "wagon-wheel-sampling" timebase problem. \$\endgroup\$ – glen_geek Feb 22 at 16:27
0
\$\begingroup\$

The solution was to modify the sampling rate of the channel. Even if the info window shows you 25Ms/s or something like this you have modify it from the channel settings because it has other value. Also adjust the scale time until the signal is clear. It worked for me.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.