CN-116841941-B - Method and device for transmitting single-board hardware information of distributed equipment
Abstract
The application provides a method and a device for transmitting single board hardware information of distributed equipment, the method comprises the steps of receiving a first I 2 C controller setting serial code command word with a writing control bit from another single board, analyzing a written device address carried by the first I 2 C controller setting serial code command word, analyzing a written register address corresponding to a register address width in the first I 2 C controller setting serial code command word, analyzing a written data width in the first I 2 C controller setting serial code command word, receiving more than one written data serial code command word from the other single board, receiving first I 2 C controller starting serial code command word from the other single board, analyzing written data carried by the more than one written data serial code command word, writing the analyzed data into a register corresponding to the written register address on a hardware device corresponding to the written device address through an I 2 C bus.
Inventors
- Qiao Xuelian
- LI RUI
Assignees
- 新华三技术有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230228
Claims (10)
- 1. A method of communicating on-board hardware information for a distributed device, the method comprising, Receiving a first I 2 C controller setting string code command word with a writing control bit from another single board; Analyzing the written device address carried by the serial code command word set by the first I 2 C controller; analyzing a written register address corresponding to the register address width in the first I 2 C controller-set string code command word; Analyzing the first I 2 C controller to set the writing data width in the serial code command word; Receiving more than one written data string code command words from the other single board; Receiving a first I 2 C controller start string code command word from the other single board; Analyzing the written data carried by the more than one written data string code command words, wherein the byte number of the written data is smaller than or equal to the width of the written data; And writing the resolved data into a register corresponding to the written register address on a hardware device corresponding to the written device address through an I 2 C bus.
- 2. The method of claim 1, wherein the method further comprises; receiving a second I 2 C controller setting string code command word with a read control bit from the other single board; analyzing the address of the read device carried by the serial code command word set by the second I 2 C controller; analyzing a read register address corresponding to a register address width in the second I 2 C controller-set string code command word; Analyzing the read data width in the serial code command word set by the second I 2 C controller; Receiving a second I 2 C controller start string code command word from the other single board; Receiving data stored in a register corresponding to the address of the register to be read, which is sent by a hardware device corresponding to the address of the device to be read, through the I 2 C bus; Writing the received data storage into each uplink data register in sequence, and sending the data stored in each full uplink data register to the other single board through more than one uplink data string code command word; And stopping receiving through the I 2 C bus when the total byte number of the received data is equal to the read data width.
- 3. The method according to claim 1, characterized in that the method further comprises the steps of, Receiving an I 2 C controller reset string code command word with a read control bit from the other single board; Receiving a third I 2 C controller start string code command word from the other single board; And transmitting reset signals of nine clock cycles through the I 2 C bus.
- 4. The method of claim 1, wherein the written data string command word is received from the other board as a plurality and a plurality of the type command words of the written data string command word are set in a storage order of the written data.
- 5. The method of claim 2, wherein the upstream data string command word is a plurality of and a plurality of the type command words of the upstream data string command word are set in a storage order of the read data.
- 6. An apparatus for transmitting single board hardware information of a distributed device, characterized in that, The serial code stream module is used for receiving a first I 2 C controller setting serial code command word with a writing control bit from another single board, analyzing a written device address carried by the first I 2 C controller setting serial code command word, analyzing a written register address corresponding to a register address width in the first I 2 C controller setting serial code command word, analyzing writing data width in the first I 2 C controller setting serial code command word, receiving more than one written data serial code command word from the other single board, receiving a first I 2 C controller starting serial code command word from the other single board, analyzing written data carried by the more than one written data serial code command word, and enabling the number of bytes of the written data to be smaller than or equal to the writing data width; And the I 2 C module is used for writing the resolved data into a register corresponding to the written register address on the hardware device corresponding to the written device address through the I 2 C bus.
- 7. The apparatus of claim 6, wherein the device comprises a plurality of sensors, The serial code stream module is further configured to receive a second I 2 C controller set serial code command word with a read control bit from the other board, parse a read device address carried by the second I 2 C controller set serial code command word, parse a read register address corresponding to a register address width in the second I 2 C controller set serial code command word, parse a read data width in the second I 2 C controller set serial code command word, and receive a second I 2 C controller start serial code command word from the other board; The I 2 C module is further configured to receive, through the I 2 C bus, data stored in a register corresponding to the read register address, where the register corresponds to the read register address, and the data is sent by a hardware device corresponding to the read device address; The serial code stream module is further configured to sequentially write the received data storage into each uplink data register and send the data stored in each full uplink data register to the other board through more than one uplink data serial code command word; The I 2 C module is further configured to stop receiving via the I 2 C bus when a total number of bytes of received data is equal to the read data width.
- 8. The apparatus of claim 6, wherein the device comprises a plurality of sensors, The serial code stream module is also used for receiving an I 2 C controller reset serial code command word with a read control bit from the other single board, receiving a third I 2 C controller start serial code command word from the other single board; The I 2 C module is further configured to send a reset signal with nine clock cycles through the I 2 C bus.
- 9. The apparatus of claim 7, wherein the device comprises a plurality of sensors, The serial code stream module receives the written data serial code command words from the other single board, and the written data serial code command words are sequentially stored according to the type command words of the written data serial code command words.
- 10. The apparatus of claim 7, wherein the serial code stream module further sets a plurality of type command words of the upstream data serial code command words in a storage order of the read data with the plurality of upstream data serial code command words to the other board.
Description
Method and device for transmitting single-board hardware information of distributed equipment Technical Field The application relates to a communication technology, in particular to a method and a device for transmitting single-board hardware information of distributed equipment. Background The distributed communication equipment is composed of a plurality of single boards with different functions, such as a main control board 21, an interface board/screen board and the like, an IPC message with fault information recorded by the board is generated by a processor of the interface board/screen board and is sent to a CPU of the main control board 21 through an IPC chip of the board and an IPC chip of the main control board 21, and the CPU of the main control board 21 analyzes and locates fault reasons. When one path of single-board power supply of the interface board/the screen board of the distributed communication equipment fails, the IPC chip and the CPU chip of the interface board/the screen board can be powered down in order to meet the power-down time sequence of the chip, but the power management chip and the power-on control device adopt independent power supply, the power management chip outputs a changed PG (power good) signal through the power-on control device, a register for recording the power state of the interface board/the screen board on the main control board 21 is set as a numerical value for marking the power failure, and the CPU of the main control board 21 accesses the power management chip through a CAN (Controller Area Network) bus and I 2 C to acquire the information recorded by the register of the power management chip to position the power failure problem of the interface board/the screen board. The main control board 21 CAN also obtain information stored in registers of other hardware devices of the interface board/screen board through the CAN bus and the I 2 C bus during the period that an IPC (Inter-Processor Communication) chip of the interface board/screen board cannot be powered on, so as to position the interface board/screen board and obtain/analyze the running state of the interface board/screen board. However, the CPU of the main control board 21 accesses the power management chip of the interface board/net board through the CAN bus to have higher complexity of the debug interface, more wires are routed on the back board, more complex function implementation and more related hardware and software joint debugging functions are required. Disclosure of Invention The application aims at a method and a device for transmitting single-board hardware information of distributed equipment, which are used for performing read-write operation on the hardware of an interface board/screen board through I 2 C when an IPC chip cannot be powered on. In order to achieve the above objective, the present application provides a method for transmitting single board hardware information of a distributed device, which includes receiving a first I 2 C controller set string command word with a write control bit from another single board, parsing a written device address carried by the first I 2 C controller set string command word, parsing a written register address corresponding to a register address width in the first I 2 C controller set string command word, parsing a write data width in the first I 2 C controller set string command word, receiving more than one written data string command word from another single board, receiving a first I 2 C controller start string command word from another single board, parsing written data carried by more than one written data string command word, writing the parsed data into a register corresponding to the written register address on a hardware device through an I 2 C bus. The application further provides a device for transmitting single board hardware information of the distributed equipment, which comprises a serial code stream module and an I 2 C module, wherein the serial code stream module is used for receiving a first I 2 C controller setting serial code command word with a writing control bit from another single board, analyzing a written device address carried by the first I 2 C controller setting serial code command word, analyzing a written register address corresponding to a register address width in the first I 2 C controller setting serial code command word, analyzing a written data width in the first I 2 C controller setting serial code command word, receiving more than one written data serial code command word from another single board, receiving a first I 2 C controller starting serial code command word from another single board, analyzing more than one written data carried by the data serial code command word, wherein the number of written data is smaller than or equal to the written data width, and the I 2 C module is used for enabling the analyzed data written device to correspond to the written device address corresponding to the written