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

Different behaviour in debugging and stand-alone

Hello!
I've got the problem that the same code works different in debugging mode and in "normal" stand-alone mode.
In debug mode - with or without any breakpoints - all works nice, but when I disconnect and run the program stand alone it doesn't work.
I use the F020 with µVision2 V2.37 and C51 V7.05.
Thanks for any hint!

Astrid

Parents
  • Ok, I see, my desciption is poor ;-)

    I use for debugging the Cygnal C8051F Driver, newest version.

    This is my code:

    main()
    {
      if ( RSTSRC == 0x08 )
      {
        WDTErrorFlag = 1;
        Initialize();
        ShowError( E_WD );
        Wait1Min();
        WDTErrorFlag = 0;
        RSTSRC = 0x10;
      }
      else
      {
        WDTErrorFlag = 0;
        DoSomething();
      }
    }
    

    RSTSRC.3 indicates, if the prior reset was a WDT timeout.
    While debugging, the code is being executed correctly after a timeout of the WDT. Without debugging, the device is being resetted once and after a few seconds twice. After the second reset it enters the else-loop.
    After the first reset, when the WDT-reset flag is set, neither the if- nor the else-part is entered (tests have shown that).

Reply
  • Ok, I see, my desciption is poor ;-)

    I use for debugging the Cygnal C8051F Driver, newest version.

    This is my code:

    main()
    {
      if ( RSTSRC == 0x08 )
      {
        WDTErrorFlag = 1;
        Initialize();
        ShowError( E_WD );
        Wait1Min();
        WDTErrorFlag = 0;
        RSTSRC = 0x10;
      }
      else
      {
        WDTErrorFlag = 0;
        DoSomething();
      }
    }
    

    RSTSRC.3 indicates, if the prior reset was a WDT timeout.
    While debugging, the code is being executed correctly after a timeout of the WDT. Without debugging, the device is being resetted once and after a few seconds twice. After the second reset it enters the else-loop.
    After the first reset, when the WDT-reset flag is set, neither the if- nor the else-part is entered (tests have shown that).

Children