当前位置:网站首页>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 .
边栏推荐
- 如何系统学习机器学习
- Advanced pointer (I)
- Test shift right: Elk practice of online quality monitoring
- There is an unknown problem in inserting data into the database
- KingbaseES ALTER TABLE 中 USING 子句的用法
- 【爱死机】《吉巴罗》被忽略的细节
- Shell 实现文件基本操作(切割、排序、去重)
- FAQ | FAQ for building applications for large screen devices
- 【AutoSAR 三 RTE概述】
- Extension of flutter
猜你喜欢

Liad: the consumer end of micro LED products is first targeted at TVs above 100 inches. At this stage, it is still difficult to enter a smaller size

瑞萨电子RZ/G2L开发板上手评测

The "2022 China Digital Office Market Research Report" can be downloaded to explain the 176.8 billion yuan market in detail
![[AUTOSAR + IO Architecture]](/img/cf/9ea42b50bed298c0546764b63bd957.png)
[AUTOSAR + IO Architecture]

1.11 - bus

Logback configuration file

详解RDD基本概念、RDD五大属性
![[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions](/img/ea/ee1ad50a497478b9d080bb5e4bdfb5.png)
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions

How to systematically learn machine learning

指针进阶(一)
随机推荐
数据分析思维分析犯法和业务知识——分析方法(一)
Use Jenkins II job
Why is the website slow to open?
lex && yacc && bison && flex 配置的問題
【AutoSAR 八 OS】
[overview of AUTOSAR three RTE]
【AutoSAR 十三 NVM】
Gan model architecture in mm
关于QByteArray存储十六进制 与十六进制互转
Nacos+openfeign error reporting solution
node_ Modules cannot be deleted
[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)
Centos7 one click compilation to build MySQL script
Introduction and use of ftrace tool
Linux Software: how to install redis service
详解RDD基本概念、RDD五大属性
leetcode-224:基本计算器
Leetcode-224: basic calculator
Rust string slicing, structs, and enumeration classes
Shell 实现文件基本操作(sed-编辑、awk-匹配)