Hello, My target is based on AT89C51ED2 and RTX-Tiny. I'm trying to detect warm/cold reset. I know that POF bit didn't work in the RD2 version, so I don't want to use it here also. I defined two global variables one in XDATA and the other one in DATA. I sow that after cold reset (power up) the values are 0xFF for XDATA and 0x0 for DATA. In the program i change those values to 0x55 and cause to warm reset (by watchdog or hardware reset) I think that in this case I need to receive 0x55 but instead I receive 0xFF in XDATA and 0x0 in DATA. Can you tell me why? Thanks a lot, Roberto
I sow that after cold reset (power up) the values are 0xFF for XDATA and 0x0 for DATA. In the program i change those values to 0x55 and cause to warm reset (by watchdog or hardware reset) I think that in this case I need to receive 0x55 but instead I receive 0xFF in XDATA and 0x0 in DATA. Can you tell me why? 1) the values after power on reset are indeterminate,thus your method may/will fail. 2) probably the warm reset result is due to C initializer clearing the DATA and you not having the 'set internal xdata' SFR bit set before the startup clears XDATA. Erik