cancel
Showing results for 
Search instead for 
Did you mean: 

[Help] Rise/fall times too slow on nanosecond-wide pulses

2sayle
Associate II

Hello everyone :D

I am currently using the STM32H743VIT6 (LQFP-100) on a custom PCB.

My goal is to generate fast positive pulses (ideal case would be a 10ns pulse) on TIM4 CH2 (PB8). APB2 is clocked at 200MHz so I can get 5ns ticks from my timer.

Generating 100ns wide pulses is quite easy using PWM by placing "Pulse" parameter on 16bits to 19 = (20-1) since 100ns/5ns = 20.

Problem is: if I want to narrow this pulse to 50ns for example, the trace of the signal starts to become rounded and doesn't reach 3.3V on top.

I suspect it is because of the rise/fall times which are about 30ns each.

Second problem is: When I change OSPEEDR register to VERY_HIGH, the rise/fall times are only reduced by a few nanoseconds while the datasheet shows rise/fall times less than 5ns for my range of capacitive load and supply (3.3V). I have estimated the capacitive load to be approx. 40pF.

Can someone enlighten me please ? :folded_hands:

2sayle

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III
  1. ok now - basically.
  2. probe needs adjustment (square wave / overshoot , check with probe signal at scope)
  3. hi speed testing only possible with 10:1 tip at point to test and ground at metal ring on tip.
  4. line to tip gnd < 3cm from gnd on board (solder blank wire there).
  5. with "standard" long gnd line /alligator clip signal never will be "perfect" looking

like this...


_legacyfs_online_stmicro_images_0693W00000bjtKPQAY.png 

->

https://electronics.stackexchange.com/questions/491355/oscilloscope-probe-points


_legacyfs_online_stmicro_images_0693W00000bjtPxQAI.png

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

12 REPLIES 12
Bob S
Principal

Are you saying that when you output 100ns wide pulses the rise/fall times are shorter (i.e. sharper edges) than when you output 50ns wide pulses? That would be very strange.

Perhaps your estimate is wrong? Are the internal or external pull-up and pull-down resistors on that net? How about your decoupling capacitors on the VCC pins (this is a stretch)?

Since this is a QFP package, unsolder PB8 and bend it up off the pad and measure the rise time again. Resolder PB8 and (if you can) unsolder the load pin(s). Measure again.

LCE
Principal

Have you checked the OSPEEDR register contents?

Internal pull-up is off?

Are you 100% sure that there is no other load?

What about your measuring equipment, is actually the scope fast enough?

The probe calibrated / the compensation capacitance adjusted?

And the probe's GND is not connected to board GND with the typical few-cm GND cable?

2sayle
Associate II

No, I would say that rise/fall times are constant (30ns approx) whether I program a 100ns or a 350ns time-width for the pulse, for example. But if I want to program a pulse under 50-60ns, the signal becomes rounded (and not squared anymore) : it's expected since rise/fall times are limiting the minimum width I can get.

The trace is not externally pulled since it is only passing through an analog demultiplexer and a SPDT switch. Internal pull-up seems to be off also when checking GPIO configuration.

GPIO_InitStruct.Pin = GTCH_TIM_OC_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
HAL_GPIO_Init(GTCH_TIM_OC_GPIO_Port, &GPIO_InitStruct);

I checked OSPEEDR register in debug mode and it was properly initialized.

I am not sure about the capacitive load of the signal but sure about the crossed components : it is CD74HC4067SM (through pin COM) and SN74LVC2G53 (through pin A).

Finally, the scope used is properly configured and calibrated. Alligator clip is connected to board's GND.

AScha.3
Chief III

is your scope probe set to 10:1 ? and is minimum 100MHz spec. ?

otherwise you CANNOT test speed/rise time etc. !!!

If you feel a post has answered your question, please click "Accept as Solution".

> and is minimum 100MHz spec. ?

You can hardly see few-ns edges with 100MHz spec scope + probe... the significant harmonic content of a 5ns edge goes well up to few GHz range.

JW

AScha.3
Chief III

i wrote : and is minimum 100MHz spec. ... because real hi speed probes and scope are not cheap - and not wide spread. i have 500MHz probes and a old Tek scope to test hi speed things, this can show 600ps rise time . but usually i take my DSO ("200MHz", more 120 in real) and a standard 100MHz probe , this can show 7ns rise at best.

typical for DSO is : Bandwidth x rise time = 0.45

(from : https://www.tek.com/en/support/faqs/how-bandwidth-related-rise-time-oscilloscopes )

If you feel a post has answered your question, please click "Accept as Solution".
2sayle
Associate II

Effectively, I did not configured my probe in X10... I observe now a rise/fall time of 3ns approximatively.

My probe is Rigol RP1100 and datasheet says that I can measure down to 1.4ns rise times with X10 setting.

Now signal is better but I observe a lot of overshoot: is it due to a wrong configuration again ?

Thanks a lot for all the replies :beaming_face_with_smiling_eyes:

AScha.3
Chief III
  1. ok now - basically.
  2. probe needs adjustment (square wave / overshoot , check with probe signal at scope)
  3. hi speed testing only possible with 10:1 tip at point to test and ground at metal ring on tip.
  4. line to tip gnd < 3cm from gnd on board (solder blank wire there).
  5. with "standard" long gnd line /alligator clip signal never will be "perfect" looking

like this...


_legacyfs_online_stmicro_images_0693W00000bjtKPQAY.png 

->

https://electronics.stackexchange.com/questions/491355/oscilloscope-probe-points


_legacyfs_online_stmicro_images_0693W00000bjtPxQAI.png

If you feel a post has answered your question, please click "Accept as Solution".
LCE
Principal

Oh boy, I didn't even expect someone to NOT use 10:1...

The GND probe point you see above should be available with each high speed probe / scope, if not, grab some silver wire and roll your own. :D