[NUCLEO_F401RE] Fix issue with PWM on PC_9

The correct channel is 4 and not 3.
pull/244/head
bcostm 2014-04-02 14:02:56 +02:00
parent d0c1c2003f
commit c2bfc1217b
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ static const PinMap PinMap_PWM[] = {
{PC_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1 {PC_6, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH1
{PC_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2 {PC_7, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH2
{PC_8, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3 {PC_8, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3
{PC_9, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH3 {PC_9, PWM_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3)}, // TIM3_CH4
{NC, NC, 0} {NC, NC, 0}
}; };
@ -189,7 +189,6 @@ void pwmout_write(pwmout_t* obj, float value) {
case PB_8: case PB_8:
case PB_10: case PB_10:
case PC_8: case PC_8:
case PC_9:
channel = TIM_CHANNEL_3; channel = TIM_CHANNEL_3;
break; break;
// Channels 3N // Channels 3N
@ -203,6 +202,7 @@ void pwmout_write(pwmout_t* obj, float value) {
case PA_11: case PA_11:
//case PB_1: //case PB_1:
case PB_9: case PB_9:
case PC_9:
channel = TIM_CHANNEL_4; channel = TIM_CHANNEL_4;
break; break;
default: default: