Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The master mode on a 2-byte read was incorrectly NAKing prematurely. As per the ST datasheet for the CR1 register when using read Method 2, it's very important to clear the ACK bit AFTER clearing the ADDR (not before the ADDR is cleared!): Note: The POS bit is used when the procedure for reception of 2 bytes (see Method 2: transfer sequence diagram for master receiver when N=2) is followed. It must be configured before data reception starts. In this case, to NACK the 2nd byte, the ACK bit must be cleared just after ADDR is cleared. To check the 2nd byte as PEC, the PEC bit must be set during the ADDR stretch event after configuring the POS bit.
- Loading branch information