OpenStickCommunity / OpenStickCommunity/GP2040-CE
Analog ADS1256 (SPI) Add-On
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 666
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
I have spent a good part of 3 days troubleshooting the Analog ADS1256 (SPI) add-on. I know it's currently in early beta, but I think there may be a bug in it's code. I ended up writing a test application to confirm my ADS1256 module wasn't faulty. Then I hardcoded the ADS1256 pins to confirm.
I believe the primary bug in the code is PeripheralSPI::select() using gpio_pull_down() instead of gpio_put(0). CS never actually goes LOW so the ADS1256 ignores every single command. I think this is a GP2040-CE library bug that would affect any board, with any pin configuration. Correct SCK/TX pins won't fix this.
Here are the settings I am using:
Peripheral Mapping → SPI1: RX=8, CS=9, SCK=14, TX=15, Enabled ON
Add-Ons → Analog ADS1256: spi1, CS=9, DRDY=12, 3.3v, Triggers OFF
Additionally, I have two questions about the Analog ADS1256 (SPI) add-on. After enabling it, is the intent to use the Analog ADS1256 (SPI) add-on in conjunction with the Analog and Hall-Efftect Triggers add-ons? If not, how is one supposed to properly config analog sticks and triggers?
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 at PeripheralSPI::select() and the Analog ADS1256 (SPI) add-on, then reproduce the report with the listed SPI1, CS=9, and DRDY=12 settings. Use the reporter's test application or an equivalent hardware check to verify chip select reaches LOW and ADS1256 commands are handled; also document whether this add-on is intended to work with the Analog and Hall-Effect Triggers add-ons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100