I'm using a stm32 f429 chip, I have some peripherals which I control with i2c bus (I2CD1). When I first flash the device, all is working. But today I need to implement the standby, and now I am facing a problem. When the system restarts after an interrupt on pin0, the systems hangs (means no more thread working) when I make a call to i2c.
Code: Select all
i2cAcquireBus(&I2CD1);
status = i2cMasterTransmitTimeout(&I2CD1, isl29020_addr, txbuf, 2, rxbuf, 0, tmo);
the call to i2cAcquireBus(&I2CD1); works, means the system continues to working if for example I make a cycle like this:
Code: Select all
int i = 0;
do{
chThdSleepMilliseconds(250);
}while(i++ < 50);
but it hangs at i2cMasterTransmitTimeout.
From what I know, after a standby, everything is resetted (exept for the backup sram), so it is likely a start after reset.
does anyone know where could be the problem? I'm quite troubled by now!
Thanks a lot.