SMBus PEC

SMBus一种I2C总线的变种

SMBus 提供了PEC方式,提高了传输的可靠性。

总线的发展都是在提高速度,提高可靠性或者提高传输效率上下功夫。

PEC不具备纠错的能力,是在I2C link layer增加了一种手段来有效的检验传输的数据是否有错。

PEC : Packet Error Code (CRC-8 error checking)

6.4 Packet Error Checking

The Packet Error Checking mechanism improves reliability and communication robustness. Implementation of Packet Error Checking by SMBus devices is optional for SMBus devices but is required for devices participating in and only during the ARP process. SMBus devices that implement Packet Error Checking must be capable to communicate with the host and other devices that do not implement the Packet Error Checking mechanism.(兼容)

Packet Error Checking, whenever applicable, is implemented by appending a Packet Error Code (PEC) at the end of each message transfer. Each protocol (except for Quick Command and the host notify protocol described Section 6.5.9) has two variants: one with the Packet Error Code (PEC) byte and one without. The PEC is a CRC-8 error-checking byte, calculated on all the message bytes (including addresses and read/write bits). The PEC is appended to the message by the device that supplied the last data byte.

6.4.1 Packet error checking implementation
The SMBus must accommodate any mixture of devices that support Packet Error Checking and devices that do not. A device that acts as a slave and supports the PEC must always be prepared to perform the slave transfer with or without a PEC, verify the correctness of the PEC if present, and only process the message if the PEC is correct. Implementations are encouraged to issue a NACK if the PEC is present but not correct.

6.4.1.1 ACK/NACK and Packet Error Checking
The ACK/NACK bit in a SMBus byte is as susceptible to corruption as any other bit in a SMBus packet. Hence, an ACK at the end of a PEC is not a guarantee that the PEC is correct. A master-transmitter receiving an ACK at the end of a write should not necessarily assume that the write was successfully carried out at the slave-receiver of the write, although it is highly likely that it was.
A NACK received after a PEC by a master-transmitter indicates that the link layer of the slave-receiver became aware of an error with the transmission in time to supply a NACK at the end of the PEC byte. This may be due to an incorrect PEC or any other error. Errors discovered above the data link layer may also be indicated with a NACK if the device is fast enough to discover and indicate the error when the NACK is due.

An ACK received after a PEC by a master-transmitter means that no error could be determined by the link layer in the slave-receiver in time to supply a NACK. This might be because the receiver is not able to check the validity of the PEC in real time.
If a master transmitter wants to be sure that a write-operation is performed correctly at the target device, it must use some higher-layer mechanism to verify this. This might take the form of a read-with-PEC of the data; receipt of a correct PEC would reliably indicate that that the original write occurred without error.
When a master-receiver reads data from a slave-transmitter, the ACK/NACK supplied by the master-receiver at the end of the transaction has little meaning other than to mark the end of the last byte. The slave-transmitter is supplying the data, and if the PEC supplied by the slave-transmitter is correct, the master-receiver may assume that the data was received as the slave transmitted it. If not, it is up to the master-receiver to take any appropriate remedial action.

6.4.1.2 Master implementation

A master may use PEC on any transaction. It is required that the master have either a priori knowledge of whether or not the target slave supports PEC or a way to determine whether the target slave supports PEC. The use of PEC is governed by upper layer protocols (e.g. device drivers), specifications (e.g. requirements of the SMBus ARP protocol) or detection algorithms for a given class of devices (e.g. smart batteries).

6.4.1.3 Slave implementation
A slave device that implements Packet Error Checking must be prepared to receive and transmit data with or without a PEC. During a slave receive transfer, after the device has identified the protocol and command, it must accept and check the additional PEC for validity.
During a slave transmit transfer, the slave transmitter must respond to additional clocks after the last byte transfer and furnish a PEC to the master receiver
requesting it.
Each bus transaction requires a Packet Error Code (PEC) calculation by both the transmitter and receiver within each packet. The PEC uses an 8-bit cyclic
redundancy check (CRC-8) of each read or write bus transaction to calculate a Packet Error Code (PEC). The PEC may be calculated in any way that conforms to a CRC-8 represented by the polynomial, C(x) = x 8 + x 2 + x 1 + 1, and must be calculated in the order of the bits as received.
Calculating the PEC for transmission or reception is implemented in a method chosen by the device manufacturer. It is possible to perform the check with a low-cost hardware or a firmware algorithm that could process the message bit-by-bit or with a byte-wise look-up table. The SMBus web page provides some example CRC-8 methods.
The PEC is appended to the message as dictated by the protocols in Section 6.5. The PEC calculation includes all bytes in the transmission, including
address, command and data. The PEC calculation does not include ACK or NACK bits or START, STOP or REPEATED START conditions. This means that the PEC is computed over the entire message from the first START condition.

