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.
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
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.
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.
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
Yes, it does !!!
We have solved our issue.