当前位置:网站首页>How to convert Quanzhi a40i/t3 to can through SPI
How to convert Quanzhi a40i/t3 to can through SPI
2022-07-03 00:52:00 【ningmengzier】
Full ambition A40i perhaps T3 Of CPU No middle CAN controller , But in the actual use process , use CAN, Usually SPI turn CAN The way .
This paper is based on Feiling embedded OKA40i-C Operate on the development board , Other brand development boards can be referred to as appropriate .
stay OKA40i-C On the base plate , All the way SPI, But because of the voltage and mcp2515 The voltage of does not match , Therefore, the serial port will be used 2 This group of multiplexes is SPI external mcp2515 modular .
according to CPU Chapter 3 of the manual describes , Can be PI17-19 Reuse as SPI1, use PH08 As an interruption .

A40i/T3 use sys_config.fex perhaps dts Configure pin multiplexing function , Let's use dts To configure .
01- open SPI1
modify sys_config.fex, take uart2 Configuration removed , open SPI1 Configuration of .

At the same time PH08 Comment out :

At the same time, modify the device tree :

02- modify defconfig
It is verified by other platforms , And adapt to the driver of the device tree mcp251x.c,
modify defconfig The configuration file :
Networking support ---> CAN bus subsystem support --->CAN Device Drivers --->Microchip MCP251x SPI CAN controllers Choose .
At the same time, select SPI To configure , Supported by default , Not here .
03- To configure iproute
file system :
buildroot-201611/configs/sun8iw11p1_hf_defconfig
It needs to be configured BR2_PACKAGE_IPROUTE2=y.
recompile , And package the image , burn .
04- test can0 node
After starting ,ifconfig Check to see if can0 node . Use the following command to test :
ifconfig can0 down ip link set can0 up type can bitrate 125000 triple-sampling on ifconfig can0 up cansend can0 123#12345678 candump can0
If necessary, please contact Feiling technical service personnel , Provide patch file .
matters needing attention
In the device tree , When used as an interrupt , because A40i/T3 Only use PH The pins of the group are multiplexed into interrupts , When setting an interrupt in the device tree, the following :
interrupt-parent = <&pio>; interrupts = <8 0>;
in addition , Pay attention to the interrupt trigger mode in the driver .
边栏推荐
- 2022上半年值得被看见的10条文案,每一句都能带给你力量!
- Shell implements basic file operations (SED edit, awk match)
- Win10 多种方式解决无法安装.Net3.5的问题
- leetcode-224:基本计算器
- In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
- 【AutoSAR 二 AppL概述】
- KingbaseES ALTER TABLE 中 USING 子句的用法
- Baidu AI Cloud takes the lead in building a comprehensive and standardized platform for smart cloud
- FAQ | FAQ for building applications for large screen devices
- kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
猜你喜欢

2022 list of manufacturers of Chinese 3D vision enterprises (guided positioning and sorting scenes)

数学建模之线性规划(含MATLAB代码)

Rust字符串切片、结构体和枚举类

Leetcode-2280: represents the minimum number of line segments of a line graph

Detailed explanation of pod life cycle

Hundreds of continuous innovation to create free low code office tools

使用jenkins之二Job

Unity learns from spaceshooter to record the difference between fixedupdate and update in unity for the second time

瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南
![[AUTOSAR twelve mode management]](/img/42/292e3da3f5d488a1e8c10ea9bbfbab.png)
[AUTOSAR twelve mode management]
随机推荐
[jetcache] jetcache configuration description and annotation attribute description
Rust ownership (very important)
Vulkan-实践第一弹
【AutoSAR 四 BSW概述】
Vulkan performance and refinement
Lex & yacc & bison & flex configuration problems
指针进阶(一)
[IELTS reading] Wang Xiwei reading P1 (reading judgment question)
Tensorflow 2.x(keras)源码详解之第十五章:迁移学习与微调
【AutoSAR 十二 模式管理】
The difference between tail -f, tail -f and tail
Rust所有权(非常重要)
leetcode-2115:从给定原材料中找到所有可以做出的菜
Teach you JDBC hand in hand -- structure separation
数学建模之线性规划(含MATLAB代码)
Wechat applet obtains the information of an element (height, width, etc.) and converts PX to rpx.
测试右移:线上质量监控 ELK 实战
Problèmes de configuration lex & yacc & Bison & Flex
In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
[AUTOSAR I overview]