This application claims priority to French Patent Application No. 1906951, filed on Jun. 26, 2019, which application is hereby incorporated herein by reference.
Embodiments relate to a method and device for addressing an integrated circuit on a bus.
The I2C (“inter-integrated circuit”) bus is a well-known inter-integrated circuit serial communication standard.
The I2C bus has two wires, a serial data line SDA and a serial clock line SCL, which transmit information between the integrated circuits connected to the I2C bus. Each slave integrated circuit is recognized by a unique slave address (whether it is, for example, a microcontroller, a memory or a keyboard interface) and is able to operate as a transmitter and/or a receiver, depending on the function of the integrated circuit.
The unique slave address is generally assigned to the slave integrated circuit during manufacture thereof.
In addition to transmitters and receivers, the integrated circuits may also be considered to be masters or slaves during the transmission of data. A master integrated circuit is the device that triggers a transfer of data on the bus and generates the clock signals to allow this transfer. At this time, any addressed integrated circuit is considered to be a slave.
The line SDA is a bidirectional line, and the data to be communicated via the I2C bus are formed by signals that may have a HIGH level or a LOW level.
During a data transmission, the signal of the line SDA must be stable during the HIGH period of the clock signal. The HIGH or LOW state of the data line SDA is able to change only when the clock signal on the line SCL is LOW.
All of the transactions begin with a starting condition “START” STT and finish with an end condition “STOP” STP. A HIGH to LOW transition on the line SDA whilst SCL is HIGH defines a starting condition STT. A LOW to HIGH transition on the line SDA whilst SCL is HIGH defines an end condition STP.
On the line SDA, the HIGH and LOW levels of the signal represent the logic values “1” and “0” respectively.
The data transfers follow the format shown by
The data DATA1, DATA2 are transmitted byte-wise (i.e. 8 bits) on the line SDA. The number of bytes that is able to be transmitted per transfer is unlimited. Each byte must be followed by a confirmation bit ACK. By convention, the data DATA1, DATA2 are transferred with the most significant bit MSB in first position.
Confirmation takes place after each byte. The confirmation bit ACK allows the receiver to signal to the transmitter that the byte has been successfully received and that another byte may be dispatched.
A data transfer always finishes with an end condition STP generated by the master.
However, the unique slave address may be common to a plurality of integrated circuits, for example when the slave integrated circuits are provided by different manufacturers, creating an address conflict, the master integrated circuit receiving a plurality of messages in response to a message containing a slave address.
In other uses of the bus, the unique slave address assigned by the manufacturer of the slave integrated circuit is not suitable for the implementation of the bus. It is then necessary to modify this address such that instructions implemented by the master integrated circuit identifying a specific integrated circuit, for example a keyboard, bears a predefined slave address.
At present, integrated circuits incorporate input/output ports, known to those skilled in the art under the acronym GPIO “general-purpose input/output”, for configuring the unique slave address.
However, ports are used exclusively or temporarily to address the slave integrated circuit to the detriment of other functionalities or limiting the use of the ports. If additional ports are required for other functionalities, it is necessary to add ports, accordingly increasing the silicon surface of the slave integrated circuit and its consumption.
Another known solution consists, when manufacturing the circuit, in assigning a predetermined address provided by the user of the circuit.
However, this complicates the manufacture of the circuit.
Modes of implementation and embodiments of the invention relate to integrated circuits connected to a bus, for example, at least one slave integrated circuit and one master integrated circuit that are connected by an I2C bus. Particular embodiments relate to the addressing of these slave circuits on the bus.
Embodiments can simplify the addressing of a slave integrated circuit without using ports and while offering increased flexibility in the addressing of the circuit.
According to some modes of implementation and embodiments, it is advantageously proposed to draw on a communication standard to change the unique slave address without using physical resources (hardware) of the slave integrated circuit.
According to one aspect, a method can be used for addressing at least one slave integrated circuit connected to a bus. The at least one slave circuit has a default address on the bus. The method includes, within the at least one slave integrated circuit, replacing the default address with a replacement address upon receiving an addressing message conveyed on the bus and containing the replacement address.
The default address is advantageously changed by receiving the addressing message able to be interpreted by way of a communication interface of the slave integrated circuit without implementing additional physical resources (hardware) of the slave integrated circuit.
According to one mode of implementation, the bus is an I2C bus, and the addressing message is transmitted by a master integrated circuit connected to the bus.
According to another mode of implementation, the at least one slave integrated circuit also has a second unique address, and the addressing message contains the second address, such that the slave integrated circuit identifies itself as being the intended recipient of the addressing message.
Only the slave integrated circuit denoted by the second unique address contained in the addressing message is configured so as to replace its default address with the replacement address.
The second unique address is an extended address of the slave integrated circuit.
In contrast to the default address, this address is not recognized by the bus.
According to yet another mode of implementation, a plurality of slave integrated circuits are connected to the bus, and the addressing message furthermore contains an indication able to be interpreted by the slave circuits, only the slave integrated circuit denoted by the second address contained in the addressing message replacing its default address with the replacement address.
According to yet another mode of implementation, replacing the default address with the replacement address comprises storing the replacement address in a non-volatile memory of the slave integrated circuit and, upon each subsequent restart of the slave circuit. The slave integrated circuit reads the content of the memory defining its default address on the bus.
Upon each subsequent restart with the replacement of the default address with the replacement address, the slave integrated circuit is identified on the bus by the replacement address.
According to another mode of implementation, replacing the default address with the replacement address comprises storing the replacement address in a volatile memory of the slave integrated circuit and, upon each subsequent restart of the slave integrated circuit. The master integrated circuit retransmits the addressing message.
According to another aspect, what is proposed is a device, comprising at least one slave integrated circuit connected to a bus, the at least one slave circuit having a default address on the bus, the device being configured so as to replace the default address within the at least one slave integrated circuit with a replacement address upon receiving an addressing message conveyed on the bus and containing the replacement address.
According to one embodiment, the device furthermore comprises a master integrated circuit connected to the bus, the bus being an I2C bus, the master circuit being configured so as to transmit the addressing message.
According to another embodiment, the slave integrated circuit also has a second unique address, and the addressing message contains the second address, such that the slave integrated circuit is configured so as to identify itself as being the intended recipient of the addressing message.
According to yet another embodiment, the device has a plurality of slave integrated circuits connected to the bus, and the addressing message furthermore contains an indication able to be interpreted by the slave integrated circuits, only the slave integrated circuit denoted by the second address contained in the addressing message being configured so as to replace its default address with the replacement address.
According to yet another embodiment, the slave integrated circuit comprises a non-volatile memory configured so as to store the replacement address such that, upon each subsequent restart of the slave integrated circuit, the slave integrated circuit is configured so as to read the content of the memory defining its default address on the bus.
According to yet another embodiment, the slave integrated circuit comprises a volatile memory configured so as to store the replacement address, the master integrated circuit being configured so as to retransmit the addressing message upon each subsequent restart of the slave integrated circuit.
Other advantages and features of the invention will become apparent upon examining the detailed description of completely non-limiting embodiments and the appended drawings, in which:
Reference is made to
The device 1 furthermore comprises a master integrated circuit 4 connected to the bus 3. The master integrated circuit 4 is identified on the bus 3 by an address ADD4. The bus 3 is for example an I2C bus.
The device 1 may comprise a second slave integrated circuit 5 configured so as to communicate with the bus 3.
The second slave integrated circuit 5 may have an architecture identical to the slave integrated circuit 2 or a different architecture.
It is assumed hereinafter that the second slave integrated circuit 5 has an architecture identical to the slave integrated circuit 2.
The slave integrated circuit 2 comprises a communication interface 6 configured so as to communicate with the bus 3, a processing unit 7 and a non-volatile memory 8 that are connected to one another by an internal bus 9.
The non-volatile memory 8 is for example a flash memory.
The communication interface 6 comprises a communication module 10 connected firstly to the serial data line SDA and to the serial clock line SCL of the bus 3, and secondly to a volatile memory 11, for example a RAM memory.
The communication interface 6 furthermore comprises an initialization register 12.
The volatile memory 11 and the initialization register 12 are connected to the internal bus 9.
The initialization register 12 contains a default address ADD1 and a second unique address ADD2 (extended address) that are given by the manufacturer of the device 1.
The default address ADD1 allows the master integrated circuit 4 to identify the slave integrated circuit 2 on the bus 3.
As the slave integrated circuits 2 and 5 have an identical architecture, it is assumed that the default address of the second circuit 5 is identical to that of the slave integrated circuit 2, such that the two circuits 2 and 5 are identified on the bus 3 by the same address ADD1, and that the second circuit 5 has a second unique address ADD21 different from the second unique address ADD2 of the slave integrated circuit 2.
As the two integrated circuits 2 and 5 have the same address ADD1 on the bus, the two circuits 2 and 5 create an addressing conflict on the bus 3.
It is then necessary to modify the default address of at least one of the slave integrated circuits 2 and 5.
Hereinafter, it is proposed to replace the default address of the slave integrated circuit 2.
The device 1 is configured so as to replace the default address ADD1 within the slave integrated circuit 2 with a replacement address ADD3 upon receiving an addressing message MESS conveyed on the bus 3 and containing the replacement address ADD3.
The master integrated circuit 4 is configured so as to transmit the addressing message MESS.
The addressing message MESS furthermore contains an indication IND able to be interpreted by the slave integrated circuits 2 and 5, and instructions INST to replace the default address ADD1 with the address ADD3 on the bus 3.
The addressing message MESS furthermore contains the second address ADD2, such that the slave integrated circuit 2 identifies itself as being the intended recipient of the addressing message.
Only the slave integrated circuit 2 denoted by the second address ADD2 contained in the addressing message MESS is configured so as to replace its default address ADD1 with the replacement address ADD3.
The non-volatile memory 8 is configured so as to store the replacement address ADD3 such that, upon each subsequent restart of the slave integrated circuit 2, the slave integrated circuit 2 reads the content of the memory defining its default address ADD1 on the bus.
Upon each restart, the processing unit 7 reads the content of the non-volatile memory 8. If the memory 8 contains the address ADD3, the processing unit 7 copies the address ADD3 into the volatile memory 11. The address ADD3 is used by the communication module 10 to identify the slave integrated circuit 2 on the bus.
In the following text, the same alphanumeric references denote the same elements.
Reference is made to
As shown, the slave integrated circuits 2 and 5 and the master integrated circuit 4 are connected to the bus 3.
This embodiment differs from the first embodiment illustrated in
The volatile memory 11 is configured so as to store the replacement address ADD3.
The master integrated circuit 4 is configured so as to retransmit the addressing message MESS upon each subsequent restart of the slave integrated circuit 2.
The addressing message MESS furthermore comprises the address ADD4 of the master integrated circuit 4.
Reference is made to
In a first step 20, the master integrated circuit 4 transmits the starting condition STT followed by the indication IND able to be interpreted by the slave integrated circuits 2 and 5. In the case of the I2C bus, this is a general call represented by one byte, all of the bits of which are equal to the low level “0”.
Upon receiving confirmation bits ACK transmitted by the slave integrated circuits 2 and 5 capable of interpreting the indication IND, the master integrated circuit 4 transmits a byte comprising its address ADD4 coded on seven bits and one high-level bit “1” (step 21).
If a slave integrated circuit is not capable of interpreting the indication IND, it does not return a confirmation bit ACK.
In this case, it is not able to modify its default address.
Upon receiving confirmation bits ACK transmitted by the slave integrated circuits 2 and 5, the master integrated circuit 4 transmits a byte comprising the instructions INST (step 22).
Upon receiving confirmation bits ACK transmitted by the slave integrated circuits 2 and 5, the master integrated circuit 4 transmits a byte comprising the second unique address ADD2 coded on a plurality of bits (step 23).
If the address ADD2 is coded on more than eight bits, the master integrated circuit 4 divides the address ADD2 into a plurality of bytes, each byte being transmitted after the reception of a confirmation bit transmitted by the slave integrated circuits 2 and 5.
Then, upon receiving confirmation bits ACK transmitted by the slave integrated circuits 2 and 5, the master integrated circuit 4 transmits a byte comprising the replacement address ADD3 coded on one byte (step 24).
Then, upon receiving confirmation bits ACK transmitted by the slave integrated circuits 2 and 5, the master integrated circuit 4 transmits the end condition STP (step 25).
The message MESS is stored in the volatile memory 11 of each slave integrated circuit 2, 5 as it is received.
Upon receiving the end condition STP, the processing unit 7 of each slave integrated circuit 2, 5 executes the message MESS stored in the volatile memory 11 (step 26).
As the slave integrated circuit 2 has the second unique address ADD2, the processing unit 7 stores the address ADD3 in the non-volatile memory 8.
When the slave integrated circuit 2 does not have a non-volatile memory, the processing unit 7 stores the address ADD3 in the volatile memory 11.
In this case, upon each restart of the slave integrated circuit 2, the master integrated circuit 4 is informed of the starting of the circuit 2 by the bus 3 and retransmits the addressing message MESS.
As a variant, the addresses ADD1 and ADD3 may be coded on ten bits in accordance with the I2C standard, the address containing a first byte containing the code 11110 on the first five bits following the two most significant bits of the address and a second byte containing the eight following bits of the address.
As a variant, the addressing message MESS may furthermore comprise a code for checking the integrity of the dispatched data, such that the master integrated circuit transmitting the addressing message MESS is able to ensure that the slave integrated circuit that is the intended recipient of the addressing message has received the addressing message MESS.
Of course, although the bus 3 is an I2C bus in the above text, the addressing method also applies to any bus able to transit a general call able to be interpreted by slave integrated circuits connected to the bus.
Number | Date | Country | Kind |
---|---|---|---|
1906951 | Jun 2019 | FR | national |
Number | Name | Date | Kind |
---|---|---|---|
6009479 | Jeffries | Dec 1999 | A |
6438624 | Ku | Aug 2002 | B1 |
6745270 | Barenys | Jun 2004 | B1 |
7694050 | Chan et al. | Apr 2010 | B1 |
8225021 | Adkins | Jul 2012 | B2 |
8386657 | Adkins | Feb 2013 | B2 |
10063839 | Muukki | Aug 2018 | B2 |
10204066 | Miluzzi | Feb 2019 | B2 |
10459862 | Miluzzi | Oct 2019 | B2 |
10817451 | Tabuchi | Oct 2020 | B1 |
10860509 | Watkins | Dec 2020 | B1 |
20100306431 | Adkins | Dec 2010 | A1 |
20110119419 | Chapelle | May 2011 | A1 |
20120284429 | Adkins | Nov 2012 | A1 |
20130318267 | Chapelle | Nov 2013 | A1 |
20160323558 | Muukki | Nov 2016 | A1 |
20180143935 | Cox | May 2018 | A1 |
20180150424 | Miluzzi | May 2018 | A1 |
20190114274 | Miluzzi | Apr 2019 | A1 |
Number | Date | Country |
---|---|---|
1461440 | Dec 2003 | CN |
112131165 | Dec 2020 | CN |
2004510228 | Apr 2004 | JP |
20150061348 | Jun 2015 | KR |
2571583 | Dec 2015 | RU |
WO-0225449 | Mar 2002 | WO |
WO-2010138745 | Dec 2010 | WO |
WO-2012054066 | Apr 2012 | WO |
WO-2019204292 | Oct 2019 | WO |
Entry |
---|
‘I2C Dynamic Addressing’ Application Report SCAA137, by Texas Instruments, Jul. 2019. (Year: 2019). |
‘Troubleshooting I2C Bus Protocol’Application Report SCAA106, by Texas Instruments, Oct. 2009. (Year: 2009). |
‘The I2C-BUS Specification’ Version 2.0, Dec. 1998. (Year: 1998). |
‘PSoC Creator Component Datasheet—I2C Master/Multi-Master/Slave 3.0’ Cypress, 2011. (Year: 2011). |
Number | Date | Country | |
---|---|---|---|
20200409902 A1 | Dec 2020 | US |