wdt_enable generates reference to register 0x38

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Studio 5 generates this code for the watchdog enable.
I can't find any documentation on register 0x38(apart from it being CCABUFH). Any ideas?

Sorry, forgot to say, this is an XMEGA256A3.
Anyway, 0x07 is the byte that enables the watchdog with the stated period, 0xd8 is the code that temporily allows chenges to the WDT_CTRL register,
but what the heck is register 0x38?

wdt_enable(WDT_PER_16CLK_gc);			
    6d04:	97 e0       	ldi	r25, 0x07	; 7
    6d06:	88 ed       	ldi	r24, 0xD8	; 216
    6d08:	08 b6       	in	r0, 0x38	; 56
    6d0a:	84 bf       	out	0x34, r24	; 52
    6d0c:	90 93 80 00 	sts	0x0080, r25
    6d10:	a8 95       	wdr
    6d12:	08 be       	out	0x38, r0	; 56

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

RAMPD?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ezharkov wrote:
RAMPD?

What makes you think that?

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Include files that come with WinAVR-20100110.
Or section "31. Peripheral Module Address Map" of the A datasheet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ezharkov wrote:
Or section "31. Peripheral Module Address Map" of the A datasheet.
together with "3.15 Register Summary" in the same document.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fair enough, I missed that because the memory map is now arranged as base addresses and offsets. My mistake.

But what is the purpose of reading the RAMPD register into r0, and then writing it back again, unmodified.

Four legs good, two legs bad, three legs stable.