原文地址:https://www.cnblogs.com/eesky/p/11286930.html

时间: 2024-10-12 04:55:25

SMBus PEC的相关文章

【转】用户空间使用i2c_dev--不错

原文网址:http://blog.csdn.net/yuanlulu/article/details/6161706 ============================================作者:yuanluluhttp://blog.csdn.net/yuanlulu 版权没有,但是转载请保留此段声明============================================ 第1章 用户空间使用i2c_dev 对于注册的i2c适配器,用户空间也可以使用它们.在Li

VMware虚拟机安装Redhat7提示piix4_smbus:Host SMBus错误解决办法

错误: 系统开机出现错误提示:piix4_smbus 0000:00:007.3: Host SMBus controller not enabled 原因: 系统装入i2c_piix4模块所致,因为系统找不到这个模块,所以报错 处理方法: 1.查明装入模块的确切名字( lsmod | grep i2c_piix4 ),显示输出的结果是模块的确切名字:i2c_piix4 2.将该模块列入不装入名单.编辑文件vim /etc/modprobe.d/blacklist.conf,在末尾加入black

Ubuntu提示piix4_smbus:Host SMBus错误解决办法

1.编译内核时出现下面的错误 CHK     include/linux/version.h CHK     include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CALL    scripts/checksyscalls.sh CC      scripts/mod/empty.o /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-

VMware部署ubuntu后开机提示piix4_smbus: Host SMBus controller not enabled!

在虚拟机部署ubuntu10.04-server,每次启动完成之后,出现"piix4_smbus0000:00:07.3: Host SMBus controller not enabled!"提示信息 经网上搜索,是ubuntu装入i2c_piix4模块所致,处理方法: 1.查明装入模块的确切名字:lsmod | grep i2c # lsmod | grep i2c_piix4 i2c_piix4              12574  0 2.将该模块列入不装入名单.编辑文件/e

【转载】PMC/PEC Boundary Conditions and Plane Wave Simulation

原文链接 PMC/PEC Boundary Conditions and Plane Wave Simulation (FDTD) OptiFDTD now has options to use Perfect Electrical Conductor (PEC) and Perfect Magnetic Conductor (PMC) boundary conditions. You can choose which boundaries use the new conditions, and

SMBus

SMBus (System Management Bus,系统管理总线) 是1995年由Intel提出的,应用于移动PC和桌面PC系统中的低速率通讯.希望通过一条廉价并且功能强大的总线(由两条线组成),来控制主板上的设备并收集相应的信息. 1简介 SMBus (System Management Bus,系统管理总线) 是1995年由Intel提出的,应用于移动PC和桌面PC系统中的低速率通讯.它主要是希望通过一条廉价并且功能强大的总线(由两条线组成),来控制主板上的设备并收集相应的信息. SM

VMWARE里启动kylin16.0时出现'SMBus Host Controller not enabled'(还未进入系统)

在Vmware里安装完Ubuntu16.10,启动时出现'SMBus Host Controller not enabled'错误提示,进不到图形界面.网上搜了一下,解决办法是在图形界面里进终端窗口,编辑blacklist.conf文件,禁止i2c_piix4驱动的加载.但现在系统还没加载完,进不去终端窗口,如何处理呢? 解决办法如下(亲测可用): 在虚拟机上运行Linux内核版本为4.7或以上的系统都在安装过程中或在启动时会因为加载intel_powerclamp驱动而导致崩溃.解决办法:1.

SMBUS(IIC)总线

1.SPI和IIC一般都作为板上通信,UART.SMBUS和USB一般都作为板间通信. 其中SMBUS是参考IIC制定出来的眼生病,两者很像. 2.SMBUS的I/O接口是由两条线组成的双向串行总线.可工作在主从两种模式. SDA:串行数据的控制 SCL:串行时钟的产生.同步.仲裁以及起始/停止的控制和产生电路. 3.IIC(Inter IC BUS)具有多主机系统所要求的总线裁决和高低速同步功能的串行总线,它具有两根双向信号线. 4.IIC总线空闲时SCL/SDA两根线通过上拉电阻都为高电平.

linux SMbus错误

针对piix4_smbus ****host smbus controller not enabled的解决方法 查看文件并用超级权限修改内容 在末尾加入blacklist i2c--piix4 重启:reboot 原文地址:https://www.cnblogs.com/Demonfeatuing/p/9195258.html