Wrong data sampling when data setup time (tSU;DAT) is shorter than one I2C kernel clock period
Description
- 250 ns in Standard mode
- 100 ns in Fast mode
- 50 ns in Fast mode Plus
The device does not correctly sample the I2C-bus SDA line when tSU;DAT is smaller than one I2C kernel clock (I2C-bus peripheral clock) period: the previous SDA value is sampled instead of the current one. This can result in a wrong receipt of target address, data byte, or acknowledge bit.
Workaround
- In Standard mode, if the transmitter minimum setup time is 250 ns, the I2CCLK frequency must be at least 4 MHz.
- In Fast mode, if the transmitter minimum setup time is 100 ns, the I2CCLK frequency must be at least 10 MHz.
- In Fast-mode Plus, if the transmitter minimum setup time is 50 ns, the I2CCLK frequency must be at least 20 MHz.
Spurious bus error detection in controller mode
Description
In controller mode, a bus error can be detected spuriously, with the consequence of setting the BERR flag of the I2C_SR register and generating bus error interrupt if such interrupt is enabled. Detection of bus error has no effect on the I2C-bus transfer in controller mode and any such transfer continues normally.
Workaround
If a bus error interrupt is generated in controller mode, the BERR flag must be cleared by software. No other action is required and the ongoing transfer can be handled normally.
SDA held low upon SMBus timeout expiry in target mode
Description
For the target mode, the SMBus specification defines tTIMEOUT (detect clock low timeout) and tLOW:SEXT (cumulative clock low extend time) timeouts. When one of them expires while the I2C peripheral in target mode drives SDA low to acknowledge either its address or a data transmitted by the controller, the device is expected to report such an expiry and release the SDA line.
However, although the device duly reports the timeout expiry, it fails to release SDA. This stalls the I2C bus and prevents the controller from generating RESTART or STOP condition.
Workaround
- Wait until the frame is expected to end.
- Read the STOPF bit of the I2C_ISR register. If it is low, reset the I2C kernel by clearing the PE bit of the I2C_CR1 register.
- Wait for at least three APB clock cycles before enabling again the I2C peripheral.
I3C
I3C controller: unexpected read data bytes during a legacy I2C read
Description
Under specific conditions, unexpected data bytes are read during a legacy I2C read transfer.
- I3C acts as controller
- a legacy I2C read message is generated
- the STALLT bit of I3C_TIMINGR2 register is set to request the SCL clock to be stalled at low level on the 9th T-bit phase of data bytes (also known as ACK/NACK phase)
- instead of releasing the SDA line, the I2C target incorrectly drives SDA low on the 9th T-bit phase of the end of read from the I3C controller
To end a legacy I2C read, the I3C controller is supposed not to drive SDA low on the 9th T-bit, and to emit a NACK. If the STALLT bit of I3C_TIMINGR2 is set, the controller does not NACK for the purpose of ending the data read transfer.
During the same clock cycle, if the I2C target, instead of releasing the SDA line, incorrectly drives SDA low on this 9th T-bit phase of the end of read from the controller, then the controller detects an incorrect ACK on the I3C bus and keeps SCL clock running.
After 8 clock cycles, the I3C controller generates again an ACK instead of a NACK, and an unexpected dummy data byte is transferred to the RX-FIFO.
Then the target continues transferring data or releases the SDA line, thus causing additional dummy bytes to be received. The transfer can be stopped only when an overrun error occurs.
Workaround
- If the I3C controller is configured with S-FIFO mode enabled (SMODE bit set in I3C_CFGR), the transfer goes on until RX-FIFO is full. Then ERRF = 1 in I3C_EVR (an error occurred), PERR = 1 in I3C_SER (protocol error), DOVR = 1 in I3C_SER (RX-FIFO overrun), and CODERR[3:0] = 001 in I3C_SER (CE1 error).
It is recommended to enable the error interrupt by setting ERRIE in I3C_IER. When DOVR = 1 and CODERR[3:0] = 0001, flush the RX-FIFO inside the error interrupt service routine by setting RXFLUSH in I3C_CFGR, then clear the CERRF error flag.
- If the I3C controller is configured with S-FIFO mode disabled (SMODE bit cleared in I3C_CFGR), the I3C status register (I3C_SR) may be overwritten by the hardware if unread, thus failing to report any status overrun. An overrun can occur only as a data overrun if the DMA or the software stops reading the RX-FIFO during enough time for the RX-FIFO to be full with dummy bytes. Then both CE1 and DOVR flags are set and an error is reported (ERRF = 1, PERR = 1, CODERR[3:0] = 0001 and DOVR = 1).
Whatever S-FIFO configuration, implement a software timeout to inform that neither FCF nor ERRF error bit was raised during an acceptable time. Then, stop reading RX-FIFO to cause a data overrun to be reported. When an error is reported, if both CE1 and DOVR flags are set (ERRF = 1, PERR = 1, CODERR[3:0] = 0001 and DOVR = 1), flush the RX-FIFO.
I3C controller: SCL clock is not stalled during address ACK/NACK phase following a frame start, when enabled through I3C_TIMINGR2 register
Description
Under specific conditions, the I3C controller does not stall the SCL clock during the address ACK/NACK phase when this feature is configured through I3C_TIMINGR2 register.
- I3C acts as controller
- I3C is programmed to stall the SCL clock low during the address ACK/NACK phase (STALLA bit of I3C_TIMINGR2 set to 1 and STALL[7:0] bitfield of I3C_TIMINGR2 set to a non-null value)
- the address emitted by the controller follows a frame start and not a repeated start
The purpose of this programmed SCL clock stall time is to add an additional duration for the I3C target(s) to respond on the address ACK/NACK phase. However, the SCL clock is not stalled on this address ACK/NACK phase.
Workaround
Set NOARBH = 0 in I3C_CFGR in order to insert the arbitrable header between the frame start and the emitted address.
If the I2C/I3C target has still not enough time to respond to the emitted static/dynamic address, increase the SCL low duration for any open-drain phase by increasing SCLL_OD[7:0] value in I3C_TIMINGR0.
I3C controller: unexpected first frame with a 0x7F address when the I3C peripheral is enabled
Description
- I3C is initialized as I3C controller (CRINIT bit is set in I3C_CFGR whereas EN bit is kept cleared in I3C_CFGR).
- I3C is enabled (EN bit set in I3C_CFGR).
As a result, the I3C controller can incorrectly detect that the SDA line has been driven low by a target, interpret it as a start request, activate the SCL clock, and generate a 0x7F address followed by RNW bit = 1 that is not acknowledged.
This first frame completes without any other impact than this unexpected I3C bus activity.
Workaround
- Instead of configuring the alternate GPIO of the SDA line without any pull-up, temporary enable the GPIO pull-up.
- After a delay of 1 ms, disable GPIO pull-up.
- Initialize I3C as I3C controller by setting CRINIT in I3C_CFGR whereas EN bit is kept cleared in I3C_CFGR.
- Enable I3C by setting EN bit in I3C_CFGR.
As a result the I3C controller does not detect SDA low when it is enabled, and no unexpected frame is generated.
I3C controller: no timestamp on IBI acknowledge when timing control is used in Asynchronous mode 0
Description
When I3C acts as controller, it cannot provide a timestamp on an IBI acknowledge (named C_REF in MIPI I3C v1.1 specification).
As a result, when timing control is used in Asynchronous mode 0, the controller software cannot calculate the timestamp of the sampled data of the target(s) following a received and acknowledged IBI using payload data for timing control (T_C1 and T_C2) (see MIPI formula: ), despite the fact that the controller software can compute the duration C_C2 by using the formula:
When operating in Asynchronous mode 0, the sampled data received from the target(s) cannot be associated with a computed timestamp, and on controller side, they can not be time-correlated.
Workaround
- Allocate an available product timer by software and approximate the IBI acknowledge moment by when the timer is notified by an interrupt of a received and complete IBI.
- Program a broadcast/direct SETXTIME CCC with subcommand byte 0xDF to enter Asynchronous mode 0.
- After being notified of the command completion by the flag and/or the related interrupt (FCF flag is set in I3C_EVR), reset and enable the timer to start the counter.
- After being notified that an IBI is complete by the flag and/or the related interrupt (IBIF flag is set in I3C_EVR), read the value of the timer as C_TIM. The timestamp of the sampled data can then be approximated by using the formula:
knowing that
and that the IBI is complete after a 4-byte payload.
- Generate a broadcast/direct SETXTIME CCC with subcommand byte 0xFF to exit Asynchronous mode 0 to disable/deallocate the timer resource.
I3C target: device returns incorrect value on read RSTACT CCC
Description
When acting as I3C target, on direct read RSTACT CCC with defining byte 0x00, 0x01, or 0x02, the device used as target acknowledges but it returns the sent defining byte instead of the current RSTACT state.
Workaround
As controller, avoid sending RSTACT CCC read.
I3C target: device can report target error 0 before dynamic address assignment
Description
Target error 0 is expected to occur when the device acting as I3C target detects an invalid broadcast header after the dynamic address assignment. These invalid headers include 7’h3E + W, 7’h5E + W, 7’h6E + W, 7’h76 + W, 7’h7A + W, 7’h7C + W, 7’h7F + W, and 7’h7E + R.
However, this error detection can occur prematurely, before dynamic address assignment.
As a result, the device ignores bus traffic until it receives an exit pattern from the I3C controller. The controller cannot detect this state because the I3C target device, without a dynamic address, does not respond to read accesses.
The impact is minimal, as such invalid headers are not expected.
Workaround
Ensure that the I3C controller transmits an exit pattern frame if the target does not participate in the address assignment as expected.
I3C target: nonparticipation in dynamic address procedure after NACKed hot-join request
Description
Per the MIPI specification, an I3C target must respond to broadcast CCCs, including ENTDAA for dynamic address assignment, even after a nonacknowledged (NACKed) hot-join request.
However, the device ignores the dynamic address procedure and continues emitting hot-join requests until it receives an acknowledgment (ACK).
Workaround
Ensure that the controller enables hot-join requests and acknowledges a hot-join request from the device before starting the ENTDAA procedure.
I3C target: device fails to resynchronize with Sr or P condition in specific cases
Description
An I3C target must detect an Sr (repeated start) or P (stop) condition at any moment to resynchronize with the I3C controller.
However, the device acting as I3C target ignores the Sr or P conditions in the following cases:
- Sr occurring during the 9-bit address phase (7-bit address + RnW + ACK/NACK)
- Sr occurring during the 7-bit assigned address, parity or ACK/NACK bit, when the device wins ENTDAA CCC
- Sr or P occurring during the parity bit, defining byte, or data byte of a received CCC
- Sr or P occurring during the acknowledge bit received to acknowledge an IBI request
This may lead to an incorrect configuration (such as dynamic address), NACKing an unexpected address, or to I3C bus contention.
Workaround
To counteract the risk of incorrect configuration, ensure that the controller reads back the previously written register.
If the device does not acknowledge its target address, follow the recovery procedure described in the MIPI I3C standard.
Ensure that when the controller detects bus contention, it emits additional clock cycles and/or a reset pattern to resolve the issue.