|
@@ -960,3 +960,174 @@
|
|
|
#define TIMDIS1_P 0x01
|
|
|
#define TIMDIS2_P 0x02
|
|
|
#define TIMDIS3_P 0x03
|
|
|
+#define TIMDIS4_P 0x04
|
|
|
+#define TIMDIS5_P 0x05
|
|
|
+#define TIMDIS6_P 0x06
|
|
|
+#define TIMDIS7_P 0x07
|
|
|
+#define TIMDIS8_P 0x00
|
|
|
+#define TIMDIS9_P 0x01
|
|
|
+#define TIMDIS10_P 0x02
|
|
|
+#define TIMDIS11_P 0x03
|
|
|
+
|
|
|
+/* TIMER_STATUS Register */
|
|
|
+#define TIMIL0 0x00000001
|
|
|
+#define TIMIL1 0x00000002
|
|
|
+#define TIMIL2 0x00000004
|
|
|
+#define TIMIL3 0x00000008
|
|
|
+#define TIMIL4 0x00010000
|
|
|
+#define TIMIL5 0x00020000
|
|
|
+#define TIMIL6 0x00040000
|
|
|
+#define TIMIL7 0x00080000
|
|
|
+#define TIMIL8 0x0001
|
|
|
+#define TIMIL9 0x0002
|
|
|
+#define TIMIL10 0x0004
|
|
|
+#define TIMIL11 0x0008
|
|
|
+#define TOVF_ERR0 0x00000010
|
|
|
+#define TOVF_ERR1 0x00000020
|
|
|
+#define TOVF_ERR2 0x00000040
|
|
|
+#define TOVF_ERR3 0x00000080
|
|
|
+#define TOVF_ERR4 0x00100000
|
|
|
+#define TOVF_ERR5 0x00200000
|
|
|
+#define TOVF_ERR6 0x00400000
|
|
|
+#define TOVF_ERR7 0x00800000
|
|
|
+#define TOVF_ERR8 0x0010
|
|
|
+#define TOVF_ERR9 0x0020
|
|
|
+#define TOVF_ERR10 0x0040
|
|
|
+#define TOVF_ERR11 0x0080
|
|
|
+#define TRUN0 0x00001000
|
|
|
+#define TRUN1 0x00002000
|
|
|
+#define TRUN2 0x00004000
|
|
|
+#define TRUN3 0x00008000
|
|
|
+#define TRUN4 0x10000000
|
|
|
+#define TRUN5 0x20000000
|
|
|
+#define TRUN6 0x40000000
|
|
|
+#define TRUN7 0x80000000
|
|
|
+#define TRUN8 0x1000
|
|
|
+#define TRUN9 0x2000
|
|
|
+#define TRUN10 0x4000
|
|
|
+#define TRUN11 0x8000
|
|
|
+
|
|
|
+#define TIMIL0_P 0x00
|
|
|
+#define TIMIL1_P 0x01
|
|
|
+#define TIMIL2_P 0x02
|
|
|
+#define TIMIL3_P 0x03
|
|
|
+#define TIMIL4_P 0x10
|
|
|
+#define TIMIL5_P 0x11
|
|
|
+#define TIMIL6_P 0x12
|
|
|
+#define TIMIL7_P 0x13
|
|
|
+#define TIMIL8_P 0x00
|
|
|
+#define TIMIL9_P 0x01
|
|
|
+#define TIMIL10_P 0x02
|
|
|
+#define TIMIL11_P 0x03
|
|
|
+#define TOVF_ERR0_P 0x04
|
|
|
+#define TOVF_ERR1_P 0x05
|
|
|
+#define TOVF_ERR2_P 0x06
|
|
|
+#define TOVF_ERR3_P 0x07
|
|
|
+#define TOVF_ERR4_P 0x14
|
|
|
+#define TOVF_ERR5_P 0x15
|
|
|
+#define TOVF_ERR6_P 0x16
|
|
|
+#define TOVF_ERR7_P 0x17
|
|
|
+#define TOVF_ERR8_P 0x04
|
|
|
+#define TOVF_ERR9_P 0x05
|
|
|
+#define TOVF_ERR10_P 0x06
|
|
|
+#define TOVF_ERR11_P 0x07
|
|
|
+#define TRUN0_P 0x0C
|
|
|
+#define TRUN1_P 0x0D
|
|
|
+#define TRUN2_P 0x0E
|
|
|
+#define TRUN3_P 0x0F
|
|
|
+#define TRUN4_P 0x1C
|
|
|
+#define TRUN5_P 0x1D
|
|
|
+#define TRUN6_P 0x1E
|
|
|
+#define TRUN7_P 0x1F
|
|
|
+#define TRUN8_P 0x0C
|
|
|
+#define TRUN9_P 0x0D
|
|
|
+#define TRUN10_P 0x0E
|
|
|
+#define TRUN11_P 0x0F
|
|
|
+
|
|
|
+/* Alternate Deprecated Macros Provided For Backwards Code Compatibility */
|
|
|
+#define TOVL_ERR0 TOVF_ERR0
|
|
|
+#define TOVL_ERR1 TOVF_ERR1
|
|
|
+#define TOVL_ERR2 TOVF_ERR2
|
|
|
+#define TOVL_ERR3 TOVF_ERR3
|
|
|
+#define TOVL_ERR4 TOVF_ERR4
|
|
|
+#define TOVL_ERR5 TOVF_ERR5
|
|
|
+#define TOVL_ERR6 TOVF_ERR6
|
|
|
+#define TOVL_ERR7 TOVF_ERR7
|
|
|
+#define TOVL_ERR8 TOVF_ERR8
|
|
|
+#define TOVL_ERR9 TOVF_ERR9
|
|
|
+#define TOVL_ERR10 TOVF_ERR10
|
|
|
+#define TOVL_ERR11 TOVF_ERR11
|
|
|
+#define TOVL_ERR0_P TOVF_ERR0_P
|
|
|
+#define TOVL_ERR1_P TOVF_ERR1_P
|
|
|
+#define TOVL_ERR2_P TOVF_ERR2_P
|
|
|
+#define TOVL_ERR3_P TOVF_ERR3_P
|
|
|
+#define TOVL_ERR4_P TOVF_ERR4_P
|
|
|
+#define TOVL_ERR5_P TOVF_ERR5_P
|
|
|
+#define TOVL_ERR6_P TOVF_ERR6_P
|
|
|
+#define TOVL_ERR7_P TOVF_ERR7_P
|
|
|
+#define TOVL_ERR8_P TOVF_ERR8_P
|
|
|
+#define TOVL_ERR9_P TOVF_ERR9_P
|
|
|
+#define TOVL_ERR10_P TOVF_ERR10_P
|
|
|
+#define TOVL_ERR11_P TOVF_ERR11_P
|
|
|
+
|
|
|
+/* TIMERx_CONFIG Registers */
|
|
|
+#define PWM_OUT 0x0001
|
|
|
+#define WDTH_CAP 0x0002
|
|
|
+#define EXT_CLK 0x0003
|
|
|
+#define PULSE_HI 0x0004
|
|
|
+#define PERIOD_CNT 0x0008
|
|
|
+#define IRQ_ENA 0x0010
|
|
|
+#define TIN_SEL 0x0020
|
|
|
+#define OUT_DIS 0x0040
|
|
|
+#define CLK_SEL 0x0080
|
|
|
+#define TOGGLE_HI 0x0100
|
|
|
+#define EMU_RUN 0x0200
|
|
|
+#define ERR_TYP(x) ((x & 0x03) << 14)
|
|
|
+
|
|
|
+#define TMODE_P0 0x00
|
|
|
+#define TMODE_P1 0x01
|
|
|
+#define PULSE_HI_P 0x02
|
|
|
+#define PERIOD_CNT_P 0x03
|
|
|
+#define IRQ_ENA_P 0x04
|
|
|
+#define TIN_SEL_P 0x05
|
|
|
+#define OUT_DIS_P 0x06
|
|
|
+#define CLK_SEL_P 0x07
|
|
|
+#define TOGGLE_HI_P 0x08
|
|
|
+#define EMU_RUN_P 0x09
|
|
|
+#define ERR_TYP_P0 0x0E
|
|
|
+#define ERR_TYP_P1 0x0F
|
|
|
+
|
|
|
+/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
|
|
|
+
|
|
|
+/* AMGCTL Masks */
|
|
|
+#define AMCKEN 0x0001 /* Enable CLKOUT */
|
|
|
+#define AMBEN_B0 0x0002 /* Enable Asynchronous Memory Bank 0 only */
|
|
|
+#define AMBEN_B0_B1 0x0004 /* Enable Asynchronous Memory Banks 0 & 1 only */
|
|
|
+#define AMBEN_B0_B1_B2 0x0006 /* Enable Asynchronous Memory Banks 0, 1, and 2 */
|
|
|
+#define AMBEN_ALL 0x0008 /* Enable Asynchronous Memory Banks (all) 0, 1, 2, and 3 */
|
|
|
+#define B0_PEN 0x0010 /* Enable 16-bit packing Bank 0 */
|
|
|
+#define B1_PEN 0x0020 /* Enable 16-bit packing Bank 1 */
|
|
|
+#define B2_PEN 0x0040 /* Enable 16-bit packing Bank 2 */
|
|
|
+#define B3_PEN 0x0080 /* Enable 16-bit packing Bank 3 */
|
|
|
+
|
|
|
+/* AMGCTL Bit Positions */
|
|
|
+#define AMCKEN_P 0x00000000 /* Enable CLKOUT */
|
|
|
+#define AMBEN_P0 0x00000001 /* Asynchronous Memory Enable, 000 - banks 0-3 disabled, 001 - Bank 0 enabled */
|
|
|
+#define AMBEN_P1 0x00000002 /* Asynchronous Memory Enable, 010 - banks 0&1 enabled, 011 - banks 0-3 enabled */
|
|
|
+#define AMBEN_P2 0x00000003 /* Asynchronous Memory Enable, 1xx - All banks (bank 0, 1, 2, and 3) enabled */
|
|
|
+#define B0_PEN_P 0x004 /* Enable 16-bit packing Bank 0 */
|
|
|
+#define B1_PEN_P 0x005 /* Enable 16-bit packing Bank 1 */
|
|
|
+#define B2_PEN_P 0x006 /* Enable 16-bit packing Bank 2 */
|
|
|
+#define B3_PEN_P 0x007 /* Enable 16-bit packing Bank 3 */
|
|
|
+
|
|
|
+/* AMBCTL0 Masks */
|
|
|
+#define B0RDYEN 0x00000001 /* Bank 0 RDY Enable, 0=disable, 1=enable */
|
|
|
+#define B0RDYPOL 0x00000002 /* Bank 0 RDY Active high, 0=active low, 1=active high */
|
|
|
+#define B0TT_1 0x00000004 /* Bank 0 Transition Time from Read to Write = 1 cycle */
|
|
|
+#define B0TT_2 0x00000008 /* Bank 0 Transition Time from Read to Write = 2 cycles */
|
|
|
+#define B0TT_3 0x0000000C /* Bank 0 Transition Time from Read to Write = 3 cycles */
|
|
|
+#define B0TT_4 0x00000000 /* Bank 0 Transition Time from Read to Write = 4 cycles */
|
|
|
+#define B0ST_1 0x00000010 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=1 cycle */
|
|
|
+#define B0ST_2 0x00000020 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=2 cycles */
|
|
|
+#define B0ST_3 0x00000030 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=3 cycles */
|
|
|
+#define B0ST_4 0x00000000 /* Bank 0 Setup Time from AOE asserted to Read/Write asserted=4 cycles */
|