You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
700 B
Markdown

2 years ago
- MX中勾选Generate Peripheral initialization as a pair of ".c/.h" file
- **配置SYS选择Serial Wire否则PB4占用无法释放**
- 先配置系统时钟调节到72MHz的频率
- 配置TIM3
- 将PB4分配给TIM3_CH1
- 勾选TIM3的Internal Clock
- Prescaler配置为0不预分频Counter Period配置为90-1800kHz
- 进入GPIO Settingsmode配置为AF OD输出速度为High
- 进入DMA Settings点Add选择TIM3_CH1新增一个DMA通道
- 将Direction配置为Memory To Peripheral
- Data Width配置为Half Word
- Increment Address勾选Memory不勾选Peripheral
- 复制ws2812.c/ws2812.h文件到Core的Src/Inc目录下