Page 1 of 1

Got defined #error message for ADC2 for STM32F303xx

Posted: Sat Aug 06, 2016 8:55 am
by ep.hobbyiest
Hi,

I am using one STM32F303xx development board. On that ADC is connected at ADC2_IN12 Port PIN.So, as per that made TRUE for the macro STM32_ADC_USE_ADC2 from mcuconf.h.

And I already made TRUE for the HAL_USE_ADC in halconf.h.

Now after compliation i got following error message.

Code: Select all

 
../../chibios30/os/hal/ports/STM32/STM32F3xx/adc_lld.h:264:2: error: #error "ADC driver activated but no ADC peripheral assigned"
 #error "ADC driver activated but no ADC peripheral assigned"
  ^
 

In HAL i checked only two ADC's are mentioned that ADCD1 and ADCD3 and not ADCD2.

Is it like CHIBI_HAL is not supporting to ADCD2? If support, where should i do changes?

Re: Got defined #error message for ADC2 for STM32F303xx

Posted: Sat Aug 06, 2016 10:15 am
by Giovanni
Hi,

What version are you using? it works with 16.1 and trunk code.

Giovanni

Re: Got defined #error message for ADC2 for STM32F303xx

Posted: Sat Aug 06, 2016 4:30 pm
by ep.hobbyiest
I am using ChibiStudio_Preview17.7 version.
And I modified STM32F3xx-ADC demo.

In file adc_lld.h, i could see only STM32_ADC_USE_ADC1 and STM32_ADC_USE_ADC3 mentioned not STM32_ADC_USE_ADC2.

Re: Got defined #error message for ADC2 for STM32F303xx

Posted: Sat Aug 06, 2016 5:49 pm
by Giovanni
Hi,

It is possible that you switched to the workspace of ChibiOS 3.0, switch again to 16.1. See the File menu in eclipse.

Giovanni

Re: Got defined #error message for ADC2 for STM32F303xx

Posted: Sat Aug 06, 2016 8:06 pm
by ep.hobbyiest
Yeah, correct. I was giving different path in makefile.

and i think one more correction in chibios adc port code in following path.

In file ../../chibios161/os/hal/ports/STM32/LLD/ADCv3/adc_lld.c : 699 there is mentioned ADCD1instead of ADCD2.

Re: Got defined #error message for ADC2 for STM32F303xx

Posted: Sun Aug 07, 2016 10:37 am
by Giovanni
Hi,

It has been fixed in latest version, thanks.

Giovanni