[OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?
Hartmut Knaack
knaack.h at gmx.de
Thu May 4 17:57:32 EDT 2017
Gareth Parker schrieb am 04.05.2017 um 23:33:
> OpenWrt seems dead these days, active development is over at lede-project.
True, but the question was not development-related.
>
> Also for i2c I would recommend using a PIC microcontroller, its far easier and designed for that purpose. I use a PIC to control PLL IC's over i2c such as the TSA5511 in FM broadcast gear I design.
And how do you connect to the PIC? First thing that would come to my mind would
be via rs232, but many OpenWrt devices provide just one such interface, and that
is already occupied for debugging messages and console login. Connecting via USB
doesn't look overly practical - I've used the I2C-Tiny USB and had lots of
troubles, caused by sudden USB disconnects and resets.
And any solution, where the kernel won't control the I2C bus, will prevent you from
using the massive amount of device drivers included in OpenWrt/LEDE or the Linux
kernel.
>
> Gareth
>
> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On Behalf Of Hartmut Knaack
> Sent: Friday, 5 May 2017 9:19 a.m.
> To: Xuebing Wang; OpenWrt Development List
> Cc: John Crispin
> Subject: Re: [OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?
>
> Xuebing Wang schrieb am 04.05.2017 um 03:19:
>> Hi community,
>>
>> I am using Atheros AR9331 + OpenWRT Chaos Calmer 15.05 on a commercial
>> product.
>>
>> I've used I2C on many projects, all with dedicated I2C controllers.
>> I've never used GPIOs to simulate I2C on Linux.
>>
>> I may be wrong, I am tending to think that there is no way to generate
>> good I2C waveforms by using 2 GPIOs (SCL/SDA), except that we disable
>> all interrupts and maybe using high precision timer when outputing SCL/SDA?
>>
>> Is "using gpio to simulate I2C bus" robust on AR9331?
>>
>
> I have been using a GPIO extender connected via I2C to a router powered by an AR9132 (should be close enough), running for months without notable issues.
> In that case, I2C traffic was pretty low, it just had to access the GPIOs of the extender a couple of times per hour. It has been way better than using an I2C-Tiny USB adapter, but that would be a different story.
>
>> Thanks.
>> Xuebing Wang
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xFAC89148.asc
Type: application/pgp-keys
Size: 3086 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20170504/56ab973d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20170504/56ab973d/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list