Emulate i2c inside QEMU

1,084 views
Skip to first unread message

h.v.maanen

unread,
Nov 19, 2011, 6:13:29 PM11/19/11
to Bifferboard
Hello,

Are there possibilities to emulate an i2c device on an bifferboard
running inside qemu?
I followed instruction on http://www.irky.org/home/tmp102 , I could
succesfully run the command: insmod i2c-gpio-custom bus0=0,11,12

Hanno

Andrew Scheller

unread,
Nov 19, 2011, 6:38:24 PM11/19/11
to biffe...@googlegroups.com
> Are there possibilities to emulate an i2c device on an bifferboard
> running inside qemu?

*Might* be possible using the GPIO Patch Panel
https://sites.google.com/site/bifferboard/Home/howto/qemu but you'd
obviously need to write your own PC-side device-emulation code.
(assuming the patch panel is fast enough for i2c?)

Lurch

biff...@yahoo.co.uk

unread,
Nov 19, 2011, 8:34:02 PM11/19/11
to Bifferboard

On Nov 19, 11:38 pm, Andrew Scheller <ya...@loowis.durge.org> wrote:
> > Are there possibilities to emulate an i2c device on an bifferboard
> > running inside qemu?
>
> *Might* be possible using the GPIO Patch Panelhttps://sites.google.com/site/bifferboard/Home/howto/qemubut you'd

> obviously need to write your own PC-side device-emulation code.
> (assuming the patch panel is fast enough for i2c?)

Yes, it should work.

I suspect the device emulation code has already been written and just
needs to be ported, because many microcontroller families have
application notes about i2c device emulation. It makes sense to port
it to Python though, to make connection to the panel easier, but it
can still by done in C if you copy-paste the tcp/ip stuff from the
Bifferboard Qemu port.

regards,
Biff.

h.v.maanen

unread,
Nov 22, 2011, 5:52:30 PM11/22/11
to Bifferboard
That seems to me not a simple task to do. I first try to get I2C
running on my real bifferboard
Thanx
Reply all
Reply to author
Forward
0 new messages