New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is ADC driver implemented for SAMD21G18A? #16267
Comments
Hi @IchiroKuroki , could you try to add |
Hi @jeandudey. After following your advice, I got new errors: /home/ichiro/Documents/projects/RIOT/cpu/sam0_common/periph/adc.c:90:9: error: 'ADC_REF_DEFAULT' undeclared (first use in this function) |
That's because there's no configuration for the ADC on the board, you could try to use a configuration and add it to the periph_conf.h file in that board, adapting it accordingly of course. Just for testing of course. I will look into it to see if Arduino has some pins designated for the ADC on that board |
Arduino-zero has a close mcu - SAMD21G18(without A). I will try to compose the ADC and PWM configuration based on the configuration of this board. |
I started with PWM and this is the configuration I got: #define PWM_0_EN 1 #if PWM_0_EN static const pwm_conf_t pwm_config[] = { I tested each pin with the stated PWM support using an oscilloscope. The following pins with declared PWM support are not present in this configuration: I'll be working on ADC soon. |
For ADC, I got the following configuration: #define ADC_PRESCALER ADC_CTRLB_PRESCALER_DIV512 #define ADC_NEG_INPUT ADC_INPUTCTRL_MUXNEG_GND static const adc_conf_chan_t adc_channels[] = { |
If you have found a working configuration for |
The code does not compile if I use the adc.h interface with arduino-nano-33-iot.
#include "periph/adc.h"
adc_init(ADC_LINE(1));
make flash BOARD=arduino-nano-33-iot
undefined reference to `adc_init'
collect2: error: ld returned 1 exit status
If I add in the Makefile:
FEATURES_REQUIRED += periph_adc
then: There are unsatisfied feature requirements: periph_adc
The text was updated successfully, but these errors were encountered: