OpenStickCommunity / OpenStickCommunity/GP2040-CE
Sharing I2C block between cores
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 666
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
Prerequisites
Please check the following before posting an issue / bug report.
- I am running the latest version of the firmware found HERE
- I have checked the documentation HERE and found no answer
- I checked to make sure that this issue has not already been filed HERE
- I am reporting the issue to the correct repository
Context
When writing a GP2040 addon for one of my own I2C input peripheral, I noticed that my peripheral would constantly glitch out. A protocol capture shows that the data exchange between RP2040 and both the OLED display and the peripheral are interleaved and corrupted.
This kind of setup is also allowed in some of the official addons like ADS1219 without (IIRC) explicit warning in the documentation so I'd presume that they would be supported, but broken as well.
- Firmware Version: 7aa176e
- Name of device: Any
- Link to where you purchased the device: Any
- Is this a custom build?: Yes
- Operating System: Any
- Browser: Any
Expected Behavior
I2C block is properly shared without corrupting the data.
Current Behavior
Data corruption occurs when the same block is used by 2 cores.
Steps to Reproduce
- Enable OLED display
- Enable some other addon that uses I2C and select the same block and pins the OLED display uses
- Connect all devices to a single bus
- Watch it crash and burn
Screenshots & Files
Please include any relevant screenshots or files here. If you are having issues with a board please include images of the front and back of the board.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the OLED display and other addons access the shared I2C block and how those accesses are assigned across the two cores. Reproduce the issue using the listed OLED-plus-addon setup and a shared bus; done means both devices exchange data without corruption or crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100