Hi, just joined this list, not sure what the protocol is.. but I have a question about getting I2C working on the STM32L1(52RE).
First of all, I see that there are two versions of the I2C API: v1 and v2. Can someone explain what the difference is between these? From digging through the library, I can see that different device families use different versions, e.g.: F0: v2 F1: v1 F2: v1 F3: v2 F4: v1 F7: v2 L0: v2 L1: v1 L4: v2 So when following code examples, I guess I need to find examples that use the v1 API. In libopencm3-examples, the only STM32 I2C v1 example I could find is this one for F1 <https://github.com/libopencm3/libopencm3-examples/tree/master/examples/stm32/f1/other/i2c_stts75_sensor>. Unfortunately, the i2c_setup() function in this code doesn't compile for L1, because of some differences between the RCC and GPIO API's (namely, RCC_AFIO and gpio_set_mode() are not defined for L1). So I made some adjustments based on my best guesses, and ended up with this code <https://gist.github.com/chronopoulos/d34de9b6119d4ec052451d6afaa99e79>, which compiles. But, when I monitor the I2C lines with a logic analyzer, I see nothing. Dead silence. Am I missing something? Can anyone provide an example of I2C being used on STM32L1?
_______________________________________________ libopencm3-devel mailing list libopencm3-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libopencm3-devel