This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Register is not updated.....

Hi

I have an error that shows its ugly head now and then....
The µC I'm using is C8051F122.

When I debug I can locate the problem, but the bug does not show the same place in code all times.

What I see now is that when stepping over the following line:

SMB0CN = 0x44;

The register SMB0CN actually is set to 0xC4. This sets the BUSY bit in the register.

It can be resolved by removing the µC supply, but a RESET won't do. But after some time the problem shows again.....

Does anyone have an idea????

Best Regards....

Parents
  • Please note that it does makes no difference if I perform a reset by pulling the reset pin low, or if I press reset in the IDE. I see that the µC is reset but it starts with an error code indicating that I2C communication with onboard EEPROM fails. But if I turn off the supply shortly, and then let the µC startup the problem is gone.

    I'm trying to figure out what the difference is between resetting the µC and to power cycle it.

    The only thing that I can come up with is that the EEPROM is also powered down during the power cycle, but I can't see what difference that can make....

Reply
  • Please note that it does makes no difference if I perform a reset by pulling the reset pin low, or if I press reset in the IDE. I see that the µC is reset but it starts with an error code indicating that I2C communication with onboard EEPROM fails. But if I turn off the supply shortly, and then let the µC startup the problem is gone.

    I'm trying to figure out what the difference is between resetting the µC and to power cycle it.

    The only thing that I can come up with is that the EEPROM is also powered down during the power cycle, but I can't see what difference that can make....

Children