2017-08-18 01:59 PM
I have interfaced my Nucleo-F302R8 board with a IR sensor - IR LED pair. I have connected sensor over I2C interface and I am using PWM to power the LED. Entire coding is being done over the online mbed compiler. I am trying to use pin D6 to give the PWM signal to LED. Rest of the pins which are mentioned to be supporting PWM signal are occupied with IDS01A5 expansion board and cannot be replaced.
The code is compiling correctly. However, UART terminal on my laptop shows error message as -
pinmap mismatch
So, I tried using pin D5 instead of D6, which is the only remaining PWM pin I have, and it worked perfectly fine. However, I need the D5 for another LED and I am stuck with D6 which is giving me that error.
What could be the issue with pin D6? Is it the case that it does not support PWM and I am forcing it to give one? or, is it something else and I am making some mistake while configuring it.
i am using PwmOut function to generate PWM as follows -
PwmOut IR_LED(D6); // I just replaced D6 with D5 and it started working
IR_LED.period_us(2000)
IR_LED.pulsewidth_us(500);
‌ ‌#pwm #nucleo-f3022017-08-21 09:21 AM
This sounds to be an mbed-specific problem, better to be handled there.
JW