Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(wire): support only 7 bits addressing mode#2493

New issue

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

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 2 commits intostm32duino:mainfromfpistm:7bits_only
Aug 22, 2024

Conversation

fpistm
Copy link
Member

Arduino does not support 10 bits addressing mode.
The API is limited to anuint8_t address:
https://github.com/arduino/ArduinoCore-API/blob/4a02bfc0a924e1fec34c3bb82ffd5dfba7643a0c/api/HardwareI2C.h#L31
https://github.com/arduino/ArduinoCore-API/blob/4a02bfc0a924e1fec34c3bb82ffd5dfba7643a0c/api/HardwareI2C.h#L36

About the hack to use 10 bits on Arduino:

Normally on arduino, you can communicate with this device simply by doing something like this:

Wire.begin(0x79);Wire.write(0x08);//insert additional communication hereWire.endTransmission()

However, when using the same code on STM32Duino this communication won't succeed.
First of all, 0xF2 (0x79 << 1) byte will appear twice on the bus (because we are configuring HAL's I2C interface in 7bit mode, however the MCU itself recognizes this address as the beginning of 10 bit address).

This is not possible as it is manage by hardware to follow I2C specification where:
11110xxx is reserved for 10-bit Slave Addressing.

Fixes#2468.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Fixesstm32duino#2468.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm added this to the2.9.0 milestoneAug 22, 2024
@fpistmfpistm merged commit0935852 intostm32duino:mainAug 22, 2024
23 checks passed
@fpistmfpistm deleted the 7bits_only branchAugust 22, 2024 17:05
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
Milestone
2.9.0
Development

Successfully merging this pull request may close these issues.

Wire (I2C) library: support 10 bits address mode
1 participant
@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp