1、IPMIUARTPROTOCALIPMI 串口通信设计Release HistoryVersionCommentAuthorData0.1Initial releasegyl2007-5-150.2Add command:E508,E509, E50AModify command: E506gyl2007-8-30.3Add event command 0x5EFEReadreg command function adjustgyl2007-8-310.4 Add more eventgyl2008-1-220.5Log enable data adjustgyl2008-4-70.6ERR
2、log addgyl2008-05-130.7Add reset sys, Keep connection, add event for fpga bootgyl2008-07-250.8Add mutil DSP reset error issue(see mark read)Gyl2008-07-260.9Add netport linking eventGyl2008-07-311.0Add boardinfo handle (replace 0xE50B)Gyl2008-08-201.1Gyl2008-08-211串口通信数据报格式(SLIP)下面的规则描述了SLIP协议定义的帧格式:
3、1)数据报以一个称作END(0xc0)的特殊字符结束。同时,为了防止数据报到来之前的线路噪声被当成数据报内容,大多数实现在数据报的开始处也传一个END字符(如果有线路噪声,那么END字符将结束这份错误的报文。这样当前的报文得以正确地传输,而前一个错误报文交给上层后,会发现其内容毫无意义而被丢弃)。2)如果报文中某个字符为END,那么就要连续传输两个字节0xdb和0xdc来取代它。0xdb这个特殊字符被称作SLIP的ESC字符,但是它的值与ASCII码的ESC字符(0x1b)不同。3)如果报文中某个字符为SLIP的ESC字符,那么就要连续传输两个字节0xdb和0xdd来取代它。图2-2中的例子就
4、是含有一个END字符和一个ESC字符的IP报文。在这个例子中,在串行线路上传输的总字节数是原报文长度再加4个字节。2命令集索引CMDCOMMENTDATAACKDATA0xE500FPGA image downimage0x5E00Ack status0xE501DSP bootloader downimage0x5E01Ack status0xE502FPGA bootBoard num0x5E02Ack status0xE503DSP bootBoard +dsp number0x5E03Ack status0xE504Set serial port baudPort +Baud rate
5、0x5E04Ack status0xE505Set target log enableEnable port0x5E05Ack status0xE506Update EPROMEPROM head and data0x5E06Ack status0xE507Reset DSPSame with 0xE5030x5E07Ack status0xE508Read RegisterRegister type0x5E08Register data0xE509Write RegisterRegister type and data0x5E09Ack status0xE50AUpdate AMC firm
6、wareNOT SUPPORT0x5E0AAck status0xE50BGet firmware versionBoard num0x5E0BBoard info0xE50CGet error logNULL0x5E0CError log info0xE50DReset SYSNULL0x5E0DAck status or no response(do reset)0xE50Ekeep connectConnection time setting0x5E0EAck status0x5EFEEvent msg upload0x5EFFLog info upload3主机发送命令数据到目标机帧格
7、式:Cmd: 请求命令字,可以扩展。0xE500: FPGA firmware download. Sn: sequence number(0,1,2,3,.) Payload length: the length of payload data。 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: FPGA firmware image0xE501: dsp firmware download. Sn: sequence number(
8、0,1,2,3,.) Payload length: the length of payload data。 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: DSP firmware image.0xE502: FPGA boot. Sn: 0 Payload length: 1。 Payload crc: 0. Head crc: the 16bit crc check sum of hearder Data: board numb
9、er(1byte)0xE503: dsp boot Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: board number(1byte),dsp number(1byte)Note board number 02 AMC Board0xE504: set serial port baud. Sn: 0 Payload length: N Payload crc: 0. Head crc
10、: the 16bit crc check sum of hearder Data: 4byte(port), 4byte(Baud rate)0xE505: set target log enable. Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:0x03(uart 3 octern), 0x0(uart 0 2468), 0xFF(disable)0xE506: update EP
11、ROM. Sn: sequence number(0,1,2,3,.) Payload length: 2 + the length of payload data。 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: 1byte(eprom type),1byte(board num ), Eprom data()0xE507: Reset DSP Sn: 0 Payload length: 1 Payload crc: the 16b
12、it crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:1byte (board number), 1byte (dsp number)0xE508: Read Register Sn: 0 Payload length: 5 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:1byte (device:0-switch; 1-
13、sensor, 2-fan, 3-power, 4- hotswap), 4byte (switch-addr, sensor- (board number:2byte, sensor number:2byte),fan- (fan number: 4 byte), power-(board number: 4byte), hotswap-(board number: 4byte) )Byte 0Byte 1Byte 2Byte 3Byte 4Switch0Switch addrSensor1board numberSensor numfan2fan number(0)power3board
14、numberHotswap4board numberReset Octen5Cable6Note: board number 0:MCH 13 AMC 4 PowerBoardSensor num: thermal 010xE509: Write Register Sn: 0 Payload length: 9 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:1byte (device), 4byte (addr), 4byte(dat
15、a)0xE50A: Update AMC firmware (only support by MCH). Sn: 0 Payload length: 2 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: 1 bytes (board num (0xFF = ALL board) 1 bytes (Firmware type 0x00 = FPGA, 0x01 = DSP)0xE50B: Get firmware version. Sn:
16、 0 Payload length: 2 Payload crc: the 16bit crc check sum of Payload data.Head crc: the 16bit crc check sum of hearder Data: 1 bytes (board num (mch 0 123 + power board 4) 1 bytes (researve)0xE50C: Get ERROR LOG. Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc:
17、 the 16bit crc check sum of hearder Data: 1 bytes (reserved )0xE50D: Reset SYS. Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: 1 bytes (reserved )0xE50E: keep connect. Sn: 0 Payload length: 1 Payload crc: the 16bit crc
18、 check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: 1 bytes (0x*, after *sec not received keeping will reset octern, 0xFF stop keep, 0x00 keeping)/Note 即使没有启动KEEP, 也会在约30min后重启octern/ every ticks = 10sec * 254 = 42min; 实际使用必须switch; 1-sensor, 2-fan, 3-power, 4- hotswap 4by
19、te data (switch- reg data,Sensor- tmp(), fan- rpm , power- manager power 2byte(1OK, 0 failure), payload power 2byte(1OK, 0 failure),Hotswap- (1,板子插入,0未插)Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5Switchstatus0register dataSensorstatus1tmpfanstatus2RPMpowerstatus3manager pwpayload pwHotswapstatus4Inseartion
20、Reset OctenStatus5CableStatus6StateNote: cable state (bit 03 figure the cable port1-4 connection)0x5E09: Ack the Write Reg Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:1byte (status: 1(OK), 0(failure)0x5E0A: Ack the U
21、pdate AMC firmware (only support by MCH). Sn: 0 Payload length: 1 Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data:1byte (status: 1(OK), 0(failure)0xE50B: Ack Get firmware version. Payload length: N Payload crc: the 16bit crc check sum of Payloa
22、d data. Head crc: the 16bit crc check sum of hearder Data: N bytes data of stringFormat: “AVONACO”+ProductName+HardwareVersion+SN+PartNum(for Firmware version)0x5E0C: Get ERROR LOG. Sn: 0 Payload length: xx Payload crc: the 16bit crc check sum of Payload data. Head crc: the 16bit crc check sum of hearder Data: 1 bytes (New log num) 在get 一次后将清零,有新的log累计,然后log 依次后移,保证最前的都是最新的err log /*5 items1 bytes (error log type) 1 bytes (error log num)1 bytes (board num) / (0x10:MCH 0x72 74 76 AMC 0xC2 PowerBoard)1 bytes (reserved) LOG TY
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1