AtmelStudio 7 atmega128 ChibiosHAL compile error

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderators: utzig, tfAteba

Bogdan
Posts: 21
Joined: Fri Apr 08, 2016 4:33 pm
Location: Ukraine Lviv
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: AtmelStudio 7 atmega128 ChibiosHAL compile error

Postby Bogdan » Sun Apr 10, 2016 12:40 am

Hi Fabio,

Without commenting "ADCSRB = 0; //single shot" i can't compile project without errors.
I tried this solution:
#if defined(ADCSRB)
ADCSRB = 0; //single shot
#endif
And it works good.

Thanks!

utzig
Posts: 355
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: AtmelStudio 7 atmega128 ChibiosHAL compile error

Postby utzig » Sun Apr 10, 2016 12:36 pm

Yes, that register is not even required. Talking about the bits in ADCSRB, the documentation states:

If ADATE in ADCSRA is written to one, the value of these bits selects which source will trigger an ADC conversion. If ADATE is cleared, the ADTS2:0 settings will have no effect.


Since we don't set ADATE, I just removed the ADCSRB access on the code. Btw, the equivalent of ADATE on ATmega128 is ADFR, which has the same bit number but different name probably because there is no way to configure it (no equivalent to ADCSRB).

Thanks again Bogdan, bring it on!

Fabio Utzig

Bogdan
Posts: 21
Joined: Fri Apr 08, 2016 4:33 pm
Location: Ukraine Lviv
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: AtmelStudio 7 atmega128 ChibiosHAL compile error

Postby Bogdan » Sun Apr 10, 2016 1:53 pm

Hi Fabio,

Thanks for the help.
When this fixes will come to Git repository, I will try them cheack as soon as possible.

Thanks!
Bogdan.

Bogdan
Posts: 21
Joined: Fri Apr 08, 2016 4:33 pm
Location: Ukraine Lviv
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: AtmelStudio 7 atmega128 ChibiosHAL compile error

Postby Bogdan » Mon Apr 11, 2016 6:14 pm

Hi Fabio,

I had tried latest version from git repo branch 16.1.x. And oll loocks good
Thanks for the help.

Thanks!
Bogdan.


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 1 guest