11bit ADC data from SAMD51 (M4) boards
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- embedded-iot
Línea de trabajo
Start by tracing how AnalogIn reads the ADC on SAMD51 boards and how that reading is scaled to CircuitPython’s 0–65535 range; compare this with a board where the reported values are not all even. The issue names no source files or tests, so locate the SAMD51 ADC implementation and relevant tests first. Done means explaining or fixing the even-valued 12-bit readings and verifying the behavior on the Feather M4 Express.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
CircuitPython version and board name
`10.2.1` on Adafruit Feather M4 Express
Code/REPL
My code is too complex but the essence is `value` from `AnalogIn` (on `A5`) shifted by 4 bits.
Behavior
The values when converted from CircuitPython's 0-65535 using >> 4 to 0-4095 (12bit) values are all even.
Description
From my recent ADC testing which I was reviewing I am only seeing even values from an M4 board's ADC in CircuitPython when it's shifted to a 12 bit value. This suggests it's either set to 11 bits or something is zeroing the lsb??
Additional information
This is some of my raw data.
1311612915047,"triangle","B",0,"C","max",0,"[-1]",-0.0001875,"[8,8,6,8,6,4,8,8,6,6,6,6,6,6,6,6,6,6,8,6,6,6,6,6,6,8,8,6,8,6,6,8,8,6,6,6,6,6,6,6]"
1311659362795,"triangle","B",0,"C","max",0,"[-1]",-0.0001875,"[6,6,6,6,6,6,6,4,6,6,6,6,6,8,6,6,6,6,6,6,6,8,6,6,10,6,8,6,8,6,8,6,6,6,8,6,6,6,6,6]"
1311688812260,"triangle","B",0,"C","max",0,"[-1]",-0.0001875,"[8,8,8,6,6,6,6,6,6,8,6,6,12,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,6,6,8,6,6,6,6,8,6,8,6,6]"
1311718200689,"triangle","B",0,"C","max",0,"[-1]",-0.0001875,"[8,6,6,6,6,8,6,8,6,6,6,6,6,6,6,6,6,8,6,6,6,6,6,6,8,6,6,8,8,6,8,8,6,6,8,6,6,6,6,6]"
1311747283938,"triangle","B",0,"C","max",0,"[-1]",-0.0001875,"[8,8,6,6,6,6,6,6,6,8,6,6,8,6,6,6,6,6,4,6,6,6,6,6,8,6,6,6,6,6,14,6,6,8,6,6,6,6,4,6]"
1311785400394,"triangle","B",0,"C","max",0,"[0]",0.001125,"[6,8,8,6,8,6,6,6,6,6,6,8,6,6,6,6,6,8,6,8,6,6,6,6,6,6,6,8,6,8,6,6,6,6,8,8,6,6,6,8]"
1311832366948,"triangle","B",0,"C","max",0,"[1]",0.0024375,"[10,8,8,8,10,8,10,8,8,10,8,8,8,8,6,6,8,8,8,8,8,8,10,10,8,8,10,12,10,6,8,8,8,8,0,8,8,10,6,8]"
1311864807136,"triangle","B",0,"C","max",0,"[2]",0.00375,"[10,10,10,10,8,10,10,10,10,10,8,10,10,10,10,12,10,10,10,10,10,10,10,10,12,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10]"
1311904510501,"triangle","B",0,"C","max",0,"[3]",0.004875,"[12,12,12,12,12,12,10,12,12,12,12,12,12,12,10,12,14,12,10,12,12,12,12,10,12,12,12,12,12,12,12,12,10,12,10,12,12,12,12,10]"
1311944824225,"triangle","B",0,"C","max",0,"[4]",0.006374998,"[14,12,14,12,14,12,12,12,12,14,12,12,12,12,14,14,12,14,12,14,12,12,12,14,14,12,14,14,12,14,14,16,14,14,14,14,14,12,14,12]"
1311985290540,"triangle","B",0,"C","max",0,"[5]",0.0075,"[16,14,14,16,16,16,14,14,14,20,14,14,14,14,16,16,14,10,14,14,14,14,14,16,16,14,14,16,14,14,14,16,16,16,14,14,16,14,14,14]"
1312028137218,"triangle","B",0,"C","max",0,"[6]",0.0088125,"[18,16,16,16,16,18,16,16,16,16,16,16,16,16,16,16,16,16,16,18,16,16,16,16,16,16,16,18,20,18,16,16,14,16,16,16,16,22,16,16]"
1312068511965,"triangle","B",0,"C","max",0,"[7]",0.0103125,"[18,18,18,18,18,18,18,20,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,20,18,18,18,16,18,18,14,18]"
1312108795171,"triangle","B",0,"C","max",0,"[8]",0.011625,"[24,20,20,20,18,22,20,20,18,20,20,20,20,20,20,20,20,20,20,18,20,20,20,20,20,20,20,18,20,20,20,20,20,20,20,20,20,22,20,20]"
Note the values in the last field are all even. I have same code running on many other boards and have witnessed no other problems. I am still reviewing my results so there's a small possibility this is an application bug authored by me...
- Lenguaje dominante
- C
- Estrellas
- 4.6k
- Forks
- 1.4k
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 147
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de adafruit/circuitpython
-
board breaks api
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adafruit/circuitpython#11099 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Pico-W: shrink firmware regionAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
adafruit/circuitpython#11515 ·
Los mantenedores suelen responder en 1 día
-
Tags and BranchesAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
adafruit/circuitpython#11514 ·
Los mantenedores suelen responder en 1 día
-
Move silabs to ZephyrAbiertosilabs
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
adafruit/circuitpython#11507 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Feature/API request: portable camera capture across ESP-IDF, Zephyr, and parallel interfacesAbiertocircuitpython api enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
adafruit/circuitpython#11505 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de adafruit/circuitpython
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
EchoTools/nevr-runtime#171 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[P2] Workspace updates silently ignore forbidden assignments while staging the rowPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 4 días
-
sdl3-image update to 3.4.8Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/vcpkg#54338 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
area:http-gateway good first issue priority:low type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
crazy-goat/php-fpm-ng#828 ·
Los mantenedores suelen responder en 1 día