Bug 1693 - UC3C ASF twi drivers need to support all twi ports
: UC3C ASF twi drivers need to support all twi ports
Status: REOPENED
Product: Atmel Software Framework
avr32
: v3.7.x
: Other Standalone
: normal priority major (vote)
: ---
Assigned To: Laurent Le Goffic
:
: nto
: 435 2306
: 1480 1810
  Show dependency treegraph
 
Reported: 2012-01-26 22:35 CET by Marc Jordan
Modified: 2015-11-11 23:35 CET (History)
7 users (show)

See Also:
Public Description:
Development Branch: bug1693 bug1693_fix
Whiteboard:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Jordan 2012-01-26 22:35:11 CET
The current twim driver only supports a single twi. Please update the driver to
support all three ports simultaneously.
Comment 1 Dean Camera 2012-01-27 10:13:11 CET
Discussion external reference:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=917676#917676

The limitation of a single TWI master module in the current implementation is
due to the single global "twi_inst" variable.
Comment 2 Stephane Mainchain 2012-01-30 10:13:48 CET
Correct, thanks for reporting - we'll look into that.
Comment 3 Laurent Le Goffic 2012-02-02 08:50:05 CET
*** Bug 1679 has been marked as a duplicate of this bug. ***
Comment 4 Laurent Le Goffic 2012-02-08 13:49:28 CET
TWIM and TWIS drivers modified to support simultaneous use of all instances of
the modules.

The number of available instances is set according to header file defines.

Multiple ISRs are created but calls a common interrupt handler for all modules
of the same type.

The common handler uses a table of "twi_context" structs that holds state and
references of every instances of the hardware module.

Also added unit tests : 
The tests sets the TWIM and TWIS module to make twi transfers of small data
packets. 
Since TWIM and TWIS are connected together on the same pins, the only external
hardware needed are pull-ups for the twi lines.
Comment 5 Laurent Le Goffic 2012-02-08 13:54:30 CET
Tests jobs will be posted on top bug (bug1642)
http://asf.atmel.com/bugzilla/show_bug.cgi?id=1642
Comment 7 Laurent Le Goffic 2012-03-22 15:41:12 CET
Creating a new dev branch for the bug

Removed block on bug1642 (quickstart guides)
Comment 8 Philippe Patron 2012-05-21 10:53:57 CEST
One of our customers is requesting the bug to be fixed asap. Can we speed-up
the process please?

Setting importance to 'major'.
Comment 9 Laurent Le Goffic 2012-07-26 08:44:52 CEST
Validation job passed : 
http://norvm-tools-m.norway.atmel.com/hudson/job/asf-branch-validation/1278/

Please review
Comment 10 Laurent Le Goffic 2012-07-27 08:42:17 CEST
*** Bug 2640 has been marked as a duplicate of this bug. ***
Comment 11 Laurent Le Goffic 2012-08-16 10:26:28 CEST
Validation tests relaunched after synching with main :

http://norvm-tools-m.norway.atmel.com/hudson/view/ASF/job/asf-branch-validation/1392/
Comment 13 Johan Christiansen 2014-05-07 12:53:34 CEST
If this issue have already been fixed, why haven't it been released into the
main release of ASF yet?

Also, if i would like to get the bugfix branch, where can i access the source
repository?
Comment 14 Juan Navarro 2015-11-11 23:35:53 CET
Revisiting this bug report on November 2015.
Where did end up the modifications announced by Laurent Le Goffic on
2012-02-08?
There is still an interest on having a better TWIM driver integrated in Atmel
Software Framework.