SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The 1-Wire mode requires an initialization pulse to be sent to the slave(s) connected on the interface. If a slave is present, it responds with a presence pulse.
The initialization pulse is sent when the HDQ_CTRL_STATUS[2] INITIALIZATION bit is set and the HDQ_CTRL_STATUS[4] GO bit is set afterwards.
When the slave receives the initialization pulse, it sends back its presence pulse by pulling down the line for a defined duration. The module detects this low-level pulse and sets the HDQ_CTRL_STATUS[3] PRESENCEDETECT bit.
In a similar way, if a presence pulse is not received from the slave after an initialization pulse is sent, the PRESENCEDETECT bit remains cleared.
Whether or not a presence pulse is detected after an initialization pulse is sent, the HDQ_INT_STATUS[0] TIMEOUT bit is set and an interrupt condition is generated.
In 1-Wire mode, the generated interrupt condition means the maximum time allowed for receiving the response has elapsed and the software must check the PRESENCEDETECT bit to determine whether or not there was a presence pulse.
The INITIALIZATION bit is cleared at the end of the initialization pulse at the same time as the TIMEOUT bit is set. The TIMEOUT bit is cleared when the interrupt status register (HDQ_INT_STATUS) is read.
For read operations, 1-Wire is a bit-by-bit protocol, which means the slave must be clocked by the host for each bit of the byte to read.
The line is pulled up at the end of the command/address byte. On the first read, the host creates a low-going edge to initiate a bit read. The line is then pulled up (pulled to the high-impedance state by the host and set to a high logical level by the external pullup) and the slave either drives the line low to transmit a 0, or does not drive the line to transmit a 1. This sequence is repeated for each bit to read.
The first bit the host receives is the LSB, and the last bit is the most-significant bit (MSB) in the receive data register (HDQ_RX_DATA).
An interrupt condition indicates either a TX-complete, an RX-complete, or a time-out condition (that is, the time allowed for the slave to indicate its presence has elapsed). A read operation on the interrupt status register clears the interrupt conditions previously set. As in the HDQ mode, only one interrupt signal is sent to the host CPU. Only an overall mask bit can enable or disable the interrupt (the interrupt conditions cannot be masked individually).