2011-09-30 11:39 AM
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?Brazov2011-10-09 10:57 PM
STM32 as an I2C master supports 7 and 10 bit slave ID only.
2011-10-10 01:40 AM
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.)2011-10-12 10:28 AM
Perhaps I was not clear, I was referring to the following standard (see pag.20 section 3.17):
brazov22011-10-12 11:28 AM
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.2011-10-15 12:55 AM
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