I'm using uvision 2.39 with C51 7.07 When I try to compare to float numbers the program just crash and the microcontroler just reset (C505-CA infineon). the code is: float i; float AdjFE = 0.5; i = sqrt(AdjFE); /* i takes vale 0.2529297 */ bResult = _chkfloat_( AdjFE ); /* this returns 0 */ if( AdjFE < (float)0.5 ) /* Here the program crash, and restart */ AdjustFE = 0.5; it's there any problem with float comparations?
We are not aware of such problems. Did you disable the WATCHDOG of that device?
Hello. I'm not using WatchDog I'm not setting the bit SWDT in SFR IEN1, so WatchDog is not working, also if a remove the line the program goes without reseting. BUT¡¡¡¡¡¡ I'm debugging the program in a Evaluation board PHYTEC c504 (KC-500), could this be the problem??