本文主要分享在ALPU加密芯片调试过程中,数据接口I2C或者单总线的读写流程是如何实现的。
![加密芯片I2C读写流程 加密芯片I2C读写流程](//cnlogin.boryin.com//boryin_client_cn/2024thxtekcom/BoryinUpload//news/202381413438105.jpg)
ALPU 加密IIC数据读写流程
1、IIC写数据结构 见下图
(图) IIC Write Packet Structure
S: Start
D/A:Device Address(Slave Address)7bits
W:Device Address Write bit(0)
A:Acknowledge
S/A: Sub Address
Data0~n:Write Data
P:Stop
2、IIC写数据结构
(图) IIC Read Packet Structure
S:Start
D/A:Device Address(Slave Address)7bits
W:Device Address Write bit(0)
A:Acknowledge
S/A:Sub Address
Sr:Repeated Start(Non-Stop)
R:Device Address Read bit(1)
Data0~n:Write Data
P:Stop
ALPU加密芯片One-wire(ART)数据读写流程
1、ART写数据结构 见下图
(图) ART Write Packet Structure
AWU:ART Wake Up
ART:Adaptive Reference Time
SP:Start Preamble
D/A(W):Write Device Address
S/A: Sub Address
Data0~7:Write Data(8 Bytes)
EP:End Preamble
2、ART读数据结构见下图
图 ART read packet Structure
AWU:ART Wake Up
ART:Adaptive Reference Time
SP:Start Preamble
D/A(W):Write Device Address
S/A:Sub Address
Sr:Repeated Start
Data0~9:Write Data(10Bytes)
EP:End Preamble