当前位置:网站首页>CAN初始化流程
CAN初始化流程
2022-04-22 02:22:00 【ManiacLook】
1.配置相关引脚的复用功能,使能CAN时钟
要用CAN,首先要使能CAN的时钟,CAN的时钟通过APB1ENR的第25位来设置。其次要设置CAN的相关引脚为复用输出,这里我们需要设置PA11位上拉输入(CAN_RX引脚),PA12为复用输出(CAN_TX引脚),并使能PA口的时钟。
2.设置CAN工作模式及波特率等
通过先设置CAN_MCR寄存器的INRQ位,让CAN进入初始化模式,然后设置CAN_MCR的其他相关控制位。再通过CAN_BTR设置波特率和工作模式(正常模式/环回模式)等信息。最后设置INRQ为0,退出初始化模式。
3.设置滤波器
本例程,我们将使用筛选器组0,并工作在32位标识符屏蔽位模式下。先设置CAN_FMR的FINIT位,进入初始化模式,然后设置筛选器组0的工作模式以及标识符ID和屏蔽位。最后激活筛选器,并退出初始化模式。
版权声明
本文为[ManiacLook]所创,转载请带上原文链接,感谢
https://blog.csdn.net/ManiacLook/article/details/106303596
边栏推荐
- Unity Game Optimization - Third Edition 阅读笔记 Chapter 1 分析性能问题
- DEJA_VU3D - Cesium功能集 之 013-军事标绘系列七:正多边形
- Leetcode 203. Remove linked list elements
- XSS cross site script attack learning record
- 2022年物联网安全的发展趋势
- postgresql中在查询结果中将字符串转换为整形或浮点型
- 头歌 NAT&DHCP协议分析
- 49 pages enterprise digital transformation cases and common tools enterprise digital transformation ideas
- 风控产品定额的陷阱都有哪些?
- Why can the Internet industry attract more and more young people? Especially programmers
猜你喜欢

Target motion model - uniform motion CV

IP message analysis notes

Leetcode 141, circular linked list

【项目】小帽外卖(七)

NLP model summary
![[FAQ] Anaconda prompt reports an error. Solving environment: failed](/img/c9/e92a27b4150bcbc5ec1654f75a1b65.png)
[FAQ] Anaconda prompt reports an error. Solving environment: failed
![[pytorch image classification] alexnet network structure](/img/47/e877725d6018c807633c566bd87d8a.png)
[pytorch image classification] alexnet network structure
Analysis of advanced interview questions, Alibaba released the "limited edition" Android zero foundation dictionary

The youqilin 22.04 lts version system will be released on April 22, equipped with the new ukui 3.1

Evaluation of arithmetic four mixed operation expression
随机推荐
The shortcut key for modifying the drawing board size of illustrator (AI) is shift + O by default
OpenCV计算图像的梯度特征
SV知识点回顾
Page 107 planning and design of enterprise digital transformation
Leetcode 1572, sum of diagonal elements of matrix
uni-list的插件导入及使用方法
数据库案例这一节内容
Basic operation of MySQL database ------ (basic addition, deletion, query and modification)
68 smart pipe gallery project construction solution
flutter 音乐播放器audioplayer
Leetcode 1539, the kth missing positive integer
当人们越是接近产业互联网,就越来越能真正的看清它
JMeter+Jenkins+Ant持续化
Zuo Chengyun - Dachang brushing class - laying bricks
Introduction to Alibaba's super large-scale Flink cluster operation and maintenance system
cv2. What is the custom format of drawcontours()
单层神经⽹络的详细实现
风控产品定额的陷阱都有哪些?
编程主要学什么
cv2.drawContours() 的contours自定义格式 是什么样子的