ST72F63B I2C Interface Fails to Generate Stop for Single Byte Read
Company  
ST Home | Microcontrollers

Index  »  ST7  »  ST72F63B I2C Interface Fails to Generate Stop for Single Byte Read
     
   ST72F63B I2C Interface Fails to Generate Stop for Single Byte Read
 Moderated by :   »  Jatin  -  laubey  -  Setler

Author
beginning argument    ( Replies received: 1 )
gerickson   Posted 17-04-2008 at 02:43   



Registered on :
11-14-2008

Messages : 2

 OFF-Line

I am working with an ST72F63B on the Raisonance ReVA board and am experimenting with the 'testall' application, specifically I2C reads and writes to the on-board EEPROM. Ostensibly, the included I2C code in 'testall' is from the ST7 sample library.

The polled-mode I2C read in this code seems to follow the guidelines for a master receiving in the data sheet precisely; however, what I see in practice on the scope is that for reads of 2 or more bytes, the read transaction works correctly, terminating with a STOP condition. However, for a single (1) byte read, there is never a STOP condition.

This discrepancy is despite the fact that the polled mode read code has an explicit case for a byte count of one (which must also be executed for the multi-byte cases).

Has anyone gotten this ST7 library code to work? If so, what changes did you need to make to do so? Is there something undocumented in the datasheet required for a single byte read transaction? Perhaps ACK must be cleared for BOTH the second to the last and the last byte?



 Profile   Quote  
seb13_colin   Posted 16-06-2008 at 13:35   



Registered on :
12-05-2008

Messages : 6

 OFF-Line

Hello gerickson,

In the ST7 library, the function "I2C_GetBuffer" is designed to receive buffer. So it means more than 1 byte. If you want to receive only one byte you have to use the function "I2C_GetByte".

For more details you can refer to the user manual of the library page 18-20.

Best regards,

Seb



 Profile   Quote  
On Top

Search in the forums
 
Jump To