Re: [OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?

2017-05-04 Thread Hartmut Knaack
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-boun...@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@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> 
> 
> 



0xFAC89148.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?

2017-05-04 Thread Gareth Parker
OpenWrt seems dead these days, active development is over at lede-project.

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.

Gareth

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@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@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?

2017-05-04 Thread Hartmut Knaack
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@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 



0xFAC89148.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Is "using gpio to simulate I2C bus" robust on AR9331?

2017-05-04 Thread Matthew McClintock
On Wed, May 3, 2017 at 8:19 PM, Xuebing Wang  wrote:
> 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?


What speeds are you trying to achieve? There is already a driver in
tree for bitbanged gpio.

-M
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel