[] STM32 talk STM32F10XX of timer channels remapping function

The motivation for writing this is that every time I configured the hardware PWM timer of time in turning things upside down manual, facing directory to find the content too much trouble, simply write a blog post directly pick out this paragraph.

Reference article: Punctuality atomic provide STM32 Chinese Reference Manual

Keywords: STM32 timer remap multiplexing


This is my PCB file the schematic STM32F103 microcontroller, observe carefully the reader can see some clock channel repeated many times:

Yes, these are configurable timer channels. In STM32 Chinese reference manual of 8.3.7 chapter introduces the timer alternate function remapping

It has a hardware timer F10xx PWM function only TIM1, TIM2, TIM3, TIM4, I put the tables are listed here:

For example:

I want to use four channels TIM3 timers are controlled four-way power adjustment, they are connected in the design PB4, PB5, PB0, PB1 on,

The table 42 can be seen, this case should be used TIM3_REMAP [1: 0] = 10 ( part weight map) , so after the time Zhongkai Qi, add a statement can be remapped:

GPIO_PinRemapConfig(GPIO_PartialRemap_TIM3, ENABLE); //Timer3部分重映射  

 

Published 44 original articles · won praise 203 · views 40000 +

Guess you like

Origin blog.csdn.net/ReadAir/article/details/89292720