起个摘要,后期维护
1、DMA原理:参考:【STM32】DMA原理,配置步骤超详细,一文搞懂DMA_dma配置_~Old的博客-优快云博客
2、STM32U575的DMA资源:
(datasheet摘要)
3、UART的使用
1)printf的重定向
2)中断接收不定长(使用空闲中断接口)
4、I2S的使用
audio部分参考:使用STM32的I2S协议读取麦克风INMP441_匿名代码客的博客-优快云博客
确定协议,以及接收处理(DMA一半完成时,先copy一部分)
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
7、Flash操作
STM32U575有1MBytes内存,分成两个BANK,前64页(1页8K)为BANK_1,后64页为BANK_2,做片上升级时要注意后64K使用BANK_2擦除
8、I2C slave配置
参考文档如下:
https://github.com/CherryXiuHuaWoo/STM32F030C8-IIC-Slave/blob/master/IIC/Src/i2c.c
https://blog.youkuaiyun.com/XiuHua_Wu/article/details/80992994?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169468295716800226517240%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169468295716800226517240&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-80992994-null-null.142^v94^chatsearchT3_1&utm_term=stm32cubemx%20i2c%20slave&spm=1018.2226.3001.4187
https://blog.youkuaiyun.com/XiuHua_Wu/article/details/80628874
https://blog.youkuaiyun.com/qq_36561846/article/details/117474070?ops_request_misc=&request_id=&biz_id=102&utm_term=stm32cubemx%20i2c%20slave&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-3-117474070.142^v94^chatsearchT3_1&spm=1018.2226.3001.4187
https://blog.youkuaiyun.com/NeoZng/article/details/128496694?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169468495716800186514475%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169468495716800186514475&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-128496694-null-null.142^v94^chatsearchT3_1&utm_term=HAL_I2C_Slave_seq_Receive_IT&spm=1018.2226.3001.4187
9、其他
例如SRAM空间的使用等