2010-10-01 03:04 PM
STM32 - I2C Restart after Lock-Up
2011-05-17 05:09 AM
But this dont work. I missed something?
Yes, you can reset the STM32, but resetting slave devices is more difficult. You'll need to clock them out of whatever state they are in.2011-05-17 05:09 AM
Hello clive1,
thank you very mutch for your information. Yes, maybee the sensors (honeywellHMC5843
compass, or VTI scp1000 pressure sensor) make the problems. Both are on I2C1. I do not understand, what do you mean with ''clock them out''. There are SCL and SDA. After I2C1->CR1 restart, I the next command is a typical Start Condition. But this step dont work. So I do not have access on the sensor registers, to restart them also. Thanks & Best Regards Askan2011-05-17 05:09 AM
You should be able to share an I2C bus with multiple slaves, that's what is was designed to do. If you are consistently having problems you should check that you have it correctly terminated, and that you are running it at a speed that is suitable for all devices.
I2C slave devices are usually pretty dumb, they are simple state machines, and typically don't have an external reset pin, or internal clocks. If you foul up the bus and the slaves get in to weird conditions (ie multi-byte sequences to EEPROM's), you have to clock them out of these states. The means you have to drive SCL with enough cycles that the slave device will recognize a protocol violation, and step off the bus.2011-05-17 05:09 AM
''the next command is a typical Start Condition. But this step dont work.''
What do you mean by, ''dont work'' ?