‎2023-05-11 05:34 AM
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
Solved! Go to Solution.
‎2023-05-11 09:26 AM - edited ‎2023-11-20 05:41 AM
like this...
->
https://electronics.stackexchange.com/questions/491355/oscilloscope-probe-points
‎2023-05-11 08:02 AM
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.
‎2023-05-11 08:05 AM
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?
‎2023-05-11 08:25 AM
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.
‎2023-05-11 08:48 AM
is your scope probe set to 10:1 ? and is minimum 100MHz spec. ?
otherwise you CANNOT test speed/rise time etc. !!!
‎2023-05-11 08:54 AM
> 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
‎2023-05-11 09:05 AM
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 )
‎2023-05-11 09:08 AM
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:
‎2023-05-11 09:26 AM - edited ‎2023-11-20 05:41 AM
like this...
->
https://electronics.stackexchange.com/questions/491355/oscilloscope-probe-points
‎2023-05-11 10:44 PM
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