cancel
Showing results for 
Search instead for 
Did you mean: 

I2C rev. 03 19 june 2007

brazov22
Associate II
Posted on September 30, 2011 at 20:39

Hi all,

does anyone know if STM32 family I2C master supports 24-bit device ID reading from an I2C slave? I have a slave compliant to I2C rev 03 standard and I need to read it's device ID. Please help, have you any example?

Brazov
5 REPLIES 5
rosarium
Associate II
Posted on October 10, 2011 at 07:57

STM32 as an I2C master supports 7 and 10 bit slave ID only.

John F.
Senior
Posted on October 10, 2011 at 10:40

The Device ID field (see Figure 20) is an optional 3 byte read-only.

The device ID is a 24 bit field read as three bytes. you should be able to do that using the STM32 I2C. (Although in general, I'd keep away from I2C on the STM32 or implement it as ''bit-bashed'' routines yourself.)

brazov22
Associate II
Posted on October 12, 2011 at 19:28

Perhaps I was not clear, I was referring to the following standard (see pag.20 section 3.17):

http://www.nxp.com/documents/user_manual/UM10204.pdf

brazov2

Posted on October 12, 2011 at 20:28

No, I think you're just going to have to read it using the regular slave mode addressing/read commands, following the sequence described in the manual you linked too. The STM32 is not going to auto-magically go fetch this for you, if that's what you define as ''supporting'' the ID. The ID is designed as a method of probing ''unknown'' devices on your bus, and then *you* looking it up in a table. It's support, or not, shouldn't preclude the device from being usable, or you knowing what you soldered to the board.  It looks similar to the PCI VID/PID scheme, where you can identify random devices on your bus, and load the appropriate driver.

It is not a 7 vs 10 bit addressing scheme.

Suggest you look at some of the generic EEPROM read code supplied in the I2C code examples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
brazov22
Associate II
Posted on October 15, 2011 at 09:55

Thanks Clive,

I don't expect nothing of magic from a piece of silicon! I hope to find some function in stm32  i2c standard library for that.

brazov