I2C issue on STM32F103
Posted: Sat Jun 24, 2017 3:01 pm
I'm trying to port some code to ChibiOS and running into some issues with I2C running on an STM32F103. Here's a scope capture of trying to read a single byte from the 0x0B register of slave device 0x08: http://imgur.com/a/NQ4FL I expect to receive 0x19 but an extra byte (0xFF) is being read mistakenly. Here's a scope capture from my own I2C implementation (outside of ChibiOS) showing the correct sequence: http://imgur.com/a/xHgnk
I recall the I2C peripheral on STM32F103 was a bit of a nuisance to use and I had to handle various special cases when implementing my own I2C driver for this MCU. The approach for reading 1, 2 and 3+ bytes are outlined on pages 767-769 of the RM0008 Reference Manual from ST. I was looking through the STM32 I2C LLDs in ChibiOS and didn't see anything handling these special cases. Is I2C "officially" supported by ChibiOS on STM32F103s? Has anyone else here run into this issue? Just want to make sure I'm not doing something wrong before trying to port my driver to ChibiOS.
I recall the I2C peripheral on STM32F103 was a bit of a nuisance to use and I had to handle various special cases when implementing my own I2C driver for this MCU. The approach for reading 1, 2 and 3+ bytes are outlined on pages 767-769 of the RM0008 Reference Manual from ST. I was looking through the STM32 I2C LLDs in ChibiOS and didn't see anything handling these special cases. Is I2C "officially" supported by ChibiOS on STM32F103s? Has anyone else here run into this issue? Just want to make sure I'm not doing something wrong before trying to port my driver to ChibiOS.