2
io76c711.h - internal register definitions for AT76C711
5
Created by Marek Michalkiewicz <marekm@linux.org.pl>
7
THIS SOFTWARE IS NOT COPYRIGHTED
9
This source code is offered for use in the public domain. You may
10
use, modify or distribute it freely.
12
This code is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
14
DISCLAIMED. This includes but is not limited to warranties of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
Based on (advance information?) Atmel datasheet Rev. 1643A-10/00.
24
#define AVR_ENHANCED 1
26
/* I/O space addresses */
28
/* 0x00-0x0C reserved */
40
/* Peripheral Enable Register */
43
/* Clock Control Register */
46
/* Data Register, Port C */
59
/* 0x1C-0x1F reserved */
65
/* 0x22-0x25 reserved */
95
/* 0x3A-0x3C reserved */
102
/* Interrupt vectors (byte addresses) */
103
/* XXX - the datasheet shows each vector as using one word of program
104
memory, which only allows RJMP, even though the thing has 16K bytes
105
of program memory so each vector should be a JMP instruction to reach
106
the entire program memory address space.
107
Assuming JMP for now - could be wrong, ask Atmel to be sure... */
109
#define SIG_SUSPEND_RESUME _vector_1
110
#define SIG_INTERRUPT0 _vector_2
111
#define SIG_INPUT_CAPTURE1 _vector_3
112
#define SIG_OUTPUT_COMPARE1A _vector_4
113
#define SIG_OUTPUT_COMPARE1B _vector_5
114
#define SIG_OVERFLOW1 _vector_6
115
#define SIG_OVERFLOW0 _vector_7
116
#define SIG_SPI _vector_8
117
#define SIG_TDMAC _vector_9
118
#define SIG_UART0 _vector_10
119
#define SIG_RDMAC _vector_11
120
#define SIG_UART1 _vector_12
121
#define SIG_INTERRUPT0 _vector_13
123
#define END_VECTOR (13)
124
#define INT_VECT_SIZE (0x3c)
129
/* bits 7-4 reserved */
156
/* bits 7-6 reserved */
160
/* bits 2-0 reserved */
163
/* bits 7-2 reserved */
168
/* bits 7-6 reserved */
181
/* bits 3-0 reserved */
186
/* bits 5-4 reserved */
193
/* bits 7-5 reserved */
201
/* bits 7-3 reserved */
277
/* bits 7-4 reserved */
321
/* bits 7-5 reserved */
325
/* bits 1-0 reserved */
328
/* bits 7-3 reserved */
336
/* bits 5-0 reserved */
348
/* Memory mapped registers */
351
#define UART0_BASE 0x2020
352
#define UART1_BASE 0x2030
353
/* offsets from the base address */
368
#define DMA_BASE 0x2000
369
/* offsets from the base address */
376
#define RXTADMEN 0x08
382
/* XXX DPORG register mentioned on page 20, but undocumented */
384
/* XXX Program Memory Control Bit mentioned on page 20, but undocumented */
385
#define PROGRAM_MEMORY_CONTROL_BIT 0x2040
388
#define USB_BASE 0x1000
389
/* offsets from the base address */
390
#define FRM_NUM_H 0x0FD
391
#define FRM_NUM_L 0x0FC
392
#define GLB_STATE 0x0FB
398
#define ENDPPGPG 0x0F1
423
#define FBYTE_CNT0_L 0x0BF
424
#define FBYTE_CNT1_L 0x0BE
425
#define FBYTE_CNT2_L 0x0BD
426
#define FBYTE_CNT3_L 0x0BC
427
#define FBYTE_CNT4_L 0x0BB
428
#define FBYTE_CNT5_L 0x0BA
429
#define FBYTE_CNT6_L 0x0B9
430
#define FBYTE_CNT7_L 0x0B8
431
#define FBYTE_CNT0_H 0x0AF
432
#define FBYTE_CNT1_H 0x0AE
433
#define FBYTE_CNT2_H 0x0AD
434
#define FBYTE_CNT3_H 0x0AC
435
#define FBYTE_CNT4_H 0x0AB
436
#define FBYTE_CNT5_H 0x0AA
437
#define FBYTE_CNT6_H 0x0A9
438
#define FBYTE_CNT7_H 0x0A8
439
#define SLP_MD_EN 0x100
441
#define IRQ_STAT 0x102
442
#define SUSP_WUP 0x103
444
#define USB_DMA_ADL 0x105
445
#define USB_DMA_ADH 0x106
446
#define USB_DMA_PLR 0x107
447
#define USB_DMA_EAD 0x108
448
#define USB_DMA_PLT 0x109
449
#define USB_DMA_EN 0x10A
451
/* Pointer registers (same for all AVR devices so far) */
459
/* Last memory addresses */
460
#define RAMEND 0x07FF
461
#define XRAMEND 0x07FF
463
#define FLASHEND 0x3FFF
466
AT76C711 data space memory map (ranges not listed are reserved):
467
0x0000 - 0x001F - AVR registers
468
0x0020 - 0x005F - AVR I/O space
469
0x0060 - 0x07FF - AVR data SRAM
470
0x1000 - 0x1FFF - USB (not all locations used)
471
0x2000 - 0x201F - DMA controller
472
0x2020 - 0x202F - UART0
473
0x2030 - 0x203F - UART1 (IRDA)
474
0x2040 - the mysterious Program Memory Control bit (???)
475
0x3000 - 0x37FF - DPRAM
476
0x8000 - 0xBFFF - program SRAM (read/write), would be nice if other
477
AVR devices did that as well (no need to use LPM!)
479
#endif /* __IO76C711 */