Number of channels in the ADC mux #688
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#688
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_adc/include/hardware/adc.h#L23 and https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_adc/include/hardware/adc.h#L106 (and obviously the corresponding html and PDF documentation) it says that there are 5 channels to the ADC multiplexer, however only 4 possibilities are given (GPIO pins 26, 27, 28 and 29) and the last option is somewhat implicitly implied is for the internal temperature measurement.
Given that on pag 4 of https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf it says
23 GPIO are digital-only and 3 are ADC capableand that Fig.2 of the same document does not show any GPIO pin 29, I suspect that the error is inadc.hand that the mux is a 4-channel one (more reasonable number than 5 for such a piece of hardware).Either way, one of the two documents is incorrect and needs to be rectified, and in my opinion it can be more clearly stated that GPIO 29 is not user accessible and would measure the temperature (if that's correct).
You're confusing the RP2040 chip which has 4 ADC channels, and an additional fifth which is connected to the internal temperature sensor, and the Pico, which exposes only 3 of the 4 available ADC channels to external pins. The "Pico SDK" is really the "RP2040 SDK" so talks about the more general case of the RP2040 rather than just the Pico.
Page 7 of https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf explains that on the Pico board, the fourth RP2040 ADC channel on GPIO29 is used to measure VSYS/3.
Thanks to both. Perhaps a short text can be added to the relevant section to avoid confusion, especially since the name of the document is "Pico SDK" rather than "RP2040 SDK".