Skip to content

Add support for repeated starts in slave mode #3908

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2015

Conversation

sandeepmistry
Copy link
Contributor

From the SAM3X Datasheet

Section 33.11.6:

TXCOMP used in Slave mode:
0 = As soon as a Start is detected.
1 = After a Stop or a Repeated Start + an address different from SADR is detected.

With a repeated start and same address it will not be set, however EOSACC will be as shown in Figure 33-30 and 33-31.

This change removes the check for TXCOMP, and only checks for EOSACC to be set when not idle, to return back to the idle state. This enables support repeated starts for both RX and TX in slave mode.

@cmaglie cmaglie added Library: Wire The Wire Arduino library feature request A request to make an enhancement (not a bug fix) labels Oct 14, 2015
@sandeepmistry sandeepmistry added the Architecture: SAM Applies only to the SAM microcontrollers (Due) label Oct 22, 2015
From the data sheet TXCOMP is only set after a stop or repeated start
and address change, but EOSACC is set for a stop or repeated start when
the address remains the same. This change removes the check for TXCOMP
when not idle, to support repeated starts for both RX and TX.
@sandeepmistry sandeepmistry force-pushed the sam-wire-repeated-starts branch from 0f36f37 to 77179d7 Compare October 29, 2015 20:16
@cmaglie cmaglie merged commit 77179d7 into arduino:master Oct 29, 2015
@cmaglie cmaglie added this to the Release 1.6.6 milestone Oct 29, 2015
@sandeepmistry sandeepmistry deleted the sam-wire-repeated-starts branch July 18, 2016 18:06
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due) feature request A request to make an enhancement (not a bug fix) Library: Wire The Wire Arduino library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants