Closed buha closed 1 year ago
nevermind, the FTHR board routes AIN0, AIN1 etc. pins to an external I2C ADC, not to the embedded ADC of the microcontroller...
Using the EVKIT-MAX32650 I was able to correctly read AIN0, AIN1... because those inputs are directly fed into the microcontroller analog inputs.
However I've just tried the same thing with the MAX78000 FTHR board where AIN3 and AIN4 are both connected to the microcontroller directly.
For the internal channels I get good readings, however for AIN3 and AIN4 (AIN0 through AIN7 really) I get a static, 0x2 raw value with the same code.
@kevin-gillespie any idea ?
Found the reason...
Board_Init() was doing nothing in my firmware and so by comparison with your example, it wasn't initializing the MXC_SYS_PERIPH_CLOCK_GPIO2 (GPIO2.3 and GPIO2.4).
Thanks @buha, can we close this?
Hi,
I'm trying to get some readings in with MAX32650 of AIN0, AIN1, etc. external channels.
No matter what I provide on AIN0, AIN1, pins of the FTHR board, I always get the raw value 1 as reading.
However, if I perform ADC conversions of internal channels I get meaningful values.
The seqence of calls is:
Here's the readings that I get converted to Volts using
reading * 1.22V / 1024
First values are ALWAYS 1 * 1.22 / 1024 = 0x001191. The rest of the values seem correct.