A9 analogRead(PureAnalogPin) issue with M4 core

analogRead(A9) generates an undefined reference to `analogRead(PureAnalogPin)' error when compiled for the M4 core. Setup: Giga R1 board library: 4.1.5
Any ideas?

#include "Arduino.h"
#include "RPC.h"

#define SERVO_POT_1     A9

void setup() {
  RPC.begin();
  analogReadResolution(16);   
}

void loop() {
int temp = analogRead(SERVO_POT_1);
}

Hi,

If you copy pure_analog_pins.cpp and pure_analog_pins.h from
4.1.5\variants\GIGA into
4.1.5\variants\GENERIC_STM32H747_M4

it will compile. Whether it will work is another matter - they may not be in that variant for a reason. good luck

1 Like

In order to make all relevant information available to any who are interested in this subject, I'll share a link to the report submitted by @whitear to the developers of the "Arduino Mbed OS Portenta Boards" platform:

1 Like