I am using MQX 3.7 with coldfire mcf52259.
I have a problem with driver implemented I2C. Sometime microcontroller is stopped waitting to bit STOP in function _mcf52xx_i2c_polled_ioctl to i2c_pol_mcf52xx.c.
It is stopped in this way:
while (i2c_ptr->I2SR & MCF52XX_I2C_I2SR_IBB)
}; // wait for completion
When I am debugging despite that I stop the debugger and relaunch the application it fails in the same part until I turn off power and turn on it.
So I don't have idea what's happen if I make a harware reset in the following way:
pla_bwt =(MCF5225_WATCHDOG_STRUCT *) (BSP_IPSBAR + 0x140000);
pla_bwt->WMR = 0xFFFF; /*Set count to 6.71s*/
pla_bwt->WCR |= 0x01; /*Enable watchdog hardware*/
I don't know like the driver is initialized after hardware reset it is not said in RM52259 and I know a software reset is not enough becouse I suppose it is done by debbugger when I make STOP and launch.
Thanks in advanced.