[En-Nut-Discussion] En-Nut-Discussion Digest, Vol 139, Issue 13

Achim achim_muc1971 at gmx.de
Thu May 28 11:20:12 CEST 2015


I just need one bus. 
If I take twi, what´s the setup procedure? Is there any example reading from
a slave device?

Achim

Message: 1
Date: Wed, 27 May 2015 11:23:03 +0200
From: Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de>
To: "Ethernut User Chat \(English\)" <en-nut-discussion at egnite.de>
Subject: Re: [En-Nut-Discussion] STM32 I2C
Message-ID: <21861.36087.763405.704300 at gargle.gargle.HOWL>
Content-Type: text/plain; charset=iso-8859-1

>>>>> "Achim" == Achim  <achim_muc1971 at gmx.de> writes:

    Achim> Hi, what?s the actual strategy with I2C on STM32F1? I?m not sure
    Achim> if to take twi or i2cbus_v2?

twi is legacy, but works when using only one i2c bus. I only work with/on
i2cbus. twi was only brought to a point that the app examples work.

    Achim> I?ve tried: NutRegisterTwiBus(&twiBus, 0); /
    Achim> NutTwiMasterTranceive(&twiBus, TMP100_I2C_DEV_ADDR, &reg_index,
    Achim> 1, &data, 2, TIMEOUT_I2C); but it crashes often.

    Achim> What?s the recommended procedure for init / transaction?

    Achim> Currently I?m using nut 5.2.2, but if recommended I can also
    Achim> upgrade to 5.2.4

If you want to start with twi, start with the app examples and extend to you
needs.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


*********************************



More information about the En-Nut-Discussion mailing list