You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On I2cMaster::reset there is no actual reset of the I2C peripheral.
If there are some connectivity problems with I2C lines, this could lead, that no event is generated, transaction is not finished and peripheral stays in hanging state.
I think, resetting peripheral needs to be added to the reset routine.
Yeah, fair point. I think the logic was to not have to initialize the hardware again, but it's weird semantic. I would rename the reset() method to disable(), since it makes clear that you need to initialize the peripheral again.
Well, you would need to call the initialize() function again. It circumvents the semantic ambiguity of what exactly is reset, by simply disabling the whole thing and then you need to initialize it fully again. It's a bit of a big hammer, but it's pretty clear what it does.
On I2cMaster::reset there is no actual reset of the I2C peripheral.
If there are some connectivity problems with I2C lines, this could lead, that no event is generated, transaction is not finished and peripheral stays in hanging state.
I think, resetting peripheral needs to be added to the reset routine.
I2C2->CR1 &= ~I2C_CR1_PE; modm::delay(5us); I2C2->CR1 |= I2C_CR1_PE;
The text was updated successfully, but these errors were encountered: