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.
7 years, 3 months ago.
Pin 6 on nucleo-f302r8 shows pin mismatch error
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);
I took up this issue with ST tech support. I was told that this looks like an mbed-specific issue. So, i am posting it here. Please guide me why this is happening.