We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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....
The I2C code has existed for long has been working properly. Two slaves are connected to the I2C bus.
The timeout has been disabled in SMB0CN, and the C has not been removed.
If I lower the optimization to 2, Warnings will show under download:
for example: "Warning! An attempt was made to modify address 1FD09 which is restricted! Continue download?"
if I press "OK" the address is incremented and a new box is thrown...
Is your code so bloated that you overrun 127k with opt 2 switch to e.g. an ARM
Otherwise find out what writes to the "protection and other stuff area" and fix it. The .map file should show you what to look for.
Many do not realize that the top 1k if the f12x/f13x is not code memory but 'restricted'. If you write certain locations the whole shebang will lock up.
Erik