Any good I2C / TWI driver for AVR32 UC3?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I'm looking into learning about the current state of I2C / TWI driver implementations for the AVR32 family of MCUs, specifically UC3C. As far as I know, the most commonly recommended implementations that seem to be used by lots of people are the library from Peter Fleury and the AVR315 Application Note from Atmel. However they are specifically for 8-bit AVR microcontrollers, and won't work with an AVR32 UC3.

 

This comes from the somewhat disappointing state of the TWI Master driver that canbe found in the Atmel Software Framework, which is hardcoded to use only one TWIM interface (at least for the UC3C family as far as I'm concerned). There is already a 3 years old bug report still open, and most search results from Google tend to show up old threads which are several years old, with no new information on the matter, or with information not applicable to the AVR32 family.

 

I'm interested in well maintained, well-proven and robust implementations, preferably free but I would also look into paying for a good quality implementation. I'd rather not use some sample library which was posted 2 or 3 years ago in some lost website or forum and not updated since, which is mostly what I have found so far.

 

To be honest I've found a bit surprising the lack of recent conversation in the community about this topic, given that anyone trying to use the current ASF to program more than one TWIM interface today, won't be able to do it. If there is actually such conversation, please let me know because my Google-fu must have failed me then!

 

Regards

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The bug report indicates that the AVR people in Norway are looking into this issue today (11/11/2015).  It may be that the issue was solved previously but not recorded.

Please keep checking there for any progress.

If the ASF source is available, and the issue is a relatively simple matter like setting the default value of a variable, maybe perhaps it is something that the user can do themselves.  I2C itself isn't that difficult.  The C++ class implementation is more difficult than the hardware.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not really, I just posted a comment on the bug report, and that's why it appears updated on this date. Actually, the last update before mine was a similar comment from 2014 by someone also interested in the solution, and then the previous comment was already in 2012 just stating that a proposed solution was already being validated. So it is 2012 when it was really being a work in progress before being apparently abandoned.

 

I'll look into adapting the current implementation, however judging by the previous comments which give a proposed solution in the bug report, they mention maintaining a table of "twi_context" structs to hold state and references of each instance of the TWIM modules... I think is doable, but certainly not as simple as just configuring the default value of some variable.