当前位置:网站首页>STM 32 uses cube to generate Tim to trigger ADC and transmit through DMA
STM 32 uses cube to generate Tim to trigger ADC and transmit through DMA
2022-06-26 06:34:00 【Test dog 2010】
STM 32 Use cube Generate TIM Trigger ADC And pass DMA Transmission problems
I am trying to use these days freerots, A battery management task is planned , Need to use TIM Trigger ADC And pass DMA transmission
Because it's the first time cube and freerots, I'm still not sure .
The process is basically to configure according to Baidu method , It is not difficult to configure ,
The problem is that after the configuration is completed , The direct phenomenon is ADC No data
The overall logic is to configure first TIM and ADC, To configure ADC from TIM Trigger , Then there are three channel scans , Data is sent to an internally defined array
After inspection , Find the first TIM It's not even running ( Open when debugging TIM3 The register of ), It turned out cube The generated code is actually just configured , But to start, the user needs to start it in the user code area , like this
Then I changed it ,ADC It can be triggered normally , But found DMA No reaction ,
So the debug interface opens DMA The register of , It is found that all the registers inside are empty . That is to say, there is no configuration .
This is very strange , Because I have the statement to start it
Finally found , The reason is that the generated code ,ADC The initialization of is in DMA Caused before initialization .....
because DMA There is a function to turn on the clock in initialization , If ADC stay DMA Previous configuration ,DMA The clock is not on , in other words ADC The initialized configuration cannot be written in ....
later , Change the two initialization positions , take DMA On the front , You can receive data normally .
边栏推荐
- MySQL 索引底层原理
- Pytorch mixing accuracy principle and how to start this method
- 个人博客系统需求分析
- Requirement analysis of personal blog system
- 打印数字的位信息
- Load balancer does not have available server for client: userService问题解决
- [alluxio & Dachang] the original boss direct employment was applied in this way
- 消息队列-全方位对比
- When vs code uses prettier to format JS, there is a space between the name of the function definition and the parentheses, and ESLIt does not allow this space
- Experience the new features of Milvus 2.0 together
猜你喜欢
EFK昇級到ClickHouse的日志存儲實戰
Live broadcast Preview - fire safety instructor training "cloud class" is about to start!
GoF23—抽象工厂模式
Number of connections server database message: error number 2003can't connect to MySQL server on 'server address' (10061)
MVC source code sharing
成水最多的容器
Efk Upgrade to clickhouse log Storage Reality
Go language learning notes 1.1
营销技巧:相比较讲产品的优点,更有效的是要向客户展示使用效果
寶塔服務器搭建及數據庫遠程連接
随机推荐
获取当前月份的第一天和最后一天,上个月的第一天和最后一天
3.pyinstaller module introduction
Understanding of nil in go language
typescript的type
MYSQL索引不生效的原因
技术Leader的思考技巧
Research Report on pallet handling equipment industry - market status analysis and development prospect forecast
GoF23—抽象工厂模式
Connexion et déconnexion TCP, détails du diagramme de migration de l'état
Zotero文献管理工具之Jasminum(茉莉花)插件
302. minimum rectangular BFS with all black pixels
How to design a good technical scheme
EFK昇級到ClickHouse的日志存儲實戰
Install pyinstaller
Design and practice of low code real-time data warehouse construction system
Marketing skills: compared with the advantages of the product, it is more effective to show the use effect to customers
【golang】time相关
Library management system
When vs code uses prettier to format JS, there is a space between the name of the function definition and the parentheses, and ESLIt does not allow this space
TCP連接與斷開,狀態遷移圖詳解