STM32F107 I2C SCL stays low
Hello,
I'm working on a project, where the Master (STM32F107) have to communicate with a few slaves (ATxmega) via I2C. Most of the time it works fine. But sometimes the SCL line is going low and stays low. First i thought it's a Slave issue (because of clock stretching), but its a Master problem.
I tested different thinks, when the error occurs. For example I make a hardwarereset on a slave. Then it's rebooting, but SCL is still low. The Master and Slave are on different PCBs, so I can cut the connection between them. When I'm doing this, the SCL line on the Slave side goes up, on the Master stays low. I'm using HAL and reset the I2C configuration and reinitialize it. I already tried direct register access and reset the I2C periphery on this way. But it doesn't help. Only a reboot of the master fixes the problem (hard- or software reset, both works).
I activated the I2C error interrupt, but the interrupt never occurs. The I2C registers are also unremarkable:
I2C_SR1: BTF and TxE are set
I2C_SR2: MSL, BUSY and TRA are set.
I'm using fast mode (400 kHz) with 2k2 pullups.
I already checked the erata, there are a few known issues with the I2C periphery, but no one fit with mine.
Any ideas?
