cancel
Showing results for 
Search instead for 
Did you mean: 

Strange SPI Clock Form

YDOVG.11
Associate II

Hi all

I have a question regarding the clock output from STM32F446VCT6 MCU.

Can anyone tell me whether the clock signal looks good for you?

Because for me it looks awful.

The signals are measured directly on MCU pin (trace is 2 cm and is not connected to anything).

The oscilloscope probe with ground spring is used.

I expected to see a square signal - but this looks somehow strange.

I run 180 MHz MCU clock and 22.5 SPI clock.

Similar signals is measured on clocks for SPI1 (PA5) and SPI4(PE12) - different pins, different traces.

I tried to use different settings for pin speed - low, medium and very high.

All other periphery is disabled (not used). Only SPI is running.

The code is generated by STM32CubeIDE.

14 REPLIES 14
ONadr.1
Senior III

What is the bandwidth of your oscilloscope and probe? For a 25MHz rectangular signal, you would need a bandwidth of at least 250MHz, otherwise the signal will be displayed incorrectly.

The scope is 350Mhz, probe max 350Mhz.

I run 10x on probe.

I am asking because I have some EMI noise from the CLK pin - that is why I need to understand the "hats" marked with red circle on the last picture.

ONadr.1
Senior III

The problem may be a bad solution to block the supply voltage of the MCU.

YDOVG.11
Associate II

I am not fully convinced the power supply is the issue.

I have made some more measurements with around 11, 5 and 2 Mhz.

When I decrease the frequency the hat moves closer to edge.

ONadr.1
Senior III

Try measuring the MCU power directly on the second channel (AC coupling and high sensitivity) to see if there is a coincidence of peaks on the signal and power suply..

Write a minimal program, which does nothing just sets given pin as GPIO output and toggles it with a loopdelay.

Try the same on a "known good" board such as Nucleo or Disco.

JW

I tried with the GPIO output - similar picture. Cannot run it faster than 1.8MHz using GPIO.

See the picture. Apart from just normal ringing after the front, there is an additional "hat" after.

I tried it on two different boards - I do not have a "reference" DK like nucleo or disco to hand.

Can you maybe run this hex on your board and verify that there is no issue on pin PE12.

Tried that. I cannot see so huge peak on power line while the "hats" on the spi occur.