STM32U575 DMA配置
起个摘要,后期维护
1、DMA原理:参考:【STM32】DMA原理,配置步骤超详细,一文搞懂DMA_dma配置_~Old的博客-CSDN博客
2、STM32U575的DMA资源:
(datasheet摘要)
3、UART的使用
4、I2S的使用
audio部分参考:使用STM32的I2S协议读取麦克风INMP441_匿名代码客的博客-CSDN博客
5、timer
设置TIM2作为事件管理的定时器。APB1 = 160M,频率公式如下:
f = timer_clock / (Prescaler+1) / (Counter_Period+1)
想要得到100us触发一次,f = 1 / 100us = 10 kHz
timer_clock = 160M,Prescaler 凑为39, Counter_Period 设置为399,则:
f = 160 000 000 / (39+1) / (399+1) = 10 000 Hz
6、应用:
在STM32U575 datasheet: 60.4.16 SAI DMA interface
Follow the sequence below to configure the SAI interface in DMA mode:
1. Configure SAI and FIFO threshold levels to specify when the DMA request is launched.
2. Configure SAI DMA channel.
3. Enable the DMA.
4. Enable the SAI interface.
Note: Before configuring the SAI block, the SAI DMA channel must be disabled