Thanks for your help!
According to your discuss, the slave must receive NACK when multi-byte
transmit.Unfortunately, my application of c6713 does not detect the NACK,
neither using of NACK interrupt nor checking the NACK bit in state register.
LZ
2007-06-05"Richard Williams" <r...@lewiscounty.com> д
>Bernard,
>
>Its' my failing memory.
>For an excuse, I haven't written a low level I2C driver in at least 5
years and the details get fuzzy.
>
>R. Williams
>P.S.
>here is an abbreviated description of the bus operations from the phillips
LPC925 manual
>
>• Data transfer from a master transmitter to a slave receiver. The first
byte transmitted
>by the master is the slave address. Next follows a number of data bytes. The
slave
>returns an acknowledge bit after each received byte.
>• Data transfer from a slave transmitter to a master receiver. The first
byte (the slave
>address) is transmitted by the master. The slave then returns an acknowledge
bit.
>Next follows the data bytes transmitted by the slave to the master. The master
returns
>an acknowledge bit after all received bytes other than the last byte. At the
end of the
>last received byte, a not acknowledge is returned. The master device
generates all of
>the serial clock pulses and the START and STOP conditions. A transfer is ended
with
>a STOP condition or with a repeated START condition. Since a repeated START
>condition is also the beginning of the next serial transfer, the I2C-bus will
not be
>released.
>R.W.
>---------- Original Message -----------
>From: Bernhard Gustl Bauer
>To: Richard Williams
>Cc: lz_532 , c...
>Sent: Tue, 05 Jun 2007 07:33:18 +0200
>Subject: Re: [c6x] when 6713 is as slave, can it detect the nack?
>
>> Hi,
>>
>> if you describe I2C protocol you have to distinguish between master is
>> writing to slave and master is reading from slave. Anyway a slave is
>> _NEVER_ initiating a start or stop condition!!! So I'm afraid your
>> description is wrong.
>>
>> I just looked up a Philips LPC925 manual which has a description of all
>> I2C states. IIRC Philips has invented the I2C bus. There is a state
>> where after a data byte is read from a slave, the slave receives a NACK.
>> I think it is the last byte of a multi byte read.
>>
>> HTH
>>
>> Gustl
>>
>> Richard Williams schrieb:
>> >
>> >
>> > lz,
>> >
>> > Generally, the sequence for I2C is...
>> >
>> > Master sends Start -- ("hey everyone, wake up and listen")
>> > Master sends bus Address -- selects specific device on I2C bus
>> > Master sends Stop
>> > Slave sends Start -
>> > Slave sends Nack which Master reads as ("ok, I'm here")
>> > Slave sends Stop -
>> > Master sends Start -
>> > Master sends Data/command -- tells device what to do (specific to the
>> > selected device)
>> > Master sends stop -
>> > Master or Slave sends Start - (depends on who is going to send data)
>> > Master or Slave sends Data
>> > Master or Slave sends Stop
>> >
>> > Anything beyond that is local protocol relevant to the specific device.
>> > During the whole sequence, the Master is running the bus clock
>> >
>> > So, generally, the slave never receives a Nack.
>> >
>> > R. Williams
>> >
>> > ---------- Original Message -----------
>> > From: "lz_532" >
>> > To: c...
>> > Sent: Mon, 04 Jun 2007 07:10:37 -0000
>> > Subject: [c6x] when 6713 is as slave, can it detect the nack?
>> >
>> > > Hi All:
>> > >
>> > > 6713 is config as slave. i can't check NACK bit in I2CSTR to
capture
>> > > the nack signal that the master do not need data any more.if the dsp
do
>> > > not know the nack, it will fill a unwanted data in the I2CDXR and
will
>> > > be send out in the next read operation.
>> > >
>> > > Does the nack bit work? According to the spru175c p50, it does. But i
>> > > can't capture, what's the problem?
>> > >
>> > > Please help me, thanks!
>> > ------- End of Original Message -------
>------- End of Original Message -------
ͬ
Re: Re: when 6713 is as slave, can it detect the nack?
Started by ●June 5, 2007