2008-10-27 08:56 AM
I2C: Real World Example
2011-05-17 03:49 AM
I am trying to use the I2C core of the STM32 evaluation board using the firmware library.
The examples, which are part of the library, work as long as no error occurs. The examples do not contain any error handling (address NACK, data NACK, PEC error, bus error, ...). If there is an error, the examples simply hang forever. Are there any real world examples for the I2C core including the complete necessary error handling?2011-05-17 03:49 AM
Quote:
The examples, which are part of the library, work as long as no error occurs. The examples do not contain any error handling
I think you will find that this is generally true of example code! In real life, handling the ''normal'' execution is only a very small part of the project - it's covering all the ''exceptions'' that takes 90% of the effort. To include all this in ''example'' code would just obscure it.2011-05-17 03:49 AM
Hi,
You can have a look at our ''AN2824'' : STM32F101xx and STM32F103xx medium- and high-density devices: advanced I²C examples : http://www.st.com/stonline/products/literature/an/15021.pdf http://www.st.com/stonline/products/support/micro/files/an2824.zip Cheers, STOne-32.