[En-Nut-Discussion] TwMasterTransact is blocked
CAMBON, Olivier
Olivier.CAMBON at astrium.eads.net
Tue Sep 11 13:34:42 CEST 2012
The call to TwMasterTransact never returns (with or without timeout in
parameter).
But the CPU is still alive. All the other threads with higher or lower
priorities are alive.
I did not checked the electrical lines with a scope.
But I can see that all the slaves are alive.
Maybe there were some errors during the transaction.
But I think the call should go in timeout in this case.
Regards,
Olivier.
_________________________________________
Olivier CAMBON
ASTRIUM Satellites,
Tests and Products - ASG83 - CZ108
Email : olivier.cambon at astrium.eads.net
Phone : Int.+ 33(0)5 62 19 62 29
_________________________________________
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Uwe Bonnes
Sent: Tuesday, September 11, 2012 10:59 AM
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] TwMasterTransact is blocked
>>>>> "CAMBON," == CAMBON, Olivier <Olivier.CAMBON at astrium.eads.net>
writes:
CAMBON,> Dear all, I am a new user of the board Ethernut 2.1 ver C
with
CAMBON,> Nut/OS 4.10.1. In my system, the ethernut board drives
some
CAMBON,> slave electronic using TWI / I2C bus.
CAMBON,> I found in the documentation the API TwMasterRegRead and
CAMBON,> TwMasterRegWrite but it seems that they are not implemented
for
CAMBON,> AVR. So, a wrote my own "i2c_get" and "i2c_set" API.
CAMBON,> The problem is that sometimes, in the function "i2c_set",
the
CAMBON,> call to "TwMasterTransact" is blocked. I tried with or
without
CAMBON,> timeout. The result is the same. The TwMasterTransact does
NOT
CAMBON,> return.
What do you mean with blocked? Does it mean the call to TwMasterTransact
never returns even when given a timeout? That should never happen. Are
you
sure your hardware works flawless? Maybe your transaction on the I2C
bus
has some unexpected side effect, disturbing the CPU. Did you check with
a
scope/logoc analyzer that your transaction does take place and is
terminated
properly?
Much to check ...
Bye
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
Ce courriel (incluant ses eventuelles pieces jointes) peut contenir des informations confidentielles et/ou protegees ou dont la diffusion est restreinte. Si vous avez recu ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu a quiconque. Merci d'en avertir immediatement l'expediteur et d'effacer ce courriel de votre systeme. Astrium decline toute responsabilite en cas de corruption par virus, d'alteration ou de falsification de ce courriel lors de sa transmission par voie electronique.
This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified.
---------------------------------------------------------------------
Astrium SAS (393 341 516 RCS Nanterre) - Capital: 16.587.728 EUR - Siege social: 12 rue Pasteur, 92150 Suresnes, France
More information about the En-Nut-Discussion
mailing list