参考: STM32的PWM输入模式设置并用DMA接收数据 Input capture mode The input stage samples the corresponding TIx input to generate a filtered signal TIxF. Then, an edge detector with polarity selection generates a signal (TIxFPx) which can be used as trigger input by t
Timers get their clock source from External pins or Internal timer sources. External External = pins: TI1 or TI2 or ETR set pin to be used: in TIMx_CCMR1 reg - set pin to be used by writing CCxS bits select polarity of input in TIMx_CCER reg - write
http://www.cs.indiana.edu/~geobrown/book.pdf An example of a basic timer is illustrated in Figure 10.1. This timer has four components – a controller, a prescaler (PSC), an “auto-reload” register (ARR) and a counter (CNT). The function of the prescal
F103系列 typedef struct { uint16_t GPIO_Pin; /*!< Specifies the GPIO pins to be configured. This parameter can be any value of @ref GPIO_pins_define */ GPIOSpeed_TypeDef GPIO_Speed; /*!< Specifies the speed for the selected pins. This parameter can be
阻塞模式和非阻塞模式...... 我的理解是:阻塞模式就像是一个延时函数,当这个函数没处理完那么,所有的按照流程需要执行的代码都不会被执行,要等到这个延时完成,类似 平时看书上写的LED灯闪烁,用的delay()一样..而非阻塞模式就像他定义的那样,一般用的是中断,执行这条语句的时候,开启相应的中断达到一定的条件才进行处理,这样不会影响到流程的执行. 我的理解就是,阻塞就是死等,非阻塞就是中断 可以参考 /** * @brief Sends an amount of data in non