|
37 | 37 |
|
38 | 38 | // TIM5 cannot be used because already used by the us_ticker
|
39 | 39 | static const PinMap PinMap_PWM[] = {
|
| 40 | + /* |
| 41 | + * The lines below show all combinations to conect a port pin with a timer. Commented |
| 42 | + * lines are alternative possibilities not used per default. But they can be changed |
| 43 | + * manually instead of the suggested configuration. For example you can see that on |
| 44 | + * PA_5 you can have a PWM using either Timer2/Channel1 or Timer8/Channel1N. Today I |
| 45 | + * have decided to use Timer2/Channel1. But you can also notice that Timer2/Channel1 |
| 46 | + * is also used on PA_0. That means that today you cannot output two different PWM |
| 47 | + * signals on PA_0 and PA_5 at the same time. If someone wants this, he will need to |
| 48 | + * change the timer that is used on PA_5. This is why the other possibilities are |
| 49 | + * commented to make this change easier without looking deeply into the mcu datasheet. |
| 50 | + */ |
40 | 51 | {PA_0, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH1
|
41 | 52 | {PA_1, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH2
|
42 | 53 | {PA_2, PWM_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2)}, // TIM2_CH3
|
@@ -103,14 +114,10 @@ static const PinMap PinMap_PWM[] = {
|
103 | 114 | {PE_13, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH3
|
104 | 115 | {PE_14, PWM_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1)}, // TIM1_CH4
|
105 | 116 |
|
106 |
| - {PH_10, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH1 |
107 |
| - {PH_11, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH2 |
108 |
| - {PH_12, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH3 |
109 | 117 | {PH_13, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH1N
|
110 | 118 | {PH_14, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH2N
|
111 | 119 | {PH_15, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH3N
|
112 | 120 |
|
113 |
| - {PI_0, PWM_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5)}, // TIM5_CH4 |
114 | 121 | {PI_2, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH4
|
115 | 122 | {PI_5, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH1
|
116 | 123 | {PI_6, PWM_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8)}, // TIM8_CH2
|
|
0 commit comments