2020-03-01 11:13 PM
When Pulse is high, I can see the deviation of 140mv in output voltage instead of clean 3.3V.
Also, I tried different frequencies and Counter Period but no change in waveform.
On inspection it looks like that output pin is ramping down and again going high. and this goes on for entire high pulsewidth.
Kindly let me know how do I clean the PWM output?
Edit:
pics are attached herewith.
2020-03-02 02:16 AM
Power supply is clean? What board is this? All ground pins are connected?
JW
2020-03-02 02:36 AM
Let me know for any further information.
Edit: I connected the board to Wallmount 5V supply but there was no change in waveform quality.
2020-03-02 02:55 AM
Which pin is that?
Check the board schematics, is perhaps something else connected to the pin on the board?
Read out and check all relevant GPIO and timer registers values, and/or share them here.
2020-03-03 03:59 AM
It is PINC0 and it is not connected to any hardware on the board.
The board is Nucleo-F334R8.
PC0 GPIO Mode is set as below :
I tried with "Open drain" and with internal pullup and external pull up. But the result is worse and screenshot is uploaded before.
I also tried with Pullup and Pulldown in "Push Pull" mode but again result is worse.
Timer 1 Configuration:
1. Clock source - Internal Clock
2.Channel 1- Pwm Generation CH1
3. Channel 2 - PWM Generation CH2
4. Prescalar - 8
5. Counter Period - 4095
6. Auto Reload preload - Disable
7. PWM Mode - Mode 1
8. Output Compare Preload - Enable
9. Fast Mode - Enable
I have listed all relevant register configuration, If you need any more information, I would share it with you.
Note: I am using STM32CubeIDE for configuration and programming.
2020-03-03 04:09 AM
I can't find a single register value in your post.
2020-10-15 11:57 PM
Dear @RShah.2
Do you have still this problem to solve?
And just in case, if not, do not hesitate to share the final solution you found.
Best regards
Laurent Ca...
2020-10-26 01:40 AM
Dear @RShah.2
I guess you don't have to solve this problem anymore, therefore I consider this thread closed.
If not, feel free to reopen it by posting an answer.
Best regards
Laurent Ca...