Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 4 months ago.
Why can I not independently PWM control pins PTA5 and PTD2 on the FRDM-KL25Z?
On the FRDM-KL25Z, when pins PTA5 and PTD2 are declared as PwmOut pins, they are locked together and can not be independently controlled. It doesn't matter if I change the PWM of PTA5 or PTD2. Whichever one is changed, the other one follows it.
The simple code linked below should keep pin PTD2 at 0% pwm while pin PTA5 should switch between 50% and 0% every 0.5 seconds. Pin PTA5 does alternate between 50% and 0% pwm, but instead of staying at 0% pwm, pin PTD2 follows pin PTA5.
If pin PTD2 is switched to PTD0, there is no issue, pins PTA5 and pins PTD0 can be independently PWM controlled. Unfortunately I am stuck using preset pins PTA5 and PTD2 as I am using pcbs that connect to these pins.
I would appreciate any help on why this may be and how to resolve it without having to switch pins.
Thanks! Sami Kanderian
Here is the link to the code: https://developer.mbed.org/users/skanderian/code/FRDM-KL25Z_PWM_PTA5_PTD2/