- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi BCM,
We want to set BCM20736 PWM0 output range: 1% to 100%.
It's ok for PWM0 work between 1% to 99%
To set PWM0 output high, I reset the PWM0, and then configurate the PWM0 to GPIO and finally output 1. The PWM0 would output high only when reset it during it's high duty, or it would output low no matter I call gpio_configurePin() to output 1.
I checked Community, and find out the same issue as below, but without reply.
Can't get 100% duty cycle from PWM
How to properly disengage PWM ?
Is this a bug of BCM20736 ?
tks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leman,
Yes, you are correct - my bad!
But the same analogy applies - You cannot drive both inputs.
If you want to use P38 and P28, you have to disable P13 and P14
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry,there is a bit error in the description above.
When PWM0(P27) and PWM1(P27) are disabled during high duty,setting them to GPIO output, it would output a inverted level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leman,
1. You will need to stop PWM, disable it, reconfigure the GPIO as output HIGH and it should work
2. If you stop the GPIO as a PWM, it is not predictable - It could be HIGH or LOW depending on when you stopped it
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is what I have done.
But there is a problem below:
.If the PWM is during high duty when I disable it,a problem will generate:
after I disable it ,i configure it to GPIO to output,then the output level will be a inverted level of what I set.
This only happened on P26 & P27,P28(maybe).
P13,P14 work well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leman,
1. We assume you have something else connected to P26 and P27.
2. The GPIO is a different mux from the PWM and you can't drive both inputs.
3. Remember that the P13/P14 are double bonded for multiple functions.
4. P13 and P26 are bonded to the same pin in the package.
5. When you are driving P13 and P14, you are creating a "short" in the device.
6. If you drive P26 High and P13 Low, you have a short.
7. So if you want to use P26 and P27, you have to disable P13 and P14.
Hope this helps.
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We design according to the datasheet of 20736.And what we refer to is different with what you said.
In the pic,we see P13 and P28 are bonded to the same pin,not P26.
Also P14 and P38 are bonded to the same pin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Leman,
Yes, you are correct - my bad!
But the same analogy applies - You cannot drive both inputs.
If you want to use P38 and P28, you have to disable P13 and P14
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear JT
Yes, it does !!!
We have solved our issue.
Many thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Leman,
Fantastic news!
JT