STM32 - I2C Restart after Lock-Up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-10-01 3:04 PM
STM32 - I2C Restart after Lock-Up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5: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.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5: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 Askan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5: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.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:09 AM
''the next command is a typical Start Condition. But this step dont work.''
What do you mean by, ''dont work'' ?- Does the STM32 not generate a Start Condition on the bus?
- Do the slaves not recognise the Start Condition on the bus?
- Or what?
A complex system designed from scratch never works and cannot be patched up to make it work.
