linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on SMBUS slave transmit with PEC enabled
@ 2020-09-15  9:17 Rayagonda Kokatanur
  2020-09-17 10:39 ` Rayagonda Kokatanur
  0 siblings, 1 reply; 2+ messages in thread
From: Rayagonda Kokatanur @ 2020-09-15  9:17 UTC (permalink / raw)
  To: linux-i2c

Hello All,

I have the following questions wrt SMBUS PEC support on the SLAVE side,

As we know when Master sends a read request, Slave keeps on
transferring data until STOP/NACK is received from Master.
This means Slave doesn't have a prior idea about how many bytes to
transmit to Master.

Let's say, the Master wants to read 1 byte of data with PEC enabled,
in this case Slave needs to send a total of two bytes (1st byte data
and 2nd byte PEC).
When Master puts this request on Bus, following events will happens,

1. Slave sends 1st bytes
2. Master receives 1st byte and sends ACK
3. Since no STOP is received from Master, slave send 2nd byte (But
Master is expecting PEC bytes as 2nd byte)
4. Master receives 2nd byte and sends NACK/STOP.

This means Slave didn't send PEC byte and is no longer driving the SDA
line to send PEC bytes.
When Master checks PEC it will not match and Master read will fail.

How do we handle this case, what is the expected behavior from Slave
as per SMBUS protocol ?
In this case when should Slave send PEC bytes ?

Please let me know.

Best regards,
Rayagonda

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question on SMBUS slave transmit with PEC enabled
  2020-09-15  9:17 Question on SMBUS slave transmit with PEC enabled Rayagonda Kokatanur
@ 2020-09-17 10:39 ` Rayagonda Kokatanur
  0 siblings, 0 replies; 2+ messages in thread
From: Rayagonda Kokatanur @ 2020-09-17 10:39 UTC (permalink / raw)
  To: linux-i2c

On Tue, Sep 15, 2020 at 2:47 PM Rayagonda Kokatanur
<rayagonda.kokatanur@broadcom.com> wrote:
>
> Hello All,
>
> I have the following questions wrt SMBUS PEC support on the SLAVE side,
>
> As we know when Master sends a read request, Slave keeps on
> transferring data until STOP/NACK is received from Master.
> This means Slave doesn't have a prior idea about how many bytes to
> transmit to Master.
>
> Let's say, the Master wants to read 1 byte of data with PEC enabled,
> in this case Slave needs to send a total of two bytes (1st byte data
> and 2nd byte PEC).
> When Master puts this request on Bus, following events will happens,
>
> 1. Slave sends 1st bytes
> 2. Master receives 1st byte and sends ACK
> 3. Since no STOP is received from Master, slave send 2nd byte (But
> Master is expecting PEC bytes as 2nd byte)
> 4. Master receives 2nd byte and sends NACK/STOP.
>
> This means Slave didn't send PEC byte and is no longer driving the SDA
> line to send PEC bytes.
> When Master checks PEC it will not match and Master read will fail.
>
> How do we handle this case, what is the expected behavior from Slave
> as per SMBUS protocol ?
> In this case when should Slave send PEC bytes ?
>
> Please let me know.

Please let me know if anyone knows the solution for the above problem.
Or any other forum to ask this question.

Thanks,
Rayagonda

>
> Best regards,
> Rayagonda

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-17 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  9:17 Question on SMBUS slave transmit with PEC enabled Rayagonda Kokatanur
2020-09-17 10:39 ` Rayagonda Kokatanur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).