/* * Trigger select mapping for slave timer from master timer. This is * unfortunately not very straightforward; there‘s no tidy way to do this * algorithmically. To avoid burning memory for a lookup table, use macros to * compute the offset. This also has the benefit that compilation will fail if * an unsupported master/slave pairing is used. * * Slave Master * 1 15 2 3 4 (STM32F100 only) * 2 9 10 3 4 * 3 9 2 11 4 * 4 10 2 3 9 * 9 2 3 10 11 (STM32L15x only) * -------------------- * ts = 0 1 2 3 */ #define STM32_TIM_TS_SLAVE_1_MASTER_15 0 #define STM32_TIM_TS_SLAVE_1_MASTER_2 1 #define STM32_TIM_TS_SLAVE_1_MASTER_3 2 #define STM32_TIM_TS_SLAVE_1_MASTER_4 3 #define STM32_TIM_TS_SLAVE_2_MASTER_9 0 #define STM32_TIM_TS_SLAVE_2_MASTER_10 1 #define STM32_TIM_TS_SLAVE_2_MASTER_3 2 #define STM32_TIM_TS_SLAVE_2_MASTER_4 3 #define STM32_TIM_TS_SLAVE_3_MASTER_9 0 #define STM32_TIM_TS_SLAVE_3_MASTER_2 1 #define STM32_TIM_TS_SLAVE_3_MASTER_11 2 #define STM32_TIM_TS_SLAVE_3_MASTER_4 3 #define STM32_TIM_TS_SLAVE_4_MASTER_10 0 #define STM32_TIM_TS_SLAVE_4_MASTER_2 1 #define STM32_TIM_TS_SLAVE_4_MASTER_3 2 #define STM32_TIM_TS_SLAVE_4_MASTER_9 3 #define STM32_TIM_TS_SLAVE_9_MASTER_2 0 #define STM32_TIM_TS_SLAVE_9_MASTER_3 1 #define STM32_TIM_TS_SLAVE_9_MASTER_10 2 #define STM32_TIM_TS_SLAVE_9_MASTER_11 3
时间: 2024-10-06 01:20:02