AUTO-ENUMERATION OF PERIPHERAL DEVICES ON A SERIAL COMMUNICATION BUS
Each device on a bus auto-enumerates at power up or reset to assign a unique address to the device based on the resistance value of an external resistor. A current source supplies a current to a terminal to which a resistor is coupled. Each device has a resistor attached with a different resistance value. Each device senses the voltage at the terminal and the voltage corresponds to the unique device address on the bus. Following enumeration, the devices on the bus are individually addressable using their unique address.
This application claims benefit of provisional application 63/124,381 filed Dec. 11, 2020, entitled “ENUMERATION OF PERIPHERAL DEVICES ON A SERIAL COMMUNICATION BUS”, naming as inventors James E. Heckroth et al., which application is incorporated herein by reference.
This application is related to the application entitled “ENUMERATION OF PERIPHERAL DEVICES ON A SERIAL COMMUNICATION BUS” naming James E. Heckroth et al., as inventors, filed the same day as the present application, application Ser. No. ______, attorney docket number 176-0414, which application is incorporated herein by reference.
BACKGROUND Field of the InventionThis application relates to identification of devices on a serial communication bus.
Description of the Related ArtA host controller often needs to communicate with multiple peripheral devices on a shared serial communications bus. In order to do this, some method of selecting, or “addressing” individual peripheral devices is required. One traditional approach is to provide an individual “chip-select” pin from the controller to each peripheral device. The downside of this approach is the number of pins required on the host controller when there are a large number of peripheral devices to be addressed.
Another common approach is to use a “daisy-chaining” arrangement in which data from the host is shifted through multiple peripheral devices in series using a common chip select signal. In this case, the peripheral device effectively takes on an address that is the device's position in the daisy-chain. This arrangement has the disadvantage of high “clock-cycle overhead” required when addressing a single peripheral in isolation.
The input shift registers 410, 412, and 414 of the peripheral devices are thus connected in series as depicted in
It would be desirable to avoid the pin penalty associated with the large number of pins on the host controller when there are a large number of peripheral devices to be addressed and the clock-cycle overhead present in a daisy-chained approach.
SUMMARY OF EMBODIMENTS OF THE INVENTIONIn one embodiment a peripheral device includes a terminal and a current source coupled to provide a current to the terminal. An address register stores an address corresponding to a voltage on the terminal, the address to identify the peripheral device on a bus.
In another embodiment a system for auto-enumeration of devices on a bus includes a plurality of devices coupled to the bus. A first device of the plurality of devices including a first terminal, a first current source coupled to provide a first current to the first terminal, and a first address register to store a first address corresponding to a first voltage on the first terminal. A second device of the plurality of devices includes a second terminal, a second current source coupled to provide a second current to the second terminal, and a second address register to store a second address corresponding to a second voltage on the second terminal.
In another embodiment a method for determining an address of a device on a bus includes supplying a terminal of the device with a current from a current source on the device. The device determines a voltage on the terminal and stores an address corresponding to the voltage in address register of the device.
The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
The use of the same reference symbols in different drawings indicates similar or identical items.
DETAILED DESCRIPTIONIf the peripheral devices can be “enumerated” with unique device addresses, then host communications can be directed to individual peripheral devices by the inclusion of a “peripheral device address” in the host-issued commands. That adds potential “overhead” in that the device address must be included in the host commands to the peripheral device, but that also allows communication with multiple peripheral devices using a single chip select signal, and without requiring excessive overhead when addressing individual devices in isolation. However, assigning “permanent” addresses for devices during device manufacturing is neither cost-effective nor practical. Embodiments herein address how to efficiently and effectively enumerate the peripheral devices dynamically in the field while using a minimal number of peripheral device pins and requiring no additional pins on the host controller.
Several approaches for dynamic enumeration of unique peripheral addresses are described herein. A first approach uses host controller enumeration of serial-bus peripheral devices using a daisy-chain arrangement. The first approach requires only one additional pin on the peripheral device and requires no additional signaling or additional pins on the host controller to accomplish enumeration.
Peripheral device “enumeration”, i.e., the process of assigning unique addresses to the peripheral devices, can be accomplished in a number of different ways. For example, the peripheral device address could be “permanently assigned” into on-chip read only memory (ROM) or one time programmable (OTP) memory during the device production process. However, that approach presents a number of logistical problems (e.g. part serialization/marking, part tracking from device manufacturer to board assembly) that render it impractical as compared to “dynamically assigned” methods. The peripheral device could include multiple logic input pins used to specify the device address during operation. These pins would be pulled high or low by wiring and/or external components (e.g., pull-up and pull-down resistors, shift registers, memory components) at the circuit board level. That approach has the disadvantage of requiring multiple pins, with associated external circuitry and/or components, the number of which depend on the number of peripherals that need to be addressed.
“Additional signaling” between the controller and each peripheral (signals other than the primary serial data output, serial data input, clock, and chip select) could be used as a “surrogate chip selects” to select individual peripheral devices for enumeration. Enumeration can then be coordinated by the host controller using a pre-defined protocol involving a combination of the primary serial communication signals and additional signaling. The practicality of this approach depends on the availability of such additional signaling in the application, and on the ability of the host controller to implement the pre-defined enumeration protocol using these additional signals.
New approaches for “dynamic” peripheral device enumeration are described herein. These new approaches allow dynamic peripheral device enumeration with a single chip select from the controller, and no additional controller pins or signaling other than the primary serial communication signals (serial data output, serial data input, clock, and chip select). Both approaches described herein require only one pin on the peripheral device for enumeration. In the first approach the controller enumerates the peripheral serial-bus peripheral devices arranged in a daisy-chain using only the standard serial communication bus signaling. The second approach described herein automatically enumerates serial-bus peripheral devices using analog detection and requires no action on the part of the controller to accomplish the enumeration of peripheral devices.
The peripheral devices have an internal switching mechanism 916, denoted “Switch” in
In daisy-chain mode, the SDI input is routed only to the input of the internal serial data shift register 917. The output of the shift register 917 is routed to the SDITHRU output, and the SDO output is disabled and set to a high-impedance (Hi-Z) state as indicated by the SDO output being connected to the DC position, which is not connected. The daisy-chain mode allows the controller to address the peripheral devices as a traditional daisy-chain arrangement, as depicted in
The peripheral devices default to the daisy-chain mode of operation at power-on and after being reset, and daisy-chain mode is used during initial controller-initiated enumeration of the peripheral devices. When operating in daisy-chain mode, peripheral devices will respond to commands according to the address/command in the shift register 917 when the CS_b signal is deasserted. In an alternative implementation, daisy-chain mode peripheral devices respond only to a pre-determined “broadcast” address. In either case, in daisy-chain mode the host controller addresses individual peripheral devices by nature of their position in the chain as described earlier.
In the second parallel (“Last Parallel”) mode, switch position LP, as shown for peripheral device n (907), the SDI input is routed only to the input of the internal serial data shift register 917. The output of the shift register is routed to the SDO output, and the SDITHRU output is disabled and set to a high-impedance (Hi-Z) state. The switch positions and thus the connections for the various inputs and outputs are controlled according to whether the device is operating in the daisy-chain mode of operation, the first parallel mode (P), or the second parallel mode (LP).
Post enumeration, peripheral devices 1 through n−1 are configured for the first parallel mode of operation, while device n (the last device in the chain) is configured for Last Parallel mode. That effectively results in the arrangement depicted in
The controller based enumeration requires that the controller “instruct” an addressed peripheral to enumerate (adopt the address provided by the controller), or to change operating mode (to DC, P or LP). In an embodiment these instructions are implemented using standard Write commands to registers defined for enumeration purposes and for setting the operating mode (DC, P, LP), or using designated “Enumerate” and “Set Mode” commands defined for these purposes. In an embodiment the example “Compact Command Structure” 930 shown in
The host controller initiates enumeration with the peripheral devices operating in daisy-chain mode as in
An enumeration command sequence for a 3-device chain, including optional read-back of the assigned addresses for verification prior to switching to Post-enumeration Parallel operation, is illustrated in
In addition to the unique device addresses assigned to each peripheral device to allow individual device access, embodiments use a designated “broadcast” address to allow the controller to write to all peripheral devices in parallel. Each peripheral device accepts write commands addressed to the devices own unique address, and write commands addressed to the broadcast address. Peripheral devices only respond to Read commands issued to their own unique addresses.
In the embodiment illustrated by
In applications where the optional “read-back verification of enumeration” is not required, the Enumeration and Set Mode commands can be combined. In this case, the Enumerate command or command sequence includes both the device address and the post-enumeration operating mode to be assigned to the receiving peripheral device, and the mode would be changed automatically at the end of the enumeration command cycle.
Peripheral devices described in
Another embodiment utilizes dynamic auto-enumeration of unique peripheral addresses and requires only one additional pin on each peripheral device and requires no additional signaling or additional pins on the host controller to accomplish enumeration. In an embodiment of the auto-enumeration approach, the additional peripheral device pin required for enumeration on the peripheral device is used only during device initial configuration at power-on (or other reset condition), and is available for other use after configuration. In the auto-enumeration approach, each peripheral device automatically enumerates based on the sensed value of an external resistor connected to a designated pin on the device. The auto-enumeration approach requires no action from the host controller.
The resolution required for the ADC used for resistor detection depends on the number of peripheral device addresses that must be resolved, the ADC input voltage range (semiconductor process utilized for implementation), the bias current level and current generator tolerance, and the tolerance of the external resistors.
In an embodiment, an automotive traction inverter application requires that a controller be able to individually address six isolated gate drivers as peripheral devices on a Serial Peripheral Interface (SPI) serial communication bus. The peripheral devices include an on-chip ADC with a full-scale input voltage range of 2.4V, and a 20 μA current source to bias the external enumeration resistors. In an embodiment the ADC input voltage range is divided into 6 equal ranges for address assignment as depicted in
After the enumeration is completed, the physical pin used for enumeration is available to be used for another function, provided that the other function is not required during power on initialization or reset. Ideally, the alternate use of the pin would be an output from the peripheral device, connected to high-impedance inputs on other devices that would not interfere with detection of the external resistor value during enumeration.
If a suitable ADC is not included for other purposes in the peripheral device, embodiments include a simple, low-cost flash converter 1800 for the auto-enumeration function. For a system requiring the enumeration of 6 SPI peripheral devices, an example 6-level flash converter design is illustrated in
The six comparators COMPO through COMPS and the digital decoder 1810 that follows the comparators generate a unique address for each peripheral device. The determination of ENUM voltage is shown at 1812. Random inaccuracies in REXTi, IREF, the 6 internal resistors 1802 and random offset in the comparators lead to inaccuracies in each VENUMi (VENUMi±Δi) and VSETi. These inaccuracies can be tolerated with enough voltage separation between the 6 internal setpoints.
Peripherals capable of sensing a voltage on an external resistor for enumeration can also be used in traditional “individual chip-select” arrangements by assigning the same address (e.g. same external resistor value) to each peripheral device.
Thus, approaches for enumeration of devices on a communication bus has been described. The description of the invention set forth herein is illustrative and is not intended to limit the scope of the invention as set forth in the following claims. Variations and modifications of the embodiments disclosed herein, may be made based on the description set forth herein, without departing from the scope of the invention as set forth in the following claims.
Claims
1. A peripheral device comprising:
- a terminal;
- a current source coupled to provide a current to the terminal; and
- an address register to store an address corresponding to a voltage on the terminal, the address to identify the peripheral device on a bus.
2. The peripheral device as recited in claim 1 further comprising an analog to digital converter to convert the voltage on the terminal to a digital value indicative of the address.
3. The peripheral device as recited in claim 1 wherein the peripheral device responds to a command on the bus containing the address in an address field of the command in accordance with the command.
4. The peripheral device as recited in claim 1 wherein the address is stored in the address register responsive to a power on condition.
5. The peripheral device as recited in claim 1 wherein the address is stored in the address register responsive to reset.
6. The peripheral device as recited in claim 1 wherein the terminal is used as an output terminal during operation of the peripheral device after the address is determined.
7. The peripheral device as recited in claim 1 wherein the voltage is determined according to the current provided to the terminal and a resistance coupled to the terminal.
8. The peripheral device as recited in claim 1 further comprising a communication interface coupled to the bus, the communication interface including, a clock terminal, a serial data in terminal, a serial data out terminal, and a chip select terminal.
9. A system for auto-enumeration of devices on a bus comprising:
- a plurality of devices coupled to the bus;
- a first device of the plurality of devices including a first terminal, a first current source coupled to provide a first current to the first terminal, and a first address register to store a first address corresponding to a first voltage on the first terminal; and
- a second device of the plurality of devices including a second terminal, a second current source coupled to provide a second current to the second terminal, and a second address register to store a second address corresponding to a second voltage on the second terminal.
10. The communication system as recited in claim 9 further comprising a plurality of resistors coupled respectively to the plurality of devices, a first resistor of the plurality of resistors is coupled to the first terminal and a second terminal of the plurality of resistors is coupled to the second terminal.
11. The communication system as recited in claim 10 wherein the first device is responsive to a command on the bus containing the first address and the second device is responsive to a second command on the bus containing the second address.
12. The communication system as recited in claim 10 wherein the plurality of devices includes six devices including the first device and the second device, and each of respective voltages on respective terminals of the plurality of devices have a different voltage and nominal values of the respective voltages are linearly spaced.
13. The communication system as recited in claim 10 wherein the plurality of devices includes six devices including the first device and the second device, and each of respective voltages on respective terminals of the plurality of devices have a different voltage and wherein nominal values of the respective voltages are non-linearly spaced.
14. The communication system as recited in claim 9 wherein the first device and the second device store the first address and the second address, respectively, in the first address register and the second address register responsive to a power on condition.
15. The communication system as recited in claim 9 wherein the first device and the second device store the first address and the second address, respectively, in the first address register and the second address register responsive to a reset.
16. The communication system as recited in claim 9 wherein the first terminal is used as an output terminal following determination of the first address.
17. The communication system as recited in claim 9 wherein each of the plurality of peripheral devices comprises a communication interface coupled to the bus and the communication interface includes a clock terminal, a serial data in terminal, a serial data out terminal, and a chip select terminal.
18. A method for determining an address of a device on a bus comprising:
- supplying a terminal of the device with a current from a current source on the device;
- determining a voltage on the terminal; and
- storing an address corresponding to the voltage in address register of the device.
19. The method as recited in claim 18 further comprising converting the voltage to a digital value in an analog to digital converter.
20. The method as recited in claim 18 further comprising the device responding to a command on the bus containing the address in an address field of the command.
21. The method as recited in claim 18 further comprising storing the address in the address register responsive to a power on condition.
22. The method as recited in claim 18 further comprising storing the address in the address register responsive to reset.
23. The method as recited in claim 18 further comprising using the terminal as an output terminal during operation of the peripheral device after a power on condition.
24. The method as recited in claim 18 further comprising generating the voltage according to the current and a resistance of a resistor coupled to the terminal.
Type: Application
Filed: Dec 9, 2021
Publication Date: Jun 16, 2022
Inventors: James E. Heckroth (Austin, TX), Patrick Johannus De Bakker (Hollis, NH), Ion Constantin Tesu (Austin, TX), Phillip M. Matthews (Driftwood, TX)
Application Number: 17/546,588