adc_disable_channel_differential_input does not correctly set config bit
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start in system/libsam/source/adc.c at lines 632-635 and inspect adc_disable_channel_differential_input alongside adc_enable_channel_differential_input. Verify the register mask behavior using the issue's truth table, then confirm that disabling a channel after enabling differential input clears the differential-input configuration.
Written by the indexing model from the issue text.
Description
By ORing with the previous value, the resulting of ANDing with the mask is undone, so the function results in no action being taken (once adc_enable_channel_differential_input is run, adc_disable_channel_differential_input doesn't work).
trivially with one bit, the truth table for (A and B) or A is:
| A | B | (A and B) or A |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | F |
| F | F | F |
I believe the desired result could be obtained by ORing with the set value (basically running adc_enable_channel_differential_input), then XORing with the same value, but I'm not a good enough C programmer to know if this is the optimal way to do this.
- Dominant language
- HTML
- Stars
- 91
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from arduino/ArduinoCore-sam
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
arduino/ArduinoCore-sam#129 ·
-
Type: Bug USB: CDC serial
Difficulty 4/5 3-5 days Newbie friendliness 52/100
arduino/ArduinoCore-sam#153 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#151 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
arduino/ArduinoCore-sam#146 ·
All issues in arduino/ArduinoCore-sam
Similar issues
-
[BUG] Small issues on iMXRT found by ClaudePossibly taken @Sarthak-Pandey claimed this today. OpenArch: arm Area: Networking OS: Linux Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
device support request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zigpy/zha-device-handlers#5461 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
home-assistant/core#186681 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
ArduPilot/ardupilot_wiki#8176 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Koenkk/zigbee-herdsman-converters#13502 ·
Maintainers usually reply within 1 day