ADC setup

I attempts to Setup ADC as bellow and I get this *Error : Base oprerand of '->' is not pointer *
Please help ............ :frowning:

void adc_setup ()
{
  ADC->ADC_WPMR = 0XFFFE;
  ADC->ADC_CHER = 0b11100000;
  ADC->ADC_MR = 0XFF000700 ;
  ADC->ADC_MR = 0b11111111000000000000011100000000;
  ADC->ADC_IER = 0xE0 ; 
  ADC->ADC_IMR = 0xE0 ;
  ADC->ADC_CR = 0x02 ;  
}

Look and see how you've defined the variable "ADC".

To add to it, ADC needs to be a pointer to a struct that defines all those members.

If ADC is the actual object, you need to use . notation, i.e.
ADC.ADC_WPMR = 0XFFFE;

Did you select the correct board/processor ?

Whandall:
Did you select the correct board/processor ?

Wouldn't that just yield an ADC not declared in this scope error?

I was also going to complain that ADC->MR was set twice, but it looks like they are being set to the same value. 8^)

I never tried it, but I think "Base operand of '->' is not pointer" could be preceeded by "ADC not declared".

In any case, remote troubleshooting via snippet is pretty futile.

Is this error relates with ADC.h library ?

We have no idea. Post all your code, and where you got this "ADC library".