dwire-debug icon indicating copy to clipboard operation
dwire-debug copied to clipboard

'td' command not working

Open FewerToWhom opened this issue 8 years ago • 3 comments

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.

FewerToWhom avatar Nov 24 '17 05:11 FewerToWhom

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.

dcwbrown avatar Nov 24 '17 10:11 dcwbrown

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

FewerToWhom avatar Nov 24 '17 16:11 FewerToWhom

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

dcwbrown avatar Nov 24 '17 18:11 dcwbrown