I2C Slave Mode

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

I2C Slave Mode

Post by neums »

Hi,
will there be an official I2C Driver with an implemented slave mode in future?

Thanks.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: I2C Slave Mode

Post by Giovanni »

Hi,

I am evaluating the proposals, no final decision yet. I am not yet sure about an API able to cover all cases.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: I2C Slave Mode

Post by Giovanni »

In the meanwhile: viewtopic.php?f=16&t=3020

Giovanni
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: I2C Slave Mode

Post by steved »

Giovanni wrote: I am not yet sure about an API able to cover all cases.

I've found that genosensor's interface has worked well for me - I've got an I2C slave which uses it quite heavily, and its pretty solid.

There are basically three scenarios which have to be handled:
1. Return a message on a read [consider as a 'status' request]
2. Accept a message, process it, and return a response [consider as a 'poll' or 'acknowledged command']
3. Accept a message and process it [consider as an 'unacknowledged command']

Number 2 is the most demanding, since the I2C bus generally has to be held in a wait state while processing the received message

Not finding I2C to be the ideal inter-processor communication method, but it's all that was available to me!
Post Reply