dcwbrown / dwire-debug

Simple stand-alone debugger for AVR DebugWIRE chips connected directly to an FT232R/CH340/DigiSpark/LittleWire on Linux or Windows.
GNU General Public License v2.0
191 stars 33 forks source link

'td' command not working #31

Open FewerToWhom opened 6 years ago

FewerToWhom commented 6 years ago

Greetings,

When playing with a simple code that uses time related interrupts to blink a LED, I have noticed that the 'td' command does not seem to work. If I leave a break point inside the interrupt handler, it is always called when I run the code, regardless of calling 'td' beforehand.

Cheers.

dcwbrown commented 6 years ago

The td command controls a flag which is used by the go command. Go will use a 0x4x debug wire command if timers are enabled, or a 0x6x command if they are disabled.

According to the analysis at http://www.ruemohr.org/docs/debugwire.html this corresponds to the 'run timers' setting in the atmel debugger.

The Atmel docs describe this as follows:

Keep timers running in stop mode

When checked, the timers set in the program will continue to run even when the program breaks at breakpoint or is halted

So 'td' doesn't disable timers completely, they still run when the code is running.

FewerToWhom commented 6 years ago

What is, then, the point of the 'td' and 'te' commands?

dcwbrown commented 6 years ago

You would need to address that question to Atmel ...