5 years, 9 months ago.


I am trying to work with the ADC. I define the analog inputs as follows:

AnalogIn ch0(AIN_0); ADC input AnalogIn ch1(AIN_1); ADC input AnalogIn ch2(AIN_2); ADC input AnalogIn ch3(AIN_3); ADC input

I get the following compiler error:


I could not find an example, so I am basically porting mBed ADC code that works on other mBed enabled platforms. Is there something different on the MAX32630FTHR?

Question relating to:

Maxim's microcontrollers provide low-power, efficient, and secure solutions for challenging embedded applications.

2 Answers

5 years, 9 months ago.

Bill, The path in your error message calls out an old development library. Please change to the official mbed-os library. Our latest examples at our MAX32630FTHR APPS wiki page all use the official library now.

This example uses the analog inputs:

Import programFTHR_OLED

Adafruit FeatherOLED example for the MAX32630FTHR board

Accepted Answer

Thank you Greg! Works like a charm now.

posted by Bill Smith 21 Feb 2017
5 years, 9 months ago.

Hello Bill,

Please see the following example, https://developer.mbed.org/users/j3/code/MAX32630FTHR_ADC_Example/file/047c43d8b360/main.cpp

Links to analogin_api.c for both mbed-os and mbed-2.0 showing the configuration of an ADC channel when using the mbed API.



I hope this helps.

Thanks, Justin


I verified the example above with mbed-os as well. You can delete the reference to 'mbed' in the project above and include 'mbed-os' if that is what you are using.

Thanks, Justin

posted by Justin Jordan 21 Feb 2017

Thank you for your help Justin, and the excellent adc example.

posted by Bill Smith 21 Feb 2017