STM32F303 ADC slow

Hi, Can any one assist me please, I am trying to replace my Arduino NANO with the Nucleo STM32F303K8 due to memory and ADC conversion rates on the NANO, the NUCLEO has a clock speed of 72Mhz but no matter what I do the NANO's rate is faster.
Nano conversion rate is 110us where as the fastest I get the STM32F303K8 is only 150us.
Attached is the benchmark code.

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(PA0, INPUT);
}

void loop() {
// put your main code here, to run repeatedly:
int a;
long times;

times = micros();
a = analogRead(PA0);
Serial.println(micros() - times);

}

With a (max. rated) 32MHz clock the 12 bit ADC runs at 8kHz max (125µs).

void loop() {
  // put your main code here, to run repeatedly:
  int a;
  long times;

  times - micros();
  a = analogRead(PA0);
  Serial.println(micros() - times);
}
  • micros() returns unsigned long, so times would be better as unsigned long
  • times - micros() does nothing useful

arduarn:

void loop() {

// put your main code here, to run repeatedly:
  int a;
  long times;

times - micros();
  a = analogRead(PA0);
  Serial.println(micros() - times);
}




- *micros()* returns *unsigned long*, so *times* would be better as *unsigned long*
- *times - micros()* does nothing useful

sorry "times = micros";