Author Topic: to debug in the m52259evb's flash is easy to reboot!  (Read 7799 times)

Offline tr111

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
to debug in the m52259evb's flash is easy to reboot!
« on: March 27, 2009, 05:30:24 AM »
        when I set a breakpoint in the code(utasker) ,and run ,it will stay in the breakpoint,but soon the board will reboot!  I debug in the m52259evb's  flash!
         I do the same in the MQX's code, also debug in the flash it will normal!
         I use the CodeWarrior IDE 7.1.1

         Later I find the reason:#define BACKUP_WATCHDOG_TIMER
         the watdog is the enable!

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: to debug in the m52259evb's flash is easy to reboot!
« Reply #1 on: March 27, 2009, 01:38:51 PM »
Hi

Yes, the backup Watchdog Timer is enabled by default in the project. See also http://www.utasker.com/forum/index.php?topic=505.0

However, rather than remove this, it is possible to temporarily disable the watchdog by pressing the "User Switch 2" on the EVB when the board is turned on (or when the code is executed when using the debugger). This is also described in detail in the tutorial http://www.utasker.com/docs/M5223X/uTaskerV1.3-Tutorial-M5225X.PDF in chapter 6.

The BWT, as described in the link, is better than the core watchdog but it is a bit more tricky to debug with since it runs also through a reset.

The idea behind the watchdog control like this is that generally it can always be left enabled, but temporarily disabled for short debug sessions (pressing switch or connecting input to '0') and so it is not absolutely necessary to build with disabled watchdog, with the risk that the built is subsequently released without re-enabling the watchdog!!

Regards

Mark