在STM32cubemx那里选择TIM1,然后进入DMA设置界面进行设置即可,如下图
用cubemx,在定时器1设置那里选择DMA,然后根据需要进行选择即可,如图
请参考 http://www.waveshare.net/study/article-645-1.html