当前位置:网站首页>STM32F103 can learning record
STM32F103 can learning record
2022-07-03 09:07:00 【Fat muscle duality】
stm32f103 CAN Learning record
CAN send data
Data writing Mailbox 0~3 => Send controller => CAN Bus .
Standard library function sending process : Judge which of the three mailboxes is empty ,CAN1->TSR Medium TME0,TME1,TIM2, Configure sending after judgment .
mailbox 0~3 Send priority :CAN Protocol frame ID or FIFO Determine mailbox priority , CAN_MCR->TXFP Select priority mode .
CAN receive data
CAN Bus => Filter => Mailbox 0~3 (FIFO) => Program read
stm32f103 Of CAN Yes 2 individual FIFO,14 individual Filter,Filter Configurable to send data to FIFO0 or FIFO1, then FIFO0 or FIFO1 Generate interrupt events . The data has to go through Filter To get to FIFO.
CAN Protocol frame ID
A standard format :11 position 0x7FF
Extended format :29 position 0x1FFFFFFF
CAN Control will read while sending data CAN Level state of the bus , Judge whether the transmission is correct by comparing the transmission level with the reception level , And determine the priority of the protocol frame .
Priority on the bus
analogy :
level 1 It is pulled up by resistance , level 0 It's through NPN From the triode ,0 Will overwrite 1.
Output 0 Time conduction NPN, Output 1 Turn off NPN.
When 2 individual CAN The controller sends 1, Another hair 0 when ,0 Will overwrite 1.
CAN The controller compares the output level with the received level to judge the priority and judge the bus fault .
amount to stm32 Pin OD Output .
边栏推荐
- 拯救剧荒,程序员最爱看的高分美剧TOP10
- AcWing 786. 第k个数
- 22-06-28 Xi'an redis (02) persistence mechanism, entry, transaction control, master-slave replication mechanism
- Digital management medium + low code, jnpf opens a new engine for enterprise digital transformation
- LeetCode 324. Swing sort II
- On the setting of global variable position in C language
- 22-06-28 西安 redis(02) 持久化机制、入门使用、事务控制、主从复制机制
- 干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了
- LeetCode 513. Find the value in the lower left corner of the tree
- Memory search acwing 901 skiing
猜你喜欢

Discussion on enterprise informatization construction

Complex character + number pyramid

LeetCode 241. 为运算表达式设计优先级

In the digital transformation, what problems will occur in enterprise equipment management? Jnpf may be the "optimal solution"

LeetCode 532. K-diff number pairs in array

LeetCode 438. Find all letter ectopic words in the string

Sword finger offer II 029 Sorted circular linked list

Save the drama shortage, programmers' favorite high-score American drama TOP10

LeetCode 532. 数组中的 k-diff 数对

Digital management medium + low code, jnpf opens a new engine for enterprise digital transformation
随机推荐
干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了
Vscode connect to remote server
AcWing 786. Number k
Tree DP acwing 285 A dance without a boss
On the difference and connection between find and select in TP5 framework
【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis
too many open files解决方案
Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)
LeetCode 57. Insert interval
Education informatization has stepped into 2.0. How can jnpf help teachers reduce their burden and improve efficiency?
Divide candy (circular queue)
dried food! What problems will the intelligent management of retail industry encounter? It is enough to understand this article
PHP mnemonic code full text 400 words to extract the first letter of each Chinese character
How to place the parameters of the controller in the view after encountering the input textarea tag in the TP framework
Complex character + number pyramid
Method of intercepting string in shell
Concurrent programming (III) detailed explanation of synchronized keyword
Excel is not as good as jnpf form for 3 minutes in an hour. Leaders must praise it when making reports like this!
file_ put_ contents
【点云处理之论文狂读经典版13】—— Adaptive Graph Convolutional Neural Networks