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

Code only works with Debug adapter

Dear All,

I am using Silabs 8051F340 micro controller and USB debug adapter to download the code to my target CPU.

The problem i am facing is my code works fine when i reset the system using my debug adapter by keeping adapter connected to target CPU. But once i remove the debug adapter from system and switch on system on independent power supply; it shows erratic behavior and doesn't work properly.

Note: My system doesn't have RESET switch. But i feel power on RESET is okay..

Kindly suggest me.

Thank you,
Ameya

Parents
  • i had a problem where my code worked fine if there was a breakpoint. When let run free it would work fine and recieve a command from the uart once then crash when i send a second command. Turned out to be with breakpoints set it caused enough of a delay to skip a byte comming into the uart. Never noticed it because that byte would be disgarded in processing anyway. It took one extra line of code to fix after 2 days of hair pulling. When let run free the extra byte caused the program to crash...

    So it could be a similar timing issue. But you dont describe the eratic behaveior. Also if you dont have an rc reset circuit or a reset chip, i'd add one.

Reply
  • i had a problem where my code worked fine if there was a breakpoint. When let run free it would work fine and recieve a command from the uart once then crash when i send a second command. Turned out to be with breakpoints set it caused enough of a delay to skip a byte comming into the uart. Never noticed it because that byte would be disgarded in processing anyway. It took one extra line of code to fix after 2 days of hair pulling. When let run free the extra byte caused the program to crash...

    So it could be a similar timing issue. But you dont describe the eratic behaveior. Also if you dont have an rc reset circuit or a reset chip, i'd add one.

Children