mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/bitfields.h@41:e8b66477f5bf, 2013-10-25 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Oct 25 15:00:04 2013 +0100
- Revision:
- 41:e8b66477f5bf
Synchronized with git revision 317a1f66d2a2d4efe5544d3bf6c2aaf1d147a968
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 41:e8b66477f5bf | 1 | #ifndef MBED_BITFIELDS_H |
mbed_official | 41:e8b66477f5bf | 2 | #define MBED_BITFIELDS_H |
mbed_official | 41:e8b66477f5bf | 3 | |
mbed_official | 41:e8b66477f5bf | 4 | //! Massage x for use in bitfield name. |
mbed_official | 41:e8b66477f5bf | 5 | #define BFN_PREP(x, name) ( ((x)<<name##_SHIFT) & name##_MASK ) |
mbed_official | 41:e8b66477f5bf | 6 | |
mbed_official | 41:e8b66477f5bf | 7 | //! Get the value of bitfield name from y. Equivalent to (var=) y.name |
mbed_official | 41:e8b66477f5bf | 8 | #define BFN_GET(y, name) ( ((y) & name##_MASK)>>name##_SHIFT ) |
mbed_official | 41:e8b66477f5bf | 9 | |
mbed_official | 41:e8b66477f5bf | 10 | //! Set bitfield name from y to x: y.name= x. |
mbed_official | 41:e8b66477f5bf | 11 | #define BFN_SET(y, x, name) (y = ((y)&~name##_MASK) | BFN_PREP(x,name) ) |
mbed_official | 41:e8b66477f5bf | 12 | |
mbed_official | 41:e8b66477f5bf | 13 | |
mbed_official | 41:e8b66477f5bf | 14 | /* SYSMEMREMAP, address 0x4004 8000 */ |
mbed_official | 41:e8b66477f5bf | 15 | #define SYSMEMREMAP_MAP_MASK 0x0003 // System memory remap |
mbed_official | 41:e8b66477f5bf | 16 | #define SYSMEMREMAP_MAP_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 17 | |
mbed_official | 41:e8b66477f5bf | 18 | /* PRESETCTRL, address 0x4004 8004 */ |
mbed_official | 41:e8b66477f5bf | 19 | #define PRESETCTRL_SSP0_RST_N (1 << 0) // SPI0 reset control |
mbed_official | 41:e8b66477f5bf | 20 | #define PRESETCTRL_I2C_RST_N (1 << 1) // I2C reset control |
mbed_official | 41:e8b66477f5bf | 21 | #define PRESETCTRL_SSP1_RST_N (1 << 2) // SPI1 reset control |
mbed_official | 41:e8b66477f5bf | 22 | #define PRESETCTRL_CAN_RST_N (1 << 3) // C_CAN reset control. See Section 3.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 23 | |
mbed_official | 41:e8b66477f5bf | 24 | /* SYSPLLCTRL, address 0x4004 8008 */ |
mbed_official | 41:e8b66477f5bf | 25 | #define SYSPLLCTRL_MSEL_MASK 0x001F // Feedback divider value. The division value M is the programmed MSEL value + 1. 00000: Division ratio M = 1 to 11111: Division ratio M = 32. |
mbed_official | 41:e8b66477f5bf | 26 | #define SYSPLLCTRL_MSEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 27 | #define SYSPLLCTRL_PSEL_MASK 0x0060 // Post divider ratio P. The division ratio is 2 P. |
mbed_official | 41:e8b66477f5bf | 28 | #define SYSPLLCTRL_PSEL_SHIFT 5 |
mbed_official | 41:e8b66477f5bf | 29 | |
mbed_official | 41:e8b66477f5bf | 30 | /* SYSPLLSTAT, address 0x4004 800C */ |
mbed_official | 41:e8b66477f5bf | 31 | #define SYSPLLSTAT_LOCK (1 << 0) // PLL lock status |
mbed_official | 41:e8b66477f5bf | 32 | |
mbed_official | 41:e8b66477f5bf | 33 | /* SYSOSCCTRL, address 0x4004 8020 */ |
mbed_official | 41:e8b66477f5bf | 34 | #define SYSOSCCTRL_BYPASS (1 << 0) // Bypass system oscillator |
mbed_official | 41:e8b66477f5bf | 35 | #define SYSOSCCTRL_FREQRANGE (1 << 1) // Determines frequency range for Low-power oscillator. |
mbed_official | 41:e8b66477f5bf | 36 | |
mbed_official | 41:e8b66477f5bf | 37 | /* WDTOSCCTRL, address 0x4004 8024 */ |
mbed_official | 41:e8b66477f5bf | 38 | #define WDTOSCCTRL_DIVSEL_MASK 0x001F // Select divider for Fclkana. wdt_osc_clk = Fclkana/ (2 (1 + DIVSEL)) 00000: 2 (1 + DIVSEL) = 2 00001: 2 (1 + DIVSEL) = 4 to 11111: 2 (1 + DIVSEL) = 64 |
mbed_official | 41:e8b66477f5bf | 39 | #define WDTOSCCTRL_DIVSEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 40 | #define WDTOSCCTRL_FREQSEL_MASK 0x01E0 // Select watchdog oscillator analog output frequency (Fclkana). |
mbed_official | 41:e8b66477f5bf | 41 | #define WDTOSCCTRL_FREQSEL_SHIFT 5 |
mbed_official | 41:e8b66477f5bf | 42 | |
mbed_official | 41:e8b66477f5bf | 43 | /* IRCCTRL, address 0x4004 8028 */ |
mbed_official | 41:e8b66477f5bf | 44 | #define IRCCTRL_TRIM_MASK 0x00FF // Trim value |
mbed_official | 41:e8b66477f5bf | 45 | #define IRCCTRL_TRIM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 46 | |
mbed_official | 41:e8b66477f5bf | 47 | /* SYSRSTSTAT, address 0x4004 8030 */ |
mbed_official | 41:e8b66477f5bf | 48 | #define SYSRSTSTAT_POR (1 << 0) // POR reset status |
mbed_official | 41:e8b66477f5bf | 49 | #define SYSRSTSTAT_EXTRST (1 << 1) // Status of the external RESET pin. |
mbed_official | 41:e8b66477f5bf | 50 | #define SYSRSTSTAT_WDT (1 << 2) // Status of the Watchdog reset |
mbed_official | 41:e8b66477f5bf | 51 | #define SYSRSTSTAT_BOD (1 << 3) // Status of the Brown-out detect reset |
mbed_official | 41:e8b66477f5bf | 52 | #define SYSRSTSTAT_SYSRST (1 << 4) // Status of the software system reset |
mbed_official | 41:e8b66477f5bf | 53 | |
mbed_official | 41:e8b66477f5bf | 54 | /* SYSPLLCLKSEL, address 0x4004 8040 */ |
mbed_official | 41:e8b66477f5bf | 55 | #define SYSPLLCLKSEL_SEL_MASK 0x0003 // System PLL clock source |
mbed_official | 41:e8b66477f5bf | 56 | #define SYSPLLCLKSEL_SEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 57 | |
mbed_official | 41:e8b66477f5bf | 58 | /* SYSPLLCLKUEN, address 0x4004 8044 */ |
mbed_official | 41:e8b66477f5bf | 59 | #define SYSPLLCLKUEN_ENA (1 << 0) // Enable system PLL clock source update |
mbed_official | 41:e8b66477f5bf | 60 | |
mbed_official | 41:e8b66477f5bf | 61 | /* MAINCLKSEL, address 0x4004 8070 */ |
mbed_official | 41:e8b66477f5bf | 62 | #define MAINCLKSEL_SEL_MASK 0x0003 // Clock source for main clock |
mbed_official | 41:e8b66477f5bf | 63 | #define MAINCLKSEL_SEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 64 | |
mbed_official | 41:e8b66477f5bf | 65 | /* MAINCLKUEN, address 0x4004 8074 */ |
mbed_official | 41:e8b66477f5bf | 66 | #define MAINCLKUEN_ENA (1 << 0) // Enable main clock source update 0 |
mbed_official | 41:e8b66477f5bf | 67 | |
mbed_official | 41:e8b66477f5bf | 68 | /* SYSAHBCLKDIV, address 0x4004 8078 */ |
mbed_official | 41:e8b66477f5bf | 69 | #define SYSAHBCLKDIV_DIV_MASK 0x00FF // System AHB clock divider values 0: System clock disabled. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 70 | #define SYSAHBCLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 71 | |
mbed_official | 41:e8b66477f5bf | 72 | /* SYSAHBCLKCTRL, address 0x4004 8080 */ |
mbed_official | 41:e8b66477f5bf | 73 | #define SYSAHBCLKCTRL_SYS (1 << 0) // Enables clock for AHB to APB bridge, to the AHB matrix, to the Cortex-M0 FCLK and HCLK, to the SysCon, and to the PMU. This bit is read only. |
mbed_official | 41:e8b66477f5bf | 74 | #define SYSAHBCLKCTRL_ROM (1 << 1) // Enables clock for ROM. |
mbed_official | 41:e8b66477f5bf | 75 | #define SYSAHBCLKCTRL_RAM (1 << 2) // Enables clock for RAM. |
mbed_official | 41:e8b66477f5bf | 76 | #define SYSAHBCLKCTRL_FLASHREG (1 << 3) // Enables clock for flash register interface. |
mbed_official | 41:e8b66477f5bf | 77 | #define SYSAHBCLKCTRL_FLASHARRAY (1 << 4) // Enables clock for flash array access. |
mbed_official | 41:e8b66477f5bf | 78 | #define SYSAHBCLKCTRL_I2C (1 << 5) // Enables clock for I2C. |
mbed_official | 41:e8b66477f5bf | 79 | #define SYSAHBCLKCTRL_GPIO (1 << 6) // Enables clock for GPIO. |
mbed_official | 41:e8b66477f5bf | 80 | #define SYSAHBCLKCTRL_CT16B0 (1 << 7) // Enables clock for 16-bit counter/timer 0. |
mbed_official | 41:e8b66477f5bf | 81 | #define SYSAHBCLKCTRL_CT16B1 (1 << 8) // Enables clock for 16-bit counter/timer 1. |
mbed_official | 41:e8b66477f5bf | 82 | #define SYSAHBCLKCTRL_CT32B0 (1 << 9) // Enables clock for 32-bit counter/timer 0. |
mbed_official | 41:e8b66477f5bf | 83 | #define SYSAHBCLKCTRL_CT32B1 (1 << 10) // Enables clock for 32-bit counter/timer 1. |
mbed_official | 41:e8b66477f5bf | 84 | #define SYSAHBCLKCTRL_SSP0 (1 << 11) // Enables clock for SPI0. |
mbed_official | 41:e8b66477f5bf | 85 | #define SYSAHBCLKCTRL_UART (1 << 12) // Enables clock for UART. See Section 3.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 86 | #define SYSAHBCLKCTRL_ADC (1 << 13) // Enables clock for ADC. |
mbed_official | 41:e8b66477f5bf | 87 | #define SYSAHBCLKCTRL_WDT (1 << 15) // Enables clock for WDT. |
mbed_official | 41:e8b66477f5bf | 88 | #define SYSAHBCLKCTRL_IOCON (1 << 16) // Enables clock for I/O configuration block. |
mbed_official | 41:e8b66477f5bf | 89 | #define SYSAHBCLKCTRL_CAN (1 << 17) // Enables clock for C_CAN. See Section 3.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 90 | #define SYSAHBCLKCTRL_SSP1 (1 << 18) // Enables clock for SPI1. |
mbed_official | 41:e8b66477f5bf | 91 | |
mbed_official | 41:e8b66477f5bf | 92 | /* SSP0CLKDIV, address 0x4004 8094 */ |
mbed_official | 41:e8b66477f5bf | 93 | #define SSP0CLKDIV_DIV_MASK 0x00FF // SPI0_PCLK clock divider values 0: Disable SPI0_PCLK. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 94 | #define SSP0CLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 95 | |
mbed_official | 41:e8b66477f5bf | 96 | /* UARTCLKDIV, address 0x4004 8098 */ |
mbed_official | 41:e8b66477f5bf | 97 | #define UARTCLKDIV_DIV_MASK 0x00FF // UART_PCLK clock divider values 0: Disable UART_PCLK. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 98 | #define UARTCLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 99 | |
mbed_official | 41:e8b66477f5bf | 100 | /* SSP1CLKDIV, address 0x4004 809C */ |
mbed_official | 41:e8b66477f5bf | 101 | #define SSP1CLKDIV_DIV_MASK 0x00FF // SPI1_PCLK clock divider values 0: Disable SPI1_PCLK. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 102 | #define SSP1CLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 103 | |
mbed_official | 41:e8b66477f5bf | 104 | /* WDTCLKSEL, address 0x4004 80D0 */ |
mbed_official | 41:e8b66477f5bf | 105 | #define WDTCLKSEL_SEL_MASK 0x0003 // WDT clock source |
mbed_official | 41:e8b66477f5bf | 106 | #define WDTCLKSEL_SEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 107 | |
mbed_official | 41:e8b66477f5bf | 108 | /* WDTCLKUEN, address 0x4004 80D4 */ |
mbed_official | 41:e8b66477f5bf | 109 | #define WDTCLKUEN_ENA (1 << 0) // Enable WDT clock source update |
mbed_official | 41:e8b66477f5bf | 110 | |
mbed_official | 41:e8b66477f5bf | 111 | /* WDTCLKDIV, address 0x4004 80D8 */ |
mbed_official | 41:e8b66477f5bf | 112 | #define WDTCLKDIV_DIV_MASK 0x00FF // WDT clock divider values 0: Disable WDCLK. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 113 | #define WDTCLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 114 | |
mbed_official | 41:e8b66477f5bf | 115 | /* CLKOUTCLKSEL, address 0x4004 80E0 */ |
mbed_official | 41:e8b66477f5bf | 116 | #define CLKOUTCLKSEL_SEL_MASK 0x0003 // CLKOUT clock source |
mbed_official | 41:e8b66477f5bf | 117 | #define CLKOUTCLKSEL_SEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 118 | |
mbed_official | 41:e8b66477f5bf | 119 | /* CLKOUTUEN, address 0x4004 80E4 */ |
mbed_official | 41:e8b66477f5bf | 120 | #define CLKOUTUEN_ENA (1 << 0) // Enable CLKOUT clock source update 0 |
mbed_official | 41:e8b66477f5bf | 121 | |
mbed_official | 41:e8b66477f5bf | 122 | /* CLKOUTCLKDIV, address 0x4004 80E8 */ |
mbed_official | 41:e8b66477f5bf | 123 | #define CLKOUTCLKDIV_DIV_MASK 0x00FF // Clock output divider values 0: Disable CLKOUT. 1: Divide by 1. to 255: Divide by 255. |
mbed_official | 41:e8b66477f5bf | 124 | #define CLKOUTCLKDIV_DIV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 125 | |
mbed_official | 41:e8b66477f5bf | 126 | /* PIOPORCAP0, address 0x4004 8100 */ |
mbed_official | 41:e8b66477f5bf | 127 | #define PIOPORCAP0_CAPPIO0_N_MASK 0x0FFF // Raw reset status input PIO0_n: PIO0_11 to PIO0_0 |
mbed_official | 41:e8b66477f5bf | 128 | #define PIOPORCAP0_CAPPIO0_N_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 129 | #define PIOPORCAP0_CAPPIO1_N_MASK 0xFFF000 // Raw reset status input PIO1_n: PIO1_11 to PIO1_0 |
mbed_official | 41:e8b66477f5bf | 130 | #define PIOPORCAP0_CAPPIO1_N_SHIFT 12 |
mbed_official | 41:e8b66477f5bf | 131 | #define PIOPORCAP0_CAPPIO2_N_MASK 0xFF000000 // Raw reset status input PIO2_n: PIO2_7 to PIO2_0 |
mbed_official | 41:e8b66477f5bf | 132 | #define PIOPORCAP0_CAPPIO2_N_SHIFT 24 |
mbed_official | 41:e8b66477f5bf | 133 | |
mbed_official | 41:e8b66477f5bf | 134 | /* PIOPORCAP1, address 0x4004 8104 */ |
mbed_official | 41:e8b66477f5bf | 135 | #define PIOPORCAP1_CAPPIO2_8 (1 << 0) // Raw reset status input PIO2_8 |
mbed_official | 41:e8b66477f5bf | 136 | #define PIOPORCAP1_CAPPIO2_9 (1 << 1) // Raw reset status input PIO2_9 |
mbed_official | 41:e8b66477f5bf | 137 | #define PIOPORCAP1_CAPPIO2_10 (1 << 2) // Raw reset status input PIO2_10 |
mbed_official | 41:e8b66477f5bf | 138 | #define PIOPORCAP1_CAPPIO2_11 (1 << 3) // Raw reset status input PIO2_11 |
mbed_official | 41:e8b66477f5bf | 139 | #define PIOPORCAP1_CAPPIO3_0 (1 << 4) // Raw reset status input PIO3_0 |
mbed_official | 41:e8b66477f5bf | 140 | #define PIOPORCAP1_CAPPIO3_1 (1 << 5) // Raw reset status input PIO3_1 |
mbed_official | 41:e8b66477f5bf | 141 | #define PIOPORCAP1_CAPPIO3_2 (1 << 6) // Raw reset status input PIO3_2 |
mbed_official | 41:e8b66477f5bf | 142 | #define PIOPORCAP1_CAPPIO3_3 (1 << 7) // Raw reset status input PIO3_3 |
mbed_official | 41:e8b66477f5bf | 143 | #define PIOPORCAP1_CAPPIO3_4 (1 << 8) // Raw reset status input PIO3_4 |
mbed_official | 41:e8b66477f5bf | 144 | #define PIOPORCAP1_CAPPIO3_5 (1 << 9) // Raw reset status input PIO3_5 |
mbed_official | 41:e8b66477f5bf | 145 | |
mbed_official | 41:e8b66477f5bf | 146 | /* BODCTRL, address 0x4004 8150 */ |
mbed_official | 41:e8b66477f5bf | 147 | #define BODCTRL_BODRSTLEV_MASK 0x0003 // BOD reset level |
mbed_official | 41:e8b66477f5bf | 148 | #define BODCTRL_BODRSTLEV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 149 | #define BODCTRL_BODINTVAL_MASK 0x000C // BOD interrupt level |
mbed_official | 41:e8b66477f5bf | 150 | #define BODCTRL_BODINTVAL_SHIFT 2 |
mbed_official | 41:e8b66477f5bf | 151 | #define BODCTRL_BODRSTENA (1 << 4) // BOD reset enable |
mbed_official | 41:e8b66477f5bf | 152 | |
mbed_official | 41:e8b66477f5bf | 153 | /* SYSTCKCAL, address 0x4004 8154 */ |
mbed_official | 41:e8b66477f5bf | 154 | #define SYSTCKCAL_CAL_MASK 0x3FFFFFF // System tick timer calibration value |
mbed_official | 41:e8b66477f5bf | 155 | #define SYSTCKCAL_CAL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 156 | |
mbed_official | 41:e8b66477f5bf | 157 | /* NMISRC, address 0x4004 8174 */ |
mbed_official | 41:e8b66477f5bf | 158 | #define NMISRC_IRQNO_MASK 0x001F // The IRQ number of the interrupt that acts as the Non-Maskable Interrupt 0 (NMI) if bit 31 in this register is 1. See Table 54 for the list of interrupt sources and their IRQ numbers. |
mbed_official | 41:e8b66477f5bf | 159 | #define NMISRC_IRQNO_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 160 | #define NMISRC_NMIEN (1 << 31) // Write a 1 to this bit to enable the Non-Maskable Interrupt (NMI) source selected by bits 4:0. |
mbed_official | 41:e8b66477f5bf | 161 | |
mbed_official | 41:e8b66477f5bf | 162 | /* STARTAPRP0, address 0x4004 8200 */ |
mbed_official | 41:e8b66477f5bf | 163 | #define STARTAPRP0_APRPIO0_N_MASK 0x0FFF // Edge select for start logic input PIO0_n: PIO0_11 to PIO0_0 0 = Falling edge 1 = Rising edge |
mbed_official | 41:e8b66477f5bf | 164 | #define STARTAPRP0_APRPIO0_N_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 165 | #define STARTAPRP0_APRPIO1_0 (1 << 12) // Edge select for start logic input PIO1_0 0 = Falling edge 1 = Rising edge Reserved. Do not write a 1 to reserved bits in this register. |
mbed_official | 41:e8b66477f5bf | 166 | |
mbed_official | 41:e8b66477f5bf | 167 | /* STARTERP0, address 0x4004 8204 */ |
mbed_official | 41:e8b66477f5bf | 168 | #define STARTERP0_ERPIO0_N_MASK 0x0FFF // Enable start signal for start logic input PIO0_n: PIO0_11 to PIO0_0 0 = Disabled 1 = Enabled |
mbed_official | 41:e8b66477f5bf | 169 | #define STARTERP0_ERPIO0_N_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 170 | #define STARTERP0_ERPIO1_0 (1 << 12) // Enable start signal for start logic input PIO1_0 0 = Disabled 1 = Enabled Reserved. Do not write a 1 to reserved bits in this register. |
mbed_official | 41:e8b66477f5bf | 171 | |
mbed_official | 41:e8b66477f5bf | 172 | /* STARTRSRP0CLR, address 0x4004 8208 */ |
mbed_official | 41:e8b66477f5bf | 173 | #define STARTRSRP0CLR_RSRPIO0_N_MASK 0x0FFF // Start signal reset for start logic input PIO0_n:PIO0_11 to PIO0_0 0 = Do nothing. 1 = Writing 1 resets the start signal. |
mbed_official | 41:e8b66477f5bf | 174 | #define STARTRSRP0CLR_RSRPIO0_N_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 175 | #define STARTRSRP0CLR_RSRPIO1_0 (1 << 12) // Start signal reset for start logic input PIO1_0 0 = Do nothing. 1 = Writing 1 resets the start signal. |
mbed_official | 41:e8b66477f5bf | 176 | |
mbed_official | 41:e8b66477f5bf | 177 | /* STARTSRP0, address 0x4004 820C */ |
mbed_official | 41:e8b66477f5bf | 178 | #define STARTSRP0_SRPIO0_N_MASK 0x0FFF // Start signal status for start logic input PIO0_n: PIO0_11 to PIO0_0 0 = No start signal received. 1 = Start signal pending. |
mbed_official | 41:e8b66477f5bf | 179 | #define STARTSRP0_SRPIO0_N_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 180 | #define STARTSRP0_SRPIO1_0 (1 << 12) // Start signal status for start logic input PIO1_0 0 = No start signal received. 1 = Start signal pending. |
mbed_official | 41:e8b66477f5bf | 181 | |
mbed_official | 41:e8b66477f5bf | 182 | /* PDSLEEPCFG, address 0x4004 8230 */ |
mbed_official | 41:e8b66477f5bf | 183 | #define PDSLEEPCFG_BOD_PD (1 << 3) // BOD power-down control in Deep-sleep mode, see Table 40. |
mbed_official | 41:e8b66477f5bf | 184 | #define PDSLEEPCFG_WDTOSC_PD (1 << 6) // Watchdog oscillator power control in Deep-sleep mode, see Table 40. |
mbed_official | 41:e8b66477f5bf | 185 | |
mbed_official | 41:e8b66477f5bf | 186 | /* PDAWAKECFG, address 0x4004 8234 */ |
mbed_official | 41:e8b66477f5bf | 187 | #define PDAWAKECFG_IRCOUT_PD (1 << 0) // IRC oscillator output wake-up configuration |
mbed_official | 41:e8b66477f5bf | 188 | #define PDAWAKECFG_IRC_PD (1 << 1) // IRC oscillator power-down wake-up configuration |
mbed_official | 41:e8b66477f5bf | 189 | #define PDAWAKECFG_FLASH_PD (1 << 2) // Flash wake-up configuration |
mbed_official | 41:e8b66477f5bf | 190 | #define PDAWAKECFG_BOD_PD (1 << 3) // BOD wake-up configuration |
mbed_official | 41:e8b66477f5bf | 191 | #define PDAWAKECFG_ADC_PD (1 << 4) // ADC wake-up configuration |
mbed_official | 41:e8b66477f5bf | 192 | #define PDAWAKECFG_SYSOSC_PD (1 << 5) // System oscillator wake-up configuration |
mbed_official | 41:e8b66477f5bf | 193 | #define PDAWAKECFG_WDTOSC_PD (1 << 6) // Watchdog oscillator wake-up configuration |
mbed_official | 41:e8b66477f5bf | 194 | #define PDAWAKECFG_SYSPLL_PD (1 << 7) // System PLL wake-up configuration |
mbed_official | 41:e8b66477f5bf | 195 | |
mbed_official | 41:e8b66477f5bf | 196 | /* PDRUNCFG, address 0x4004 8238 */ |
mbed_official | 41:e8b66477f5bf | 197 | #define PDRUNCFG_IRCOUT_PD (1 << 0) // IRC oscillator output power-down |
mbed_official | 41:e8b66477f5bf | 198 | #define PDRUNCFG_IRC_PD (1 << 1) // IRC oscillator power-down |
mbed_official | 41:e8b66477f5bf | 199 | #define PDRUNCFG_FLASH_PD (1 << 2) // Flash power-down |
mbed_official | 41:e8b66477f5bf | 200 | #define PDRUNCFG_BOD_PD (1 << 3) // BOD power-down |
mbed_official | 41:e8b66477f5bf | 201 | #define PDRUNCFG_ADC_PD (1 << 4) // ADC power-down |
mbed_official | 41:e8b66477f5bf | 202 | #define PDRUNCFG_SYSOSC_PD (1 << 5) // System oscillator power-down |
mbed_official | 41:e8b66477f5bf | 203 | #define PDRUNCFG_WDTOSC_PD (1 << 6) // Watchdog oscillator power-down |
mbed_official | 41:e8b66477f5bf | 204 | #define PDRUNCFG_SYSPLL_PD (1 << 7) // System PLL power-down |
mbed_official | 41:e8b66477f5bf | 205 | |
mbed_official | 41:e8b66477f5bf | 206 | /* DEVICE_ID, address 0x4004 83F4 */ |
mbed_official | 41:e8b66477f5bf | 207 | #define DEVICE_ID_DEVICEID_MASK 0xFFFFFFFF // Part ID numbers for LPC111x/LPC11Cxx parts |
mbed_official | 41:e8b66477f5bf | 208 | #define DEVICE_ID_DEVICEID_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 209 | |
mbed_official | 41:e8b66477f5bf | 210 | /* FLASHCFG, address 0x4003 C010 */ |
mbed_official | 41:e8b66477f5bf | 211 | #define FLASHCFG_FLASHTIM_MASK 0x0003 // Flash memory access time. FLASHTIM +1 is equal to the number of system clocks used for flash access. |
mbed_official | 41:e8b66477f5bf | 212 | #define FLASHCFG_FLASHTIM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 213 | |
mbed_official | 41:e8b66477f5bf | 214 | /* PCON, address 0x4003 8000 */ |
mbed_official | 41:e8b66477f5bf | 215 | #define PCON_DPDEN (1 << 1) // Deep power-down mode enable |
mbed_official | 41:e8b66477f5bf | 216 | #define PCON_SLEEPFLAG (1 << 8) // Sleep mode flag |
mbed_official | 41:e8b66477f5bf | 217 | #define PCON_DPDFLAG (1 << 11) // Deep power-down flag |
mbed_official | 41:e8b66477f5bf | 218 | |
mbed_official | 41:e8b66477f5bf | 219 | /* GPREG0 - GPREG3, address 0x4003 8004 to 0x4003 8010 */ |
mbed_official | 41:e8b66477f5bf | 220 | #define GPREGn_GPDATA_MASK 0xFFFFFFFF // Data retained during Deep power-down mode. |
mbed_official | 41:e8b66477f5bf | 221 | #define GPREGn_GPDATA_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 222 | |
mbed_official | 41:e8b66477f5bf | 223 | /* GPREG4, address 0x4003 8014 */ |
mbed_official | 41:e8b66477f5bf | 224 | #define GPREG4_WAKEUPHYS (1 << 10) // WAKEUP pin hysteresis enable |
mbed_official | 41:e8b66477f5bf | 225 | #define GPREG4_GPDATA_MASK 0xFFFFF800 // Data retained during Deep power-down mode. |
mbed_official | 41:e8b66477f5bf | 226 | #define GPREG4_GPDATA_SHIFT 11 |
mbed_official | 41:e8b66477f5bf | 227 | |
mbed_official | 41:e8b66477f5bf | 228 | /* IOCON_PIO2_6, address 0x4004 4000 */ |
mbed_official | 41:e8b66477f5bf | 229 | #define IOCON_PIO2_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 230 | #define IOCON_PIO2_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 231 | #define IOCON_PIO2_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 232 | #define IOCON_PIO2_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 233 | #define IOCON_PIO2_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 234 | #define IOCON_PIO2_6_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 235 | |
mbed_official | 41:e8b66477f5bf | 236 | /* IOCON_PIO2_0, address 0x4004 4008 */ |
mbed_official | 41:e8b66477f5bf | 237 | #define IOCON_PIO2_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 238 | #define IOCON_PIO2_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 239 | #define IOCON_PIO2_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 240 | #define IOCON_PIO2_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 241 | #define IOCON_PIO2_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 242 | #define IOCON_PIO2_0_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 243 | |
mbed_official | 41:e8b66477f5bf | 244 | /* IOCON_RESET_PIO0_0, address 0x4004 400C */ |
mbed_official | 41:e8b66477f5bf | 245 | #define IOCON_RESET_PIO0_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 246 | #define IOCON_RESET_PIO0_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 247 | #define IOCON_RESET_PIO0_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 248 | #define IOCON_RESET_PIO0_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 249 | #define IOCON_RESET_PIO0_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 250 | #define IOCON_RESET_PIO0_0_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 251 | |
mbed_official | 41:e8b66477f5bf | 252 | /* IOCON_PIO0_1, address 0x4004 4010 */ |
mbed_official | 41:e8b66477f5bf | 253 | #define IOCON_PIO0_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 254 | #define IOCON_PIO0_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 255 | #define IOCON_PIO0_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 256 | #define IOCON_PIO0_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 257 | #define IOCON_PIO0_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 258 | #define IOCON_PIO0_1_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 259 | |
mbed_official | 41:e8b66477f5bf | 260 | /* IOCON_PIO1_8, address 0x4004 4014 */ |
mbed_official | 41:e8b66477f5bf | 261 | #define IOCON_PIO1_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 262 | #define IOCON_PIO1_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 263 | #define IOCON_PIO1_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 264 | #define IOCON_PIO1_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 265 | #define IOCON_PIO1_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 266 | #define IOCON_PIO1_8_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 267 | |
mbed_official | 41:e8b66477f5bf | 268 | /* IOCON_PIO0_2, address 0x4004 401C */ |
mbed_official | 41:e8b66477f5bf | 269 | #define IOCON_PIO0_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 270 | #define IOCON_PIO0_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 271 | #define IOCON_PIO0_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 272 | #define IOCON_PIO0_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 273 | #define IOCON_PIO0_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 274 | #define IOCON_PIO0_2_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 275 | |
mbed_official | 41:e8b66477f5bf | 276 | /* IOCON_PIO2_7, address 0x4004 4020 */ |
mbed_official | 41:e8b66477f5bf | 277 | #define IOCON_PIO2_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 278 | #define IOCON_PIO2_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 279 | #define IOCON_PIO2_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 280 | #define IOCON_PIO2_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 281 | #define IOCON_PIO2_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 282 | #define IOCON_PIO2_7_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 283 | |
mbed_official | 41:e8b66477f5bf | 284 | /* IOCON_PIO2_8, address 0x4004 4024 */ |
mbed_official | 41:e8b66477f5bf | 285 | #define IOCON_PIO2_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 286 | #define IOCON_PIO2_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 287 | #define IOCON_PIO2_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 288 | #define IOCON_PIO2_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 289 | #define IOCON_PIO2_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 290 | #define IOCON_PIO2_8_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 291 | |
mbed_official | 41:e8b66477f5bf | 292 | /* IOCON_PIO2_1, address 0x4004 4028 */ |
mbed_official | 41:e8b66477f5bf | 293 | #define IOCON_PIO2_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 294 | #define IOCON_PIO2_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 295 | #define IOCON_PIO2_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 296 | #define IOCON_PIO2_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 297 | #define IOCON_PIO2_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 298 | #define IOCON_PIO2_1_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 299 | |
mbed_official | 41:e8b66477f5bf | 300 | /* IOCON_PIO0_3, address 0x4004 402C */ |
mbed_official | 41:e8b66477f5bf | 301 | #define IOCON_PIO0_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 302 | #define IOCON_PIO0_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 303 | #define IOCON_PIO0_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 304 | #define IOCON_PIO0_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 305 | #define IOCON_PIO0_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 306 | #define IOCON_PIO0_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 307 | |
mbed_official | 41:e8b66477f5bf | 308 | /* IOCON_PIO0_4, address 0x4004 4030 */ |
mbed_official | 41:e8b66477f5bf | 309 | #define IOCON_PIO0_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 310 | #define IOCON_PIO0_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 311 | #define IOCON_PIO0_4_I2CMODE_MASK 0x0300 // Selects I2C mode. Select Standard mode (I2CMODE = 00, 00 default) or Standard I/O functionality (I2CMODE = 01) if the pin function is GPIO (FUNC = 000). |
mbed_official | 41:e8b66477f5bf | 312 | #define IOCON_PIO0_4_I2CMODE_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 313 | |
mbed_official | 41:e8b66477f5bf | 314 | /* IOCON_PIO0_5, address 0x4004 4034 */ |
mbed_official | 41:e8b66477f5bf | 315 | #define IOCON_PIO0_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 316 | #define IOCON_PIO0_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 317 | #define IOCON_PIO0_5_I2CMODE_MASK 0x0300 // Selects I2C mode. Select Standard mode (I2CMODE = 00, default) or Standard I/O functionality (I2CMODE = 01) if the pin function is GPIO (FUNC = 000). |
mbed_official | 41:e8b66477f5bf | 318 | #define IOCON_PIO0_5_I2CMODE_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 319 | |
mbed_official | 41:e8b66477f5bf | 320 | /* IOCON_PIO1_9, address 0x4004 4038 */ |
mbed_official | 41:e8b66477f5bf | 321 | #define IOCON_PIO1_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 322 | #define IOCON_PIO1_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 323 | #define IOCON_PIO1_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 324 | #define IOCON_PIO1_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 325 | #define IOCON_PIO1_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 326 | #define IOCON_PIO1_9_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 327 | |
mbed_official | 41:e8b66477f5bf | 328 | /* IOCON_PIO3_4, address 0x4004 403C */ |
mbed_official | 41:e8b66477f5bf | 329 | #define IOCON_PIO3_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 330 | #define IOCON_PIO3_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 331 | #define IOCON_PIO3_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 332 | #define IOCON_PIO3_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 333 | #define IOCON_PIO3_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 334 | #define IOCON_PIO3_4_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 335 | |
mbed_official | 41:e8b66477f5bf | 336 | /* IOCON_PIO2_4, address 0x4004 4040 */ |
mbed_official | 41:e8b66477f5bf | 337 | #define IOCON_PIO2_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 338 | #define IOCON_PIO2_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 339 | #define IOCON_PIO2_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 340 | #define IOCON_PIO2_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 341 | #define IOCON_PIO2_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 342 | #define IOCON_PIO2_4_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 343 | |
mbed_official | 41:e8b66477f5bf | 344 | /* IOCON_PIO2_5, address 0x4004 4044 */ |
mbed_official | 41:e8b66477f5bf | 345 | #define IOCON_PIO2_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 346 | #define IOCON_PIO2_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 347 | #define IOCON_PIO2_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 348 | #define IOCON_PIO2_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 349 | #define IOCON_PIO2_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 350 | #define IOCON_PIO2_5_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 351 | |
mbed_official | 41:e8b66477f5bf | 352 | /* IOCON_PIO3_5, address 0x4004 4048 */ |
mbed_official | 41:e8b66477f5bf | 353 | #define IOCON_PIO3_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 354 | #define IOCON_PIO3_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 355 | #define IOCON_PIO3_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 356 | #define IOCON_PIO3_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 357 | #define IOCON_PIO3_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 358 | #define IOCON_PIO3_5_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 359 | |
mbed_official | 41:e8b66477f5bf | 360 | /* IOCON_PIO0_6, address 0x4004 404C */ |
mbed_official | 41:e8b66477f5bf | 361 | #define IOCON_PIO0_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 362 | #define IOCON_PIO0_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 363 | #define IOCON_PIO0_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 364 | #define IOCON_PIO0_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 365 | #define IOCON_PIO0_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 366 | #define IOCON_PIO0_6_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 367 | |
mbed_official | 41:e8b66477f5bf | 368 | /* IOCON_PIO0_7, address 0x4004 4050 */ |
mbed_official | 41:e8b66477f5bf | 369 | #define IOCON_PIO0_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 370 | #define IOCON_PIO0_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 371 | #define IOCON_PIO0_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 372 | #define IOCON_PIO0_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 373 | #define IOCON_PIO0_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 374 | #define IOCON_PIO0_7_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 375 | |
mbed_official | 41:e8b66477f5bf | 376 | /* IOCON_PIO2_9, address 0x4004 4054 */ |
mbed_official | 41:e8b66477f5bf | 377 | #define IOCON_PIO2_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 378 | #define IOCON_PIO2_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 379 | #define IOCON_PIO2_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 380 | #define IOCON_PIO2_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 381 | #define IOCON_PIO2_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 382 | #define IOCON_PIO2_9_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 383 | |
mbed_official | 41:e8b66477f5bf | 384 | /* IOCON_PIO2_10, address 0x4004 4058 */ |
mbed_official | 41:e8b66477f5bf | 385 | #define IOCON_PIO2_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 386 | #define IOCON_PIO2_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 387 | #define IOCON_PIO2_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 388 | #define IOCON_PIO2_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 389 | #define IOCON_PIO2_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 390 | #define IOCON_PIO2_10_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 391 | |
mbed_official | 41:e8b66477f5bf | 392 | /* IOCON_PIO2_2, address 0x4004 405C */ |
mbed_official | 41:e8b66477f5bf | 393 | #define IOCON_PIO2_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 394 | #define IOCON_PIO2_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 395 | #define IOCON_PIO2_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 396 | #define IOCON_PIO2_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 397 | #define IOCON_PIO2_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 398 | #define IOCON_PIO2_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 399 | |
mbed_official | 41:e8b66477f5bf | 400 | /* IOCON_PIO0_8, address 0x4004 4060 */ |
mbed_official | 41:e8b66477f5bf | 401 | #define IOCON_PIO0_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 402 | #define IOCON_PIO0_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 403 | #define IOCON_PIO0_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 404 | #define IOCON_PIO0_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 405 | #define IOCON_PIO0_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 406 | #define IOCON_PIO0_8_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 407 | |
mbed_official | 41:e8b66477f5bf | 408 | /* IOCON_PIO0_9, address 0x4004 4064 */ |
mbed_official | 41:e8b66477f5bf | 409 | #define IOCON_PIO0_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 410 | #define IOCON_PIO0_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 411 | #define IOCON_PIO0_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 412 | #define IOCON_PIO0_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 413 | #define IOCON_PIO0_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 414 | #define IOCON_PIO0_9_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 415 | |
mbed_official | 41:e8b66477f5bf | 416 | /* IOCON_SWCLK_PIO0_10, address 0x4004 4068 */ |
mbed_official | 41:e8b66477f5bf | 417 | #define IOCON_SWCLK_PIO0_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 418 | #define IOCON_SWCLK_PIO0_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 419 | #define IOCON_SWCLK_PIO0_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 420 | #define IOCON_SWCLK_PIO0_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 421 | #define IOCON_SWCLK_PIO0_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 422 | #define IOCON_SWCLK_PIO0_10_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 423 | |
mbed_official | 41:e8b66477f5bf | 424 | /* IOCON_PIO1_10, address 0x4004 406C */ |
mbed_official | 41:e8b66477f5bf | 425 | #define IOCON_PIO1_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 426 | #define IOCON_PIO1_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 427 | #define IOCON_PIO1_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 428 | #define IOCON_PIO1_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 429 | #define IOCON_PIO1_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 430 | #define IOCON_PIO1_10_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 431 | #define IOCON_PIO1_10_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 432 | |
mbed_official | 41:e8b66477f5bf | 433 | /* IOCON_PIO2_11, address 0x4004 4070 */ |
mbed_official | 41:e8b66477f5bf | 434 | #define IOCON_PIO2_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 435 | #define IOCON_PIO2_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 436 | #define IOCON_PIO2_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 437 | #define IOCON_PIO2_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 438 | #define IOCON_PIO2_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 439 | #define IOCON_PIO2_11_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 440 | |
mbed_official | 41:e8b66477f5bf | 441 | /* IOCON_R_PIO0_11, address 0x4004 4074 */ |
mbed_official | 41:e8b66477f5bf | 442 | #define IOCON_R_PIO0_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 443 | #define IOCON_R_PIO0_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 444 | #define IOCON_R_PIO0_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 445 | #define IOCON_R_PIO0_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 446 | #define IOCON_R_PIO0_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 447 | #define IOCON_R_PIO0_11_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 448 | #define IOCON_R_PIO0_11_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 449 | |
mbed_official | 41:e8b66477f5bf | 450 | /* IOCON_R_PIO1_0, address 0x4004 4078 */ |
mbed_official | 41:e8b66477f5bf | 451 | #define IOCON_R_PIO1_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 452 | #define IOCON_R_PIO1_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 453 | #define IOCON_R_PIO1_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 454 | #define IOCON_R_PIO1_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 455 | #define IOCON_R_PIO1_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 456 | #define IOCON_R_PIO1_0_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 457 | #define IOCON_R_PIO1_0_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 458 | |
mbed_official | 41:e8b66477f5bf | 459 | /* IOCON_R_PIO1_1, address 0x4004 407C */ |
mbed_official | 41:e8b66477f5bf | 460 | #define IOCON_R_PIO1_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 461 | #define IOCON_R_PIO1_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 462 | #define IOCON_R_PIO1_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 463 | #define IOCON_R_PIO1_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 464 | #define IOCON_R_PIO1_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 465 | #define IOCON_R_PIO1_1_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 466 | #define IOCON_R_PIO1_1_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 467 | |
mbed_official | 41:e8b66477f5bf | 468 | /* IOCON_R_PIO1_2, address 0x4004 4080 */ |
mbed_official | 41:e8b66477f5bf | 469 | #define IOCON_R_PIO1_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 470 | #define IOCON_R_PIO1_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 471 | #define IOCON_R_PIO1_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 472 | #define IOCON_R_PIO1_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 473 | #define IOCON_R_PIO1_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 474 | #define IOCON_R_PIO1_2_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 475 | #define IOCON_R_PIO1_2_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 476 | |
mbed_official | 41:e8b66477f5bf | 477 | /* IOCON_PIO3_0, address 0x4004 4084 */ |
mbed_official | 41:e8b66477f5bf | 478 | #define IOCON_PIO3_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 479 | #define IOCON_PIO3_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 480 | #define IOCON_PIO3_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 481 | #define IOCON_PIO3_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 482 | #define IOCON_PIO3_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 483 | #define IOCON_PIO3_0_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 484 | |
mbed_official | 41:e8b66477f5bf | 485 | /* IOCON_PIO3_1, address 0x4004 4088 */ |
mbed_official | 41:e8b66477f5bf | 486 | #define IOCON_PIO3_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 487 | #define IOCON_PIO3_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 488 | #define IOCON_PIO3_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 489 | #define IOCON_PIO3_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 490 | #define IOCON_PIO3_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 491 | #define IOCON_PIO3_1_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 492 | |
mbed_official | 41:e8b66477f5bf | 493 | /* IOCON_PIO2_3, address 0x4004 408C */ |
mbed_official | 41:e8b66477f5bf | 494 | #define IOCON_PIO2_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 495 | #define IOCON_PIO2_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 496 | #define IOCON_PIO2_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 497 | #define IOCON_PIO2_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 498 | #define IOCON_PIO2_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 499 | #define IOCON_PIO2_3_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 500 | |
mbed_official | 41:e8b66477f5bf | 501 | /* IOCON_SWDIO_PIO1_3, address 0x4004 4090 */ |
mbed_official | 41:e8b66477f5bf | 502 | #define IOCON_SWDIO_PIO1_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 503 | #define IOCON_SWDIO_PIO1_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 504 | #define IOCON_SWDIO_PIO1_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 505 | #define IOCON_SWDIO_PIO1_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 506 | #define IOCON_SWDIO_PIO1_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 507 | #define IOCON_SWDIO_PIO1_3_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 508 | #define IOCON_SWDIO_PIO1_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 509 | |
mbed_official | 41:e8b66477f5bf | 510 | /* IOCON_PIO1_4, address 0x4004 4094 */ |
mbed_official | 41:e8b66477f5bf | 511 | #define IOCON_PIO1_4_FUNC_MASK 0x0007 // Selects pin function. This pin functions as WAKEUP pin if the 000 LPC111x/LPC11Cxx is in Deep power-down mode regardless of the value of FUNC. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 512 | #define IOCON_PIO1_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 513 | #define IOCON_PIO1_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 514 | #define IOCON_PIO1_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 515 | #define IOCON_PIO1_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 516 | #define IOCON_PIO1_4_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 517 | #define IOCON_PIO1_4_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 518 | |
mbed_official | 41:e8b66477f5bf | 519 | /* IOCON_PIO1_11, address 0x4004 4098 */ |
mbed_official | 41:e8b66477f5bf | 520 | #define IOCON_PIO1_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 521 | #define IOCON_PIO1_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 522 | #define IOCON_PIO1_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 523 | #define IOCON_PIO1_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 524 | #define IOCON_PIO1_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 525 | #define IOCON_PIO1_11_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 526 | #define IOCON_PIO1_11_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 527 | |
mbed_official | 41:e8b66477f5bf | 528 | /* IOCON_PIO3_2, address 0x4004 409C */ |
mbed_official | 41:e8b66477f5bf | 529 | #define IOCON_PIO3_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 530 | #define IOCON_PIO3_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 531 | #define IOCON_PIO3_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 532 | #define IOCON_PIO3_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 533 | #define IOCON_PIO3_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 534 | #define IOCON_PIO3_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 535 | |
mbed_official | 41:e8b66477f5bf | 536 | /* IOCON_PIO1_5, address 0x4004 40A0 */ |
mbed_official | 41:e8b66477f5bf | 537 | #define IOCON_PIO1_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 538 | #define IOCON_PIO1_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 539 | #define IOCON_PIO1_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 540 | #define IOCON_PIO1_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 541 | #define IOCON_PIO1_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 542 | #define IOCON_PIO1_5_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 543 | |
mbed_official | 41:e8b66477f5bf | 544 | /* IOCON_PIO1_6, address 0x4004 40A4 */ |
mbed_official | 41:e8b66477f5bf | 545 | #define IOCON_PIO1_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 546 | #define IOCON_PIO1_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 547 | #define IOCON_PIO1_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 548 | #define IOCON_PIO1_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 549 | #define IOCON_PIO1_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 550 | #define IOCON_PIO1_6_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 551 | |
mbed_official | 41:e8b66477f5bf | 552 | /* IOCON_PIO1_7, address 0x4004 40A8 */ |
mbed_official | 41:e8b66477f5bf | 553 | #define IOCON_PIO1_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 554 | #define IOCON_PIO1_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 555 | #define IOCON_PIO1_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 556 | #define IOCON_PIO1_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 557 | #define IOCON_PIO1_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 558 | #define IOCON_PIO1_7_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 559 | |
mbed_official | 41:e8b66477f5bf | 560 | /* IOCON_PIO3_3, address 0x4004 40AC */ |
mbed_official | 41:e8b66477f5bf | 561 | #define IOCON_PIO3_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 562 | #define IOCON_PIO3_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 563 | #define IOCON_PIO3_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 564 | #define IOCON_PIO3_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 565 | #define IOCON_PIO3_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 566 | #define IOCON_PIO3_3_OD (1 << 10) // Selects pseudo open-drain mode. See Section 7.1 for part specific details. |
mbed_official | 41:e8b66477f5bf | 567 | |
mbed_official | 41:e8b66477f5bf | 568 | /* IOCON_SCK_LOC, address 0x4004 40B0 */ |
mbed_official | 41:e8b66477f5bf | 569 | #define IOCON_SCK_LOC_SCKLOC_MASK 0x0003 // Selects pin location for SCK0 function. |
mbed_official | 41:e8b66477f5bf | 570 | #define IOCON_SCK_LOC_SCKLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 571 | |
mbed_official | 41:e8b66477f5bf | 572 | /* IOCON_DSR_LOC, address 0x4004 40B4 */ |
mbed_official | 41:e8b66477f5bf | 573 | #define IOCON_DSR_LOC_DSRLOC_MASK 0x0003 // elects pin location for DSR function. |
mbed_official | 41:e8b66477f5bf | 574 | #define IOCON_DSR_LOC_DSRLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 575 | |
mbed_official | 41:e8b66477f5bf | 576 | /* IOCON_DCD_LOC, address 0x4004 40B8 */ |
mbed_official | 41:e8b66477f5bf | 577 | #define IOCON_DCD_LOC_DCDLOC_MASK 0x0003 // Selects pin location for DCD function. |
mbed_official | 41:e8b66477f5bf | 578 | #define IOCON_DCD_LOC_DCDLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 579 | |
mbed_official | 41:e8b66477f5bf | 580 | /* IOCON_RI_LOC, address 0x4004 40BC */ |
mbed_official | 41:e8b66477f5bf | 581 | #define IOCON_RI_LOC_RILOC_MASK 0x0003 // Selects pin location for RI function. |
mbed_official | 41:e8b66477f5bf | 582 | #define IOCON_RI_LOC_RILOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 583 | |
mbed_official | 41:e8b66477f5bf | 584 | /* IOCON_PIO2_6, address 0x4004 4000 */ |
mbed_official | 41:e8b66477f5bf | 585 | #define IOCON_PIO2_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 586 | #define IOCON_PIO2_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 587 | #define IOCON_PIO2_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 588 | #define IOCON_PIO2_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 589 | #define IOCON_PIO2_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 590 | #define IOCON_PIO2_6_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 591 | |
mbed_official | 41:e8b66477f5bf | 592 | /* IOCON_PIO2_0, address 0x4004 4008 */ |
mbed_official | 41:e8b66477f5bf | 593 | #define IOCON_PIO2_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 594 | #define IOCON_PIO2_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 595 | #define IOCON_PIO2_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 596 | #define IOCON_PIO2_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 597 | #define IOCON_PIO2_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 598 | #define IOCON_PIO2_0_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 599 | |
mbed_official | 41:e8b66477f5bf | 600 | /* IOCON_RESET_PIO0_0, address 0x4004 400C */ |
mbed_official | 41:e8b66477f5bf | 601 | #define IOCON_RESET_PIO0_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 602 | #define IOCON_RESET_PIO0_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 603 | #define IOCON_RESET_PIO0_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 604 | #define IOCON_RESET_PIO0_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 605 | #define IOCON_RESET_PIO0_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 606 | #define IOCON_RESET_PIO0_0_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 607 | |
mbed_official | 41:e8b66477f5bf | 608 | /* IOCON_PIO0_1, address 0x4004 4010 */ |
mbed_official | 41:e8b66477f5bf | 609 | #define IOCON_PIO0_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 610 | #define IOCON_PIO0_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 611 | #define IOCON_PIO0_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 612 | #define IOCON_PIO0_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 613 | #define IOCON_PIO0_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 614 | #define IOCON_PIO0_1_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 615 | |
mbed_official | 41:e8b66477f5bf | 616 | /* IOCON_PIO1_8, address 0x4004 4014 */ |
mbed_official | 41:e8b66477f5bf | 617 | #define IOCON_PIO1_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 618 | #define IOCON_PIO1_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 619 | #define IOCON_PIO1_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 620 | #define IOCON_PIO1_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 621 | #define IOCON_PIO1_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 622 | #define IOCON_PIO1_8_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 623 | |
mbed_official | 41:e8b66477f5bf | 624 | /* IOCON_PIO0_2, address 0x4004 401C */ |
mbed_official | 41:e8b66477f5bf | 625 | #define IOCON_PIO0_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 626 | #define IOCON_PIO0_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 627 | #define IOCON_PIO0_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 628 | #define IOCON_PIO0_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 629 | #define IOCON_PIO0_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 630 | #define IOCON_PIO0_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 631 | |
mbed_official | 41:e8b66477f5bf | 632 | /* IOCON_PIO2_7, address 0x4004 4020 */ |
mbed_official | 41:e8b66477f5bf | 633 | #define IOCON_PIO2_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 634 | #define IOCON_PIO2_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 635 | #define IOCON_PIO2_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 636 | #define IOCON_PIO2_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 637 | #define IOCON_PIO2_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 638 | #define IOCON_PIO2_7_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 639 | |
mbed_official | 41:e8b66477f5bf | 640 | /* IOCON_PIO2_8, address 0x4004 4024 */ |
mbed_official | 41:e8b66477f5bf | 641 | #define IOCON_PIO2_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 642 | #define IOCON_PIO2_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 643 | #define IOCON_PIO2_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 644 | #define IOCON_PIO2_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 645 | #define IOCON_PIO2_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 646 | #define IOCON_PIO2_8_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 647 | |
mbed_official | 41:e8b66477f5bf | 648 | /* IOCON_PIO2_1, address 0x4004 4028 */ |
mbed_official | 41:e8b66477f5bf | 649 | #define IOCON_PIO2_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 650 | #define IOCON_PIO2_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 651 | #define IOCON_PIO2_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 652 | #define IOCON_PIO2_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 653 | #define IOCON_PIO2_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 654 | #define IOCON_PIO2_1_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 655 | |
mbed_official | 41:e8b66477f5bf | 656 | /* IOCON_PIO0_3, address 0x4004 402C */ |
mbed_official | 41:e8b66477f5bf | 657 | #define IOCON_PIO0_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 658 | #define IOCON_PIO0_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 659 | #define IOCON_PIO0_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 660 | #define IOCON_PIO0_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 661 | #define IOCON_PIO0_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 662 | #define IOCON_PIO0_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 663 | |
mbed_official | 41:e8b66477f5bf | 664 | /* IOCON_PIO0_4, address 0x4004 4030 */ |
mbed_official | 41:e8b66477f5bf | 665 | #define IOCON_PIO0_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 666 | #define IOCON_PIO0_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 667 | #define IOCON_PIO0_4_I2CMODE_MASK 0x0300 // Selects I2C mode. Select Standard mode (I2CMODE = 00, 00 default) or Standard I/O functionality (I2CMODE = 01) if the pin function is GPIO (FUNC = 000). |
mbed_official | 41:e8b66477f5bf | 668 | #define IOCON_PIO0_4_I2CMODE_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 669 | |
mbed_official | 41:e8b66477f5bf | 670 | /* IOCON_PIO0_5, address 0x4004 4034 */ |
mbed_official | 41:e8b66477f5bf | 671 | #define IOCON_PIO0_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 672 | #define IOCON_PIO0_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 673 | #define IOCON_PIO0_5_I2CMODE_MASK 0x0300 // Selects I2C mode. Select Standard mode (I2CMODE = 00, default) or Standard I/O functionality (I2CMODE = 01) if the pin function is GPIO (FUNC = 000). |
mbed_official | 41:e8b66477f5bf | 674 | #define IOCON_PIO0_5_I2CMODE_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 675 | |
mbed_official | 41:e8b66477f5bf | 676 | /* IOCON_PIO1_9, address 0x4004 4038 */ |
mbed_official | 41:e8b66477f5bf | 677 | #define IOCON_PIO1_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 678 | #define IOCON_PIO1_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 679 | #define IOCON_PIO1_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 680 | #define IOCON_PIO1_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 681 | #define IOCON_PIO1_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 682 | #define IOCON_PIO1_9_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 683 | |
mbed_official | 41:e8b66477f5bf | 684 | /* IOCON_PIO3_4, address 0x4004 403C */ |
mbed_official | 41:e8b66477f5bf | 685 | #define IOCON_PIO3_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 686 | #define IOCON_PIO3_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 687 | #define IOCON_PIO3_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 688 | #define IOCON_PIO3_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 689 | #define IOCON_PIO3_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 690 | #define IOCON_PIO3_4_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 691 | |
mbed_official | 41:e8b66477f5bf | 692 | /* IOCON_PIO2_4, address 0x4004 4040 */ |
mbed_official | 41:e8b66477f5bf | 693 | #define IOCON_PIO2_4_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 694 | #define IOCON_PIO2_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 695 | #define IOCON_PIO2_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 696 | #define IOCON_PIO2_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 697 | #define IOCON_PIO2_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 698 | #define IOCON_PIO2_4_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 699 | |
mbed_official | 41:e8b66477f5bf | 700 | /* IOCON_PIO2_5, address 0x4004 4044 */ |
mbed_official | 41:e8b66477f5bf | 701 | #define IOCON_PIO2_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 702 | #define IOCON_PIO2_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 703 | #define IOCON_PIO2_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 704 | #define IOCON_PIO2_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 705 | #define IOCON_PIO2_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 706 | #define IOCON_PIO2_5_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 707 | |
mbed_official | 41:e8b66477f5bf | 708 | /* IOCON_PIO3_5, address 0x4004 4048 */ |
mbed_official | 41:e8b66477f5bf | 709 | #define IOCON_PIO3_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 710 | #define IOCON_PIO3_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 711 | #define IOCON_PIO3_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 712 | #define IOCON_PIO3_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 713 | #define IOCON_PIO3_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 714 | #define IOCON_PIO3_5_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 715 | |
mbed_official | 41:e8b66477f5bf | 716 | /* IOCON_PIO0_6, address 0x4004 404C */ |
mbed_official | 41:e8b66477f5bf | 717 | #define IOCON_PIO0_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 718 | #define IOCON_PIO0_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 719 | #define IOCON_PIO0_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 720 | #define IOCON_PIO0_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 721 | #define IOCON_PIO0_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 722 | #define IOCON_PIO0_6_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 723 | |
mbed_official | 41:e8b66477f5bf | 724 | /* IOCON_PIO0_7, address 0x4004 4050 */ |
mbed_official | 41:e8b66477f5bf | 725 | #define IOCON_PIO0_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 726 | #define IOCON_PIO0_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 727 | #define IOCON_PIO0_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 728 | #define IOCON_PIO0_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 729 | #define IOCON_PIO0_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 730 | #define IOCON_PIO0_7_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 731 | |
mbed_official | 41:e8b66477f5bf | 732 | /* IOCON_PIO2_9, address 0x4004 4054 */ |
mbed_official | 41:e8b66477f5bf | 733 | #define IOCON_PIO2_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 734 | #define IOCON_PIO2_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 735 | #define IOCON_PIO2_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 736 | #define IOCON_PIO2_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 737 | #define IOCON_PIO2_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 738 | #define IOCON_PIO2_9_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 739 | |
mbed_official | 41:e8b66477f5bf | 740 | /* IOCON_PIO2_10, address 0x4004 4058 */ |
mbed_official | 41:e8b66477f5bf | 741 | #define IOCON_PIO2_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 742 | #define IOCON_PIO2_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 743 | #define IOCON_PIO2_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 744 | #define IOCON_PIO2_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 745 | #define IOCON_PIO2_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 746 | #define IOCON_PIO2_10_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 747 | |
mbed_official | 41:e8b66477f5bf | 748 | /* IOCON_PIO2_2, address 0x4004 405C */ |
mbed_official | 41:e8b66477f5bf | 749 | #define IOCON_PIO2_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 750 | #define IOCON_PIO2_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 751 | #define IOCON_PIO2_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 752 | #define IOCON_PIO2_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 753 | #define IOCON_PIO2_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 754 | #define IOCON_PIO2_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 755 | |
mbed_official | 41:e8b66477f5bf | 756 | /* IOCON_PIO0_8, address 0x4004 4060 */ |
mbed_official | 41:e8b66477f5bf | 757 | #define IOCON_PIO0_8_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 758 | #define IOCON_PIO0_8_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 759 | #define IOCON_PIO0_8_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 760 | #define IOCON_PIO0_8_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 761 | #define IOCON_PIO0_8_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 762 | #define IOCON_PIO0_8_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 763 | |
mbed_official | 41:e8b66477f5bf | 764 | /* IOCON_PIO0_9, address 0x4004 4064 */ |
mbed_official | 41:e8b66477f5bf | 765 | #define IOCON_PIO0_9_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 766 | #define IOCON_PIO0_9_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 767 | #define IOCON_PIO0_9_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 768 | #define IOCON_PIO0_9_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 769 | #define IOCON_PIO0_9_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 770 | #define IOCON_PIO0_9_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 771 | |
mbed_official | 41:e8b66477f5bf | 772 | /* IOCON_SWCLK_PIO0_10, address 0x4004 4068 */ |
mbed_official | 41:e8b66477f5bf | 773 | #define IOCON_SWCLK_PIO0_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 774 | #define IOCON_SWCLK_PIO0_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 775 | #define IOCON_SWCLK_PIO0_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 776 | #define IOCON_SWCLK_PIO0_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 777 | #define IOCON_SWCLK_PIO0_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 778 | #define IOCON_SWCLK_PIO0_10_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 779 | |
mbed_official | 41:e8b66477f5bf | 780 | /* IOCON_PIO1_10, address 0x4004 406C */ |
mbed_official | 41:e8b66477f5bf | 781 | #define IOCON_PIO1_10_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 782 | #define IOCON_PIO1_10_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 783 | #define IOCON_PIO1_10_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 784 | #define IOCON_PIO1_10_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 785 | #define IOCON_PIO1_10_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 786 | #define IOCON_PIO1_10_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 787 | #define IOCON_PIO1_10_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 788 | |
mbed_official | 41:e8b66477f5bf | 789 | /* IOCON_PIO2_11, address 0x4004 4070 */ |
mbed_official | 41:e8b66477f5bf | 790 | #define IOCON_PIO2_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 791 | #define IOCON_PIO2_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 792 | #define IOCON_PIO2_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 793 | #define IOCON_PIO2_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 794 | #define IOCON_PIO2_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 795 | #define IOCON_PIO2_11_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 796 | |
mbed_official | 41:e8b66477f5bf | 797 | /* IOCON_R_PIO0_11, address 0x4004 4074 */ |
mbed_official | 41:e8b66477f5bf | 798 | #define IOCON_R_PIO0_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 799 | #define IOCON_R_PIO0_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 800 | #define IOCON_R_PIO0_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 801 | #define IOCON_R_PIO0_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 802 | #define IOCON_R_PIO0_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 803 | #define IOCON_R_PIO0_11_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 804 | #define IOCON_R_PIO0_11_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 805 | |
mbed_official | 41:e8b66477f5bf | 806 | /* IOCON_R_PIO1_0, address 0x4004 4078 */ |
mbed_official | 41:e8b66477f5bf | 807 | #define IOCON_R_PIO1_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 808 | #define IOCON_R_PIO1_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 809 | #define IOCON_R_PIO1_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 810 | #define IOCON_R_PIO1_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 811 | #define IOCON_R_PIO1_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 812 | #define IOCON_R_PIO1_0_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 813 | #define IOCON_R_PIO1_0_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 814 | |
mbed_official | 41:e8b66477f5bf | 815 | /* IOCON_R_PIO1_1, address 0x4004 407C */ |
mbed_official | 41:e8b66477f5bf | 816 | #define IOCON_R_PIO1_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 817 | #define IOCON_R_PIO1_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 818 | #define IOCON_R_PIO1_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 819 | #define IOCON_R_PIO1_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 820 | #define IOCON_R_PIO1_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 821 | #define IOCON_R_PIO1_1_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 822 | #define IOCON_R_PIO1_1_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 823 | |
mbed_official | 41:e8b66477f5bf | 824 | /* IOCON_R_PIO1_2, address 0x4004 4080 */ |
mbed_official | 41:e8b66477f5bf | 825 | #define IOCON_R_PIO1_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 826 | #define IOCON_R_PIO1_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 827 | #define IOCON_R_PIO1_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 828 | #define IOCON_R_PIO1_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 829 | #define IOCON_R_PIO1_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 830 | #define IOCON_R_PIO1_2_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 831 | #define IOCON_R_PIO1_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 832 | |
mbed_official | 41:e8b66477f5bf | 833 | /* IOCON_PIO3_0, address 0x4004 4084 */ |
mbed_official | 41:e8b66477f5bf | 834 | #define IOCON_PIO3_0_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 835 | #define IOCON_PIO3_0_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 836 | #define IOCON_PIO3_0_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 837 | #define IOCON_PIO3_0_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 838 | #define IOCON_PIO3_0_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 839 | #define IOCON_PIO3_0_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 840 | |
mbed_official | 41:e8b66477f5bf | 841 | /* IOCON_PIO3_1, address 0x4004 4088 */ |
mbed_official | 41:e8b66477f5bf | 842 | #define IOCON_PIO3_1_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 843 | #define IOCON_PIO3_1_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 844 | #define IOCON_PIO3_1_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 845 | #define IOCON_PIO3_1_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 846 | #define IOCON_PIO3_1_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 847 | #define IOCON_PIO3_1_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 848 | |
mbed_official | 41:e8b66477f5bf | 849 | /* IOCON_PIO2_3, address 0x4004 408C */ |
mbed_official | 41:e8b66477f5bf | 850 | #define IOCON_PIO2_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 851 | #define IOCON_PIO2_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 852 | #define IOCON_PIO2_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 853 | #define IOCON_PIO2_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 854 | #define IOCON_PIO2_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 855 | #define IOCON_PIO2_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 856 | |
mbed_official | 41:e8b66477f5bf | 857 | /* IOCON_SWDIO_PIO1_3, address 0x4004 4090 */ |
mbed_official | 41:e8b66477f5bf | 858 | #define IOCON_SWDIO_PIO1_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 859 | #define IOCON_SWDIO_PIO1_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 860 | #define IOCON_SWDIO_PIO1_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 861 | #define IOCON_SWDIO_PIO1_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 862 | #define IOCON_SWDIO_PIO1_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 863 | #define IOCON_SWDIO_PIO1_3_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 864 | #define IOCON_SWDIO_PIO1_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 865 | |
mbed_official | 41:e8b66477f5bf | 866 | /* IOCON_PIO1_4, address 0x4004 4094 */ |
mbed_official | 41:e8b66477f5bf | 867 | #define IOCON_PIO1_4_FUNC_MASK 0x0007 // Selects pin function. This pin functions as WAKEUP pin if the 000 LPC111x/LPC11Cxx is in Deep power-down mode regardless of the value of FUNC. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 868 | #define IOCON_PIO1_4_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 869 | #define IOCON_PIO1_4_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 870 | #define IOCON_PIO1_4_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 871 | #define IOCON_PIO1_4_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 872 | #define IOCON_PIO1_4_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 873 | #define IOCON_PIO1_4_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 874 | |
mbed_official | 41:e8b66477f5bf | 875 | /* IOCON_PIO1_11, address 0x4004 4098 */ |
mbed_official | 41:e8b66477f5bf | 876 | #define IOCON_PIO1_11_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 877 | #define IOCON_PIO1_11_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 878 | #define IOCON_PIO1_11_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 879 | #define IOCON_PIO1_11_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 880 | #define IOCON_PIO1_11_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 881 | #define IOCON_PIO1_11_ADMODE (1 << 7) // Selects Analog/Digital mode |
mbed_official | 41:e8b66477f5bf | 882 | #define IOCON_PIO1_11_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 883 | |
mbed_official | 41:e8b66477f5bf | 884 | /* IOCON_PIO3_2, address 0x4004 409C */ |
mbed_official | 41:e8b66477f5bf | 885 | #define IOCON_PIO3_2_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 886 | #define IOCON_PIO3_2_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 887 | #define IOCON_PIO3_2_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 888 | #define IOCON_PIO3_2_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 889 | #define IOCON_PIO3_2_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 890 | #define IOCON_PIO3_2_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 891 | |
mbed_official | 41:e8b66477f5bf | 892 | /* IOCON_PIO1_5, address 0x4004 40A0 */ |
mbed_official | 41:e8b66477f5bf | 893 | #define IOCON_PIO1_5_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 894 | #define IOCON_PIO1_5_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 895 | #define IOCON_PIO1_5_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 896 | #define IOCON_PIO1_5_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 897 | #define IOCON_PIO1_5_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 898 | #define IOCON_PIO1_5_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 899 | |
mbed_official | 41:e8b66477f5bf | 900 | /* IOCON_PIO1_6, address 0x4004 40A4 */ |
mbed_official | 41:e8b66477f5bf | 901 | #define IOCON_PIO1_6_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 902 | #define IOCON_PIO1_6_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 903 | #define IOCON_PIO1_6_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 904 | #define IOCON_PIO1_6_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 905 | #define IOCON_PIO1_6_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 906 | #define IOCON_PIO1_6_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 907 | |
mbed_official | 41:e8b66477f5bf | 908 | /* IOCON_PIO1_7, address 0x4004 40A8 */ |
mbed_official | 41:e8b66477f5bf | 909 | #define IOCON_PIO1_7_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 910 | #define IOCON_PIO1_7_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 911 | #define IOCON_PIO1_7_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 912 | #define IOCON_PIO1_7_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 913 | #define IOCON_PIO1_7_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 914 | #define IOCON_PIO1_7_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 915 | |
mbed_official | 41:e8b66477f5bf | 916 | /* IOCON_PIO3_3, address 0x4004 40AC */ |
mbed_official | 41:e8b66477f5bf | 917 | #define IOCON_PIO3_3_FUNC_MASK 0x0007 // Selects pin function. All other values are reserved. |
mbed_official | 41:e8b66477f5bf | 918 | #define IOCON_PIO3_3_FUNC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 919 | #define IOCON_PIO3_3_MODE_MASK 0x0018 // Selects function mode (on-chip pull-up/pull-down resistor control). |
mbed_official | 41:e8b66477f5bf | 920 | #define IOCON_PIO3_3_MODE_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 921 | #define IOCON_PIO3_3_HYS (1 << 5) // Hysteresis. |
mbed_official | 41:e8b66477f5bf | 922 | #define IOCON_PIO3_3_OD (1 << 10) // Selects pseudo open-drain mode. |
mbed_official | 41:e8b66477f5bf | 923 | |
mbed_official | 41:e8b66477f5bf | 924 | /* IOCON_SCK0_LOC, address 0x4004 40B0 */ |
mbed_official | 41:e8b66477f5bf | 925 | #define IOCON_SCK0_LOC_SCKLOC_MASK 0x0003 // Selects pin location for SCK0 function. |
mbed_official | 41:e8b66477f5bf | 926 | #define IOCON_SCK0_LOC_SCKLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 927 | |
mbed_official | 41:e8b66477f5bf | 928 | /* IOCON_DSR_LOC, address 0x4004 40B4 */ |
mbed_official | 41:e8b66477f5bf | 929 | #define IOCON_DSR_LOC_DSRLOC_MASK 0x0003 // elects pin location for DSR function. |
mbed_official | 41:e8b66477f5bf | 930 | #define IOCON_DSR_LOC_DSRLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 931 | |
mbed_official | 41:e8b66477f5bf | 932 | /* IOCON_DCD_LOC, address 0x4004 40B8 */ |
mbed_official | 41:e8b66477f5bf | 933 | #define IOCON_DCD_LOC_DCDLOC_MASK 0x0003 // Selects pin location for DCD function. |
mbed_official | 41:e8b66477f5bf | 934 | #define IOCON_DCD_LOC_DCDLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 935 | |
mbed_official | 41:e8b66477f5bf | 936 | /* IOCON_RI_LOC, address 0x4004 40BC */ |
mbed_official | 41:e8b66477f5bf | 937 | #define IOCON_RI_LOC_RILOC_MASK 0x0003 // Selects pin location for RI function. |
mbed_official | 41:e8b66477f5bf | 938 | #define IOCON_RI_LOC_RILOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 939 | |
mbed_official | 41:e8b66477f5bf | 940 | /* IOCON_SSEL1_LOC, address 0x4004 4018 */ |
mbed_official | 41:e8b66477f5bf | 941 | #define IOCON_SSEL1_LOC_SSEL1LOC_MASK 0x0003 // Selects pin location for SSEL1 function. |
mbed_official | 41:e8b66477f5bf | 942 | #define IOCON_SSEL1_LOC_SSEL1LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 943 | |
mbed_official | 41:e8b66477f5bf | 944 | /* IOCON_CT16B0_CAP0_LOC, address 0x4004 40C0 */ |
mbed_official | 41:e8b66477f5bf | 945 | #define IOCON_CT16B0_CAP0_LOC_CT16B0_CAP0LOC_MASK 0x0003 // Selects pin location for CT16B0_CAP0 function. |
mbed_official | 41:e8b66477f5bf | 946 | #define IOCON_CT16B0_CAP0_LOC_CT16B0_CAP0LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 947 | |
mbed_official | 41:e8b66477f5bf | 948 | /* IOCON_SCK1_LOC, address 0x4004 40C4 */ |
mbed_official | 41:e8b66477f5bf | 949 | #define IOCON_SCK1_LOC_SCK1LOC_MASK 0x0003 // Selects pin location for SCK1 function. |
mbed_official | 41:e8b66477f5bf | 950 | #define IOCON_SCK1_LOC_SCK1LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 951 | |
mbed_official | 41:e8b66477f5bf | 952 | /* IOCON_MISO1_LOC, address 0x4004 40C8 */ |
mbed_official | 41:e8b66477f5bf | 953 | #define IOCON_MISO1_LOC_MISO1LOC_MASK 0x0003 // Selects pin location for the MISO1 function. |
mbed_official | 41:e8b66477f5bf | 954 | #define IOCON_MISO1_LOC_MISO1LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 955 | |
mbed_official | 41:e8b66477f5bf | 956 | /* IOCON_MOSI1_LOC, address 0x4004 40CC */ |
mbed_official | 41:e8b66477f5bf | 957 | #define IOCON_MOSI1_LOC_MOSI1LOC_MASK 0x0003 // Selects pin location for the MOSI1 function. |
mbed_official | 41:e8b66477f5bf | 958 | #define IOCON_MOSI1_LOC_MOSI1LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 959 | |
mbed_official | 41:e8b66477f5bf | 960 | /* IOCON_CT32B0_CAP0_LOC, address 0x4004 40D0 */ |
mbed_official | 41:e8b66477f5bf | 961 | #define IOCON_CT32B0_CAP0_LOC_CT32B0_CAP0LOC_MASK 0x0003 // Selects pin location for the CT32B0_CAP0 function. |
mbed_official | 41:e8b66477f5bf | 962 | #define IOCON_CT32B0_CAP0_LOC_CT32B0_CAP0LOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 963 | |
mbed_official | 41:e8b66477f5bf | 964 | /* IOCON_RXD_LOC, address 0x4004 40D4 */ |
mbed_official | 41:e8b66477f5bf | 965 | #define IOCON_RXD_LOC_RXDLOC_MASK 0x0003 // Selects pin location for the RXD function. |
mbed_official | 41:e8b66477f5bf | 966 | #define IOCON_RXD_LOC_RXDLOC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 967 | |
mbed_official | 41:e8b66477f5bf | 968 | /* GPIO0DIR, address 0x5000 8000 to GPIO3DIR, address 0x5003 8000 */ |
mbed_official | 41:e8b66477f5bf | 969 | #define GPIO0DIR_IO_MASK 0x0FFF // Selects pin x as input or output (x = 0 to 11). 0 = Pin PIOn_x is configured as input. 1 = Pin PIOn_x is configured as output. |
mbed_official | 41:e8b66477f5bf | 970 | #define GPIO0DIR_IO_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 971 | |
mbed_official | 41:e8b66477f5bf | 972 | /* GPIO0IS, address 0x5000 8004 to GPIO3IS, address 0x5003 8004 */ |
mbed_official | 41:e8b66477f5bf | 973 | #define GPIO0IS_ISENSE_MASK 0x0FFF // Selects interrupt on pin x as level or edge sensitive (x = 0 to 0x00 11). 0 = Interrupt on pin PIOn_x is configured as edge sensitive. 1 = Interrupt on pin PIOn_x is configured as level sensitive. |
mbed_official | 41:e8b66477f5bf | 974 | #define GPIO0IS_ISENSE_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 975 | |
mbed_official | 41:e8b66477f5bf | 976 | /* GPIO0IBE, address 0x5000 8008 to GPIO3IBE, address 0x5003 8008 */ |
mbed_official | 41:e8b66477f5bf | 977 | #define GPIO0IBE_IBE_MASK 0x0FFF // Selects interrupt on pin x to be triggered on both edges (x = 0 0x00 to 11). 0 = Interrupt on pin PIOn_x is controlled through register GPIOnIEV. 1 = Both edges on pin PIOn_x trigger an interrupt. |
mbed_official | 41:e8b66477f5bf | 978 | #define GPIO0IBE_IBE_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 979 | |
mbed_official | 41:e8b66477f5bf | 980 | /* GPIO0IEV, address 0x5000 800C to GPIO3IEV, address 0x5003 800C */ |
mbed_official | 41:e8b66477f5bf | 981 | #define GPIO0IEV_IEV_MASK 0x0FFF // Selects interrupt on pin x to be triggered rising or falling edges (x = 0 to 11). 0 = Depending on setting in register GPIOnIS (see Table 175), falling edges or LOW level on pin PIOn_x trigger an interrupt. 1 = Depending on setting in register GPIOnIS (see Table 175), rising edges or HIGH level on pin PIOn_x trigger an interrupt. |
mbed_official | 41:e8b66477f5bf | 982 | #define GPIO0IEV_IEV_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 983 | |
mbed_official | 41:e8b66477f5bf | 984 | /* GPIO0IE, address 0x5000 8010 to GPIO3IE, address 0x5003 8010 */ |
mbed_official | 41:e8b66477f5bf | 985 | #define GPIO0IE_MASK_MASK 0x0FFF // Selects interrupt on pin x to be masked (x = 0 to 11). 0 = Interrupt on pin PIOn_x is masked. 1 = Interrupt on pin PIOn_x is not masked. |
mbed_official | 41:e8b66477f5bf | 986 | #define GPIO0IE_MASK_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 987 | |
mbed_official | 41:e8b66477f5bf | 988 | /* GPIO0RIS, address 0x5000 8014 to GPIO3RIS, address 0x5003 8014 */ |
mbed_official | 41:e8b66477f5bf | 989 | #define GPIO0RIS_RAWST_MASK 0x0FFF // Raw interrupt status (x = 0 to 11). 0 = No interrupt on pin PIOn_x. 1 = Interrupt requirements met on PIOn_x. |
mbed_official | 41:e8b66477f5bf | 990 | #define GPIO0RIS_RAWST_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 991 | |
mbed_official | 41:e8b66477f5bf | 992 | /* GPIO0MIS, address 0x5000 8018 to GPIO3MIS, address 0x5003 8018 */ |
mbed_official | 41:e8b66477f5bf | 993 | #define GPIO0MIS_MASK_MASK 0x0FFF // Selects interrupt on pin x to be masked (x = 0 to 11). 0 = No interrupt or interrupt masked on pin PIOn_x. 1 = Interrupt on PIOn_x. |
mbed_official | 41:e8b66477f5bf | 994 | #define GPIO0MIS_MASK_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 995 | |
mbed_official | 41:e8b66477f5bf | 996 | /* GPIO0IC, address 0x5000 801C to GPIO3IC, address 0x5003 801C */ |
mbed_official | 41:e8b66477f5bf | 997 | #define GPIO0IC_CLR_MASK 0x0FFF // Selects interrupt on pin x to be cleared (x = 0 to 11). Clears 0x00 the interrupt edge detection logic. This register is write-only. Remark: The synchronizer between the GPIO and the NVIC blocks causes a delay of 2 clocks. It is recommended to add two NOPs after the clear of the interrupt edge detection logic before the exit of the interrupt service routine. 0 = No effect. 1 = Clears edge detection logic for pin PIOn_x. |
mbed_official | 41:e8b66477f5bf | 998 | #define GPIO0IC_CLR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 999 | |
mbed_official | 41:e8b66477f5bf | 1000 | /* U0IIR - address 0x4004 8008, Read Only */ |
mbed_official | 41:e8b66477f5bf | 1001 | #define U0IIR_INTSTATUS (1 << 0) // Interrupt status. Note that U0IIR[0] is active low. The pending interrupt can be determined by evaluating U0IIR[3:1]. |
mbed_official | 41:e8b66477f5bf | 1002 | #define U0IIR_INTID_MASK 0x000E // Interrupt identification. U0IER[3:1] identifies an interrupt 0 corresponding to the UART Rx FIFO. All other combinations of U0IER[3:1] not listed below are reserved (100,101,111). |
mbed_official | 41:e8b66477f5bf | 1003 | #define U0IIR_INTID_SHIFT 1 |
mbed_official | 41:e8b66477f5bf | 1004 | #define U0IIR_FIFOENABLE_MASK 0x00C0 // These bits are equivalent to U0FCR[0]. |
mbed_official | 41:e8b66477f5bf | 1005 | #define U0IIR_FIFOENABLE_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1006 | #define U0IIR_ABEOINT (1 << 8) // End of auto-baud interrupt. True if auto-baud has finished successfully and interrupt is enabled. |
mbed_official | 41:e8b66477f5bf | 1007 | #define U0IIR_ABTOINT (1 << 9) // Auto-baud time-out interrupt. True if auto-baud has timed out and interrupt is enabled. Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1008 | |
mbed_official | 41:e8b66477f5bf | 1009 | /* U0FCR - address 0x4000 8008, Write Only */ |
mbed_official | 41:e8b66477f5bf | 1010 | #define U0FCR_FIFOEN (1 << 0) // FIFO Enable |
mbed_official | 41:e8b66477f5bf | 1011 | #define U0FCR_RXFIFORES (1 << 1) // RX FIFO Reset |
mbed_official | 41:e8b66477f5bf | 1012 | #define U0FCR_TXFIFORES (1 << 2) // TX FIFO Reset |
mbed_official | 41:e8b66477f5bf | 1013 | #define U0FCR_RXTL_MASK 0x00C0 // RX Trigger Level. These two bits determine how many 0 receiver UART FIFO characters must be written before an interrupt is activated. |
mbed_official | 41:e8b66477f5bf | 1014 | #define U0FCR_RXTL_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1015 | |
mbed_official | 41:e8b66477f5bf | 1016 | /* U0LCR - address 0x4000 800C */ |
mbed_official | 41:e8b66477f5bf | 1017 | #define U0LCR_WLS_MASK 0x0003 // Word Length Select |
mbed_official | 41:e8b66477f5bf | 1018 | #define U0LCR_WLS_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1019 | #define U0LCR_SBS (1 << 2) // Stop Bit Select |
mbed_official | 41:e8b66477f5bf | 1020 | #define U0LCR_PE (1 << 3) // Parity Enable |
mbed_official | 41:e8b66477f5bf | 1021 | #define U0LCR_PS_MASK 0x0030 // Parity Select 0x0 Odd parity. Number of 1s in the transmitted character and the attached parity bit will be odd. 0x1 Even Parity. Number of 1s in the transmitted character and the attached parity bit will be even. 0x2 Forced 1 stick parity. 0x3 Forced 0 stick parity. |
mbed_official | 41:e8b66477f5bf | 1022 | #define U0LCR_PS_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1023 | #define U0LCR_BC (1 << 6) // Break Control |
mbed_official | 41:e8b66477f5bf | 1024 | #define U0LCR_DLAB (1 << 7) // Divisor Latch Access Bit |
mbed_official | 41:e8b66477f5bf | 1025 | |
mbed_official | 41:e8b66477f5bf | 1026 | /* U0MCR - address 0x4000 8010 */ |
mbed_official | 41:e8b66477f5bf | 1027 | #define U0MCR_DTRC (1 << 0) // DTR Control. Source for modem output pin, DTR. This bit reads as 0 when modem loopback mode is active. |
mbed_official | 41:e8b66477f5bf | 1028 | #define U0MCR_RTSC (1 << 1) // RTS Control. Source for modem output pin RTS. This bit reads as 0 0 when modem loopback mode is active. |
mbed_official | 41:e8b66477f5bf | 1029 | #define U0MCR_LMS (1 << 4) // Loopback Mode Select. The modem loopback mode provides a 0 mechanism to perform diagnostic loopback testing. Serial data from the transmitter is connected internally to serial input of the receiver. Input pin, RXD, has no effect on loopback and output pin, TXD is held in marking state. The four modem inputs (CTS, DSR, RI and DCD) are disconnected externally. Externally, the modem outputs (RTS, DTR) are set inactive. Internally, the four modem outputs are connected to the four modem inputs. As a result of these connections, the upper four bits of the U0MSR will be driven by the lower four bits of the U0MCR rather than the four modem inputs in normal mode. This permits modem status interrupts to be generated in loopback mode by writing the lower four bits of U0MCR. |
mbed_official | 41:e8b66477f5bf | 1030 | #define U0MCR_RTSEN (1 << 6) // RTS flow control |
mbed_official | 41:e8b66477f5bf | 1031 | #define U0MCR_CTSEN (1 << 7) // CTS flow control |
mbed_official | 41:e8b66477f5bf | 1032 | |
mbed_official | 41:e8b66477f5bf | 1033 | /* U0LSR - address 0x4000 8014, Read Only */ |
mbed_official | 41:e8b66477f5bf | 1034 | #define U0LSR_RDR (1 << 0) // Receiver Data Ready. U0LSR[0] is set when the U0RBR holds 0 an unread character and is cleared when the UART RBR FIFO is empty. |
mbed_official | 41:e8b66477f5bf | 1035 | #define U0LSR_OE (1 << 1) // Overrun Error. The overrun error condition is set as soon as it 0 occurs. A U0LSR read clears U0LSR[1]. U0LSR[1] is set when UART RSR has a new character assembled and the UART RBR FIFO is full. In this case, the UART RBR FIFO will not be overwritten and the character in the UART RSR will be lost. |
mbed_official | 41:e8b66477f5bf | 1036 | #define U0LSR_PE (1 << 2) // Parity Error. When the parity bit of a received character is in the wrong state, a parity error occurs. A U0LSR read clears U0LSR[2]. Time of parity error detection is dependent on U0FCR[0]. Note: A parity error is associated with the character at the top of the UART RBR FIFO. |
mbed_official | 41:e8b66477f5bf | 1037 | #define U0LSR_FE (1 << 3) // Framing Error. When the stop bit of a received character is a 0 logic 0, a framing error occurs. A U0LSR read clears U0LSR[3]. The time of the framing error detection is dependent on U0FCR0. Upon detection of a framing error, the RX will attempt to re-synchronize to the data and assume that the bad stop bit is actually an early start bit. However, it cannot be assumed that the next received byte will be correct even if there is no Framing Error. Note: A framing error is associated with the character at the top of the UART RBR FIFO. |
mbed_official | 41:e8b66477f5bf | 1038 | #define U0LSR_BI (1 << 4) // Break Interrupt. When RXD1 is held in the spacing state (all zeros) for one full character transmission (start, data, parity, stop), a break interrupt occurs. Once the break condition has been detected, the receiver goes idle until RXD1 goes to marking state (all ones). A U0LSR read clears this status bit. The time of break detection is dependent on U0FCR[0]. Note: The break interrupt is associated with the character at the top of the UART RBR FIFO. |
mbed_official | 41:e8b66477f5bf | 1039 | #define U0LSR_THRE (1 << 5) // Transmitter Holding Register Empty. THRE is set immediately 1 upon detection of an empty UART THR and is cleared on a U0THR write. |
mbed_official | 41:e8b66477f5bf | 1040 | #define U0LSR_TEMT (1 << 6) // Transmitter Empty. TEMT is set when both U0THR and 1 U0TSR are empty; TEMT is cleared when either the U0TSR or the U0THR contain valid data. This bit is updated as soon as 50 % of the first stop bit has been transmitted or a byte has been written into the THR. |
mbed_official | 41:e8b66477f5bf | 1041 | #define U0LSR_RXFE (1 << 7) // Error in RX FIFO. U0LSR[7] is set when a character with a RX 0 error such as framing error, parity error or break interrupt, is loaded into the U0RBR. This bit is cleared when the U0LSR register is read and there are no subsequent errors in the UART FIFO. |
mbed_official | 41:e8b66477f5bf | 1042 | |
mbed_official | 41:e8b66477f5bf | 1043 | /* U0MSR - address 0x4000 8018 */ |
mbed_official | 41:e8b66477f5bf | 1044 | #define U0MSR_DCTS (1 << 0) // Delta CTS. Set upon state change of input CTS. Cleared on a U0MSR read. 0 No change detected on modem input CTS. 1 State change detected on modem input CTS. |
mbed_official | 41:e8b66477f5bf | 1045 | #define U0MSR_DDSR (1 << 1) // Delta DSR. Set upon state change of input DSR. Cleared on a U0MSR read. 0 No change detected on modem input DSR. 1 State change detected on modem input DSR. |
mbed_official | 41:e8b66477f5bf | 1046 | #define U0MSR_TERI (1 << 2) // Trailing Edge RI. Set upon low to high transition of input RI. Cleared 0 on a U0MSR read. 0 No change detected on modem input, RI. 1 Low-to-high transition detected on RI. |
mbed_official | 41:e8b66477f5bf | 1047 | #define U0MSR_DDCD (1 << 3) // Delta DCD. Set upon state change of input DCD. Cleared on a U0MSR read. 0 No change detected on modem input DCD. 1 State change detected on modem input DCD. |
mbed_official | 41:e8b66477f5bf | 1048 | #define U0MSR_CTS (1 << 4) // Clear To Send State. Complement of input signal CTS. This bit is connected to U0MCR[1] in modem loopback mode. |
mbed_official | 41:e8b66477f5bf | 1049 | #define U0MSR_DSR (1 << 5) // Data Set Ready State. Complement of input signal DSR. This bit is connected to U0MCR[0] in modem loopback mode. |
mbed_official | 41:e8b66477f5bf | 1050 | #define U0MSR_RI (1 << 6) // Ring Indicator State. Complement of input RI. This bit is connected to U0MCR[2] in modem loopback mode. |
mbed_official | 41:e8b66477f5bf | 1051 | #define U0MSR_DCD (1 << 7) // Data Carrier Detect State. Complement of input DCD. This bit is connected to U0MCR[3] in modem loopback mode. |
mbed_official | 41:e8b66477f5bf | 1052 | |
mbed_official | 41:e8b66477f5bf | 1053 | /* U0SCR - address 0x4000 801C */ |
mbed_official | 41:e8b66477f5bf | 1054 | #define U0SCR_PAD_MASK 0x00FF // A readable, writable byte. |
mbed_official | 41:e8b66477f5bf | 1055 | #define U0SCR_PAD_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1056 | |
mbed_official | 41:e8b66477f5bf | 1057 | /* U0ACR - address 0x4000 8020 */ |
mbed_official | 41:e8b66477f5bf | 1058 | #define U0ACR_START (1 << 0) // Start bit. This bit is automatically cleared after auto-baud completion. |
mbed_official | 41:e8b66477f5bf | 1059 | #define U0ACR_MODE (1 << 1) // Auto-baud mode select |
mbed_official | 41:e8b66477f5bf | 1060 | #define U0ACR_AUTORESTART (1 << 2) // Restart enable |
mbed_official | 41:e8b66477f5bf | 1061 | #define U0ACR_ABEOINTCLR (1 << 8) // End of auto-baud interrupt clear (write only accessible) |
mbed_official | 41:e8b66477f5bf | 1062 | #define U0ACR_ABTOINTCLR (1 << 9) // Auto-baud time-out interrupt clear (write only accessible) |
mbed_official | 41:e8b66477f5bf | 1063 | |
mbed_official | 41:e8b66477f5bf | 1064 | /* U0TER - address 0x4000 8030 */ |
mbed_official | 41:e8b66477f5bf | 1065 | #define U0TER_TXEN (1 << 7) // When this bit is 1, as it is after a Reset, data written to the THR 1 is output on the TXD pin as soon as any preceding data has been sent. If this bit cleared to 0 while a character is being sent, the transmission of that character is completed, but no further characters are sent until this bit is set again. In other words, a 0 in this bit blocks the transfer of characters from the THR or TX FIFO into the transmit shift register. Software can clear this bit when it detects that the a hardware-handshaking TX-permit signal (CTS) has gone false, or with software handshaking, when it receives an XOFF character (DC3). Software can set this bit again when it detects that the TX-permit signal has gone true, or when it receives an XON (DC1) character. Reserved |
mbed_official | 41:e8b66477f5bf | 1066 | |
mbed_official | 41:e8b66477f5bf | 1067 | /* U0RS485CTRL - address 0x4000 804C */ |
mbed_official | 41:e8b66477f5bf | 1068 | #define U0RS485CTRL_NMMEN (1 << 0) // NMM enable. |
mbed_official | 41:e8b66477f5bf | 1069 | #define U0RS485CTRL_RXDIS (1 << 1) // Receiver enable. |
mbed_official | 41:e8b66477f5bf | 1070 | #define U0RS485CTRL_AADEN (1 << 2) // AAD enable. |
mbed_official | 41:e8b66477f5bf | 1071 | #define U0RS485CTRL_SEL (1 << 3) // Select direction control pin |
mbed_official | 41:e8b66477f5bf | 1072 | #define U0RS485CTRL_DCTRL (1 << 4) // Auto direction control enable. |
mbed_official | 41:e8b66477f5bf | 1073 | #define U0RS485CTRL_OINV (1 << 5) // Polarity control. This bit reverses the polarity of the direction control signal on the RTS (or DTR) pin. |
mbed_official | 41:e8b66477f5bf | 1074 | |
mbed_official | 41:e8b66477f5bf | 1075 | /* U0RS485ADRMATCH - address 0x4000 8050 */ |
mbed_official | 41:e8b66477f5bf | 1076 | #define U0RS485ADRMATCH_ADRMATCH_MASK 0x00FF // Contains the address match value. 0 |
mbed_official | 41:e8b66477f5bf | 1077 | #define U0RS485ADRMATCH_ADRMATCH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1078 | |
mbed_official | 41:e8b66477f5bf | 1079 | /* U0RS485DLY - address 0x4000 8054 */ |
mbed_official | 41:e8b66477f5bf | 1080 | #define U0RS485DLY_DLY_MASK 0x00FF // Contains the direction control (RTS or DTR) delay value. This register works in conjunction with an 8-bit counter. |
mbed_official | 41:e8b66477f5bf | 1081 | #define U0RS485DLY_DLY_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1082 | |
mbed_official | 41:e8b66477f5bf | 1083 | /* SSP0CR0 - address 0x4004 0000, SSP1CR0 - address 0x4005 8000 */ |
mbed_official | 41:e8b66477f5bf | 1084 | #define SSP0CR0_DSS_MASK 0x000F // Data Size Select. This field controls the number of bits transferred in each frame. Values 0000-0010 are not supported and should not be used. |
mbed_official | 41:e8b66477f5bf | 1085 | #define SSP0CR0_DSS_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1086 | #define SSP0CR0_FRF_MASK 0x0030 // Frame Format. |
mbed_official | 41:e8b66477f5bf | 1087 | #define SSP0CR0_FRF_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1088 | #define SSP0CR0_CPOL (1 << 6) // Clock Out Polarity. This bit is only used in SPI mode. |
mbed_official | 41:e8b66477f5bf | 1089 | #define SSP0CR0_CPHA (1 << 7) // Clock Out Phase. This bit is only used in SPI mode. |
mbed_official | 41:e8b66477f5bf | 1090 | #define SSP0CR0_SCR_MASK 0xFF00 // Serial Clock Rate. The number of prescaler output clocks per 0x00 bit on the bus, minus one. Given that CPSDVSR is the prescale divider, and the APB clock PCLK clocks the prescaler, the bit frequency is PCLK / (CPSDVSR [SCR+1]). Reserved |
mbed_official | 41:e8b66477f5bf | 1091 | #define SSP0CR0_SCR_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1092 | |
mbed_official | 41:e8b66477f5bf | 1093 | /* SSP0CR1 - address 0x4004 0004, SSP1CR1 - address 0x4005 8004 */ |
mbed_official | 41:e8b66477f5bf | 1094 | #define SSP0CR1_LBM (1 << 0) // Loop Back Mode. |
mbed_official | 41:e8b66477f5bf | 1095 | #define SSP0CR1_SSE (1 << 1) // SPI Enable. |
mbed_official | 41:e8b66477f5bf | 1096 | #define SSP0CR1_MS (1 << 2) // Master/Slave Mode.This bit can only be written when the SSE bit is 0. |
mbed_official | 41:e8b66477f5bf | 1097 | #define SSP0CR1_SOD (1 << 3) // Slave Output Disable. This bit is relevant only in slave 0 mode (MS = 1). If it is 1, this blocks this SPI controller from driving the transmit data line (MISO). |
mbed_official | 41:e8b66477f5bf | 1098 | |
mbed_official | 41:e8b66477f5bf | 1099 | /* SSP0DR - address 0x4004 0008, SSP1DR - address 0x4005 8008 */ |
mbed_official | 41:e8b66477f5bf | 1100 | #define SSP0DR_DATA_MASK 0xFFFF // Write: software can write data to be sent in a future frame to this 0x0000 register whenever the TNF bit in the Status register is 1, indicating that the Tx FIFO is not full. If the Tx FIFO was previously empty and the SPI controller is not busy on the bus, transmission of the data will begin immediately. Otherwise the data written to this register will be sent as soon as all previous data has been sent (and received). If the data length is less than 16 bit, software must right-justify the data written to this register. Read: software can read data from this register whenever the RNE bit in the Status register is 1, indicating that the Rx FIFO is not empty. When software reads this register, the SPI controller returns data from the least recent frame in the Rx FIFO. If the data length is less than 16 bit, the data is right-justified in this field with higher order bits filled with 0s. Reserved. |
mbed_official | 41:e8b66477f5bf | 1101 | #define SSP0DR_DATA_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1102 | |
mbed_official | 41:e8b66477f5bf | 1103 | /* SSP0SR - address 0x4004 000C, SSP1SR - address 0x4005 800C */ |
mbed_official | 41:e8b66477f5bf | 1104 | #define SSP0SR_TFE (1 << 0) // Transmit FIFO Empty. This bit is 1 is the Transmit FIFO is empty, 0 if not. |
mbed_official | 41:e8b66477f5bf | 1105 | #define SSP0SR_TNF (1 << 1) // Transmit FIFO Not Full. This bit is 0 if the Tx FIFO is full, 1 if not. 1 |
mbed_official | 41:e8b66477f5bf | 1106 | #define SSP0SR_RNE (1 << 2) // Receive FIFO Not Empty. This bit is 0 if the Receive FIFO is empty, 1 if not. |
mbed_official | 41:e8b66477f5bf | 1107 | #define SSP0SR_RFF (1 << 3) // Receive FIFO Full. This bit is 1 if the Receive FIFO is full, 0 if not. |
mbed_official | 41:e8b66477f5bf | 1108 | #define SSP0SR_BSY (1 << 4) // Busy. This bit is 0 if the SPI controller is idle, 1 if it is currently sending/receiving a frame and/or the Tx FIFO is not empty. |
mbed_official | 41:e8b66477f5bf | 1109 | |
mbed_official | 41:e8b66477f5bf | 1110 | /* SSP0CPSR - address 0x4004 0010, SSP1CPSR - address 0x4005 8010 */ |
mbed_official | 41:e8b66477f5bf | 1111 | #define SSP0CPSR_CPSDVSR_MASK 0x00FF // This even value between 2 and 254, by which SPI_PCLK is divided to yield the prescaler output clock. Bit 0 always reads as 0. |
mbed_official | 41:e8b66477f5bf | 1112 | #define SSP0CPSR_CPSDVSR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1113 | |
mbed_official | 41:e8b66477f5bf | 1114 | /* SSP0IMSC - address 0x4004 0014, SSP1IMSC - address 0x4005 8014 */ |
mbed_official | 41:e8b66477f5bf | 1115 | #define SSP0IMSC_RORIM (1 << 0) // Software should set this bit to enable interrupt when a Receive 0 Overrun occurs, that is, when the Rx FIFO is full and another frame is completely received. The ARM spec implies that the preceding frame data is overwritten by the new frame data when this occurs. |
mbed_official | 41:e8b66477f5bf | 1116 | #define SSP0IMSC_RTIM (1 << 1) // Software should set this bit to enable interrupt when a Receive Time-out condition occurs. A Receive Time-out occurs when the Rx FIFO is not empty, and no has not been read for a time-out period. The time-out period is the same for master and slave modes and is determined by the SSP bit rate: 32 bits at PCLK / (CPSDVSR [SCR+1]). |
mbed_official | 41:e8b66477f5bf | 1117 | #define SSP0IMSC_RXIM (1 << 2) // Software should set this bit to enable interrupt when the Rx FIFO is at 0 least half full. |
mbed_official | 41:e8b66477f5bf | 1118 | #define SSP0IMSC_TXIM (1 << 3) // Software should set this bit to enable interrupt when the Tx FIFO is at 0 least half empty. |
mbed_official | 41:e8b66477f5bf | 1119 | |
mbed_official | 41:e8b66477f5bf | 1120 | /* SSP0RIS - address 0x4004 0018, SSP1RIS - address 0x4005 8018 */ |
mbed_official | 41:e8b66477f5bf | 1121 | #define SSP0RIS_RORRIS (1 << 0) // This bit is 1 if another frame was completely received while the 0 RxFIFO was full. The ARM spec implies that the preceding frame data is overwritten by the new frame data when this occurs. |
mbed_official | 41:e8b66477f5bf | 1122 | #define SSP0RIS_RTRIS (1 << 1) // This bit is 1 if the Rx FIFO is not empty, and has not been read 0 for a time-out period. The time-out period is the same for master and slave modes and is determined by the SSP bit rate: 32 bits at PCLK / (CPSDVSR [SCR+1]). |
mbed_official | 41:e8b66477f5bf | 1123 | #define SSP0RIS_RXRIS (1 << 2) // This bit is 1 if the Rx FIFO is at least half full. |
mbed_official | 41:e8b66477f5bf | 1124 | #define SSP0RIS_TXRIS (1 << 3) // This bit is 1 if the Tx FIFO is at least half empty. |
mbed_official | 41:e8b66477f5bf | 1125 | |
mbed_official | 41:e8b66477f5bf | 1126 | /* SSP0MIS - address 0x4004 001C, SSP1MIS - address 0x4005 801C */ |
mbed_official | 41:e8b66477f5bf | 1127 | #define SSP0MIS_RORMIS (1 << 0) // This bit is 1 if another frame was completely received while the 0 RxFIFO was full, and this interrupt is enabled. |
mbed_official | 41:e8b66477f5bf | 1128 | #define SSP0MIS_RTMIS (1 << 1) // This bit is 1 if the Rx FIFO is not empty, has not been read for a time-out period, and this interrupt is enabled. The time-out period is the same for master and slave modes and is determined by the SSP bit rate: 32 bits at PCLK / (CPSDVSR [SCR+1]). |
mbed_official | 41:e8b66477f5bf | 1129 | #define SSP0MIS_RXMIS (1 << 2) // This bit is 1 if the Rx FIFO is at least half full, and this interrupt 0 is enabled. |
mbed_official | 41:e8b66477f5bf | 1130 | #define SSP0MIS_TXMIS (1 << 3) // This bit is 1 if the Tx FIFO is at least half empty, and this interrupt is enabled. |
mbed_official | 41:e8b66477f5bf | 1131 | |
mbed_official | 41:e8b66477f5bf | 1132 | /* SSP0ICR - address 0x4004 0020, SSP1ICR - address 0x4005 8020 */ |
mbed_official | 41:e8b66477f5bf | 1133 | #define SSP0ICR_RORIC (1 << 0) // Writing a 1 to this bit clears the "frame was received when RxFIFO was full" interrupt. |
mbed_official | 41:e8b66477f5bf | 1134 | #define SSP0ICR_RTIC (1 << 1) // Writing a 1 to this bit clears the Rx FIFO was not empty and has not been read for a timeout period interrupt. The timeout period is the same for master and slave modes and is determined by the SSP bit rate: 32 bits at PCLK / (CPSDVSR [SCR+1]). |
mbed_official | 41:e8b66477f5bf | 1135 | |
mbed_official | 41:e8b66477f5bf | 1136 | /* I2C0CONSET - address 0x4000 0000 */ |
mbed_official | 41:e8b66477f5bf | 1137 | #define I2C0CONSET_AA (1 << 2) // Assert acknowledge flag. |
mbed_official | 41:e8b66477f5bf | 1138 | #define I2C0CONSET_SI (1 << 3) // I2C interrupt flag. |
mbed_official | 41:e8b66477f5bf | 1139 | #define I2C0CONSET_STO (1 << 4) // STOP flag. |
mbed_official | 41:e8b66477f5bf | 1140 | #define I2C0CONSET_STA (1 << 5) // START flag. |
mbed_official | 41:e8b66477f5bf | 1141 | #define I2C0CONSET_I2EN (1 << 6) // I2C interface enable. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1142 | |
mbed_official | 41:e8b66477f5bf | 1143 | /* I2C0STAT - 0x4000 0004 */ |
mbed_official | 41:e8b66477f5bf | 1144 | #define I2C0STAT_STATUS_MASK 0x00F8 // These bits give the actual status information about the I2 C interface. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1145 | #define I2C0STAT_STATUS_SHIFT 3 |
mbed_official | 41:e8b66477f5bf | 1146 | |
mbed_official | 41:e8b66477f5bf | 1147 | /* I2C0DAT - 0x4000 0008 */ |
mbed_official | 41:e8b66477f5bf | 1148 | #define I2C0DAT_DATA_MASK 0x00FF // This register holds data values that have been received or are to 0 be transmitted. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1149 | #define I2C0DAT_DATA_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1150 | |
mbed_official | 41:e8b66477f5bf | 1151 | /* I2C0ADR0 - 0x4000 000C */ |
mbed_official | 41:e8b66477f5bf | 1152 | #define I2C0ADR0_GC (1 << 0) // General Call enable bit. |
mbed_official | 41:e8b66477f5bf | 1153 | #define I2C0ADR0_ADDRESS_MASK 0x00FE // The I2C device address for slave mode. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1154 | #define I2C0ADR0_ADDRESS_SHIFT 1 |
mbed_official | 41:e8b66477f5bf | 1155 | |
mbed_official | 41:e8b66477f5bf | 1156 | /* I2C0SCLH - address 0x4000 0010 */ |
mbed_official | 41:e8b66477f5bf | 1157 | #define I2C0SCLH_SCLH_MASK 0xFFFF // Count for SCL HIGH time period selection. |
mbed_official | 41:e8b66477f5bf | 1158 | #define I2C0SCLH_SCLH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1159 | |
mbed_official | 41:e8b66477f5bf | 1160 | /* I2C0SCLL - 0x4000 0014 */ |
mbed_official | 41:e8b66477f5bf | 1161 | #define I2C0SCLL_SCLL_MASK 0xFFFF // Count for SCL low time period selection. |
mbed_official | 41:e8b66477f5bf | 1162 | #define I2C0SCLL_SCLL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1163 | |
mbed_official | 41:e8b66477f5bf | 1164 | /* I2C0CONCLR - 0x4000 0018 */ |
mbed_official | 41:e8b66477f5bf | 1165 | #define I2C0CONCLR_AAC (1 << 2) // Assert acknowledge Clear bit. |
mbed_official | 41:e8b66477f5bf | 1166 | #define I2C0CONCLR_SIC (1 << 3) // I2C interrupt Clear bit. |
mbed_official | 41:e8b66477f5bf | 1167 | #define I2C0CONCLR_STAC (1 << 5) // START flag Clear bit. |
mbed_official | 41:e8b66477f5bf | 1168 | #define I2C0CONCLR_I2ENC (1 << 6) // I2C interface Disable bit. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1169 | |
mbed_official | 41:e8b66477f5bf | 1170 | /* I2C0MMCTRL - 0x4000 001C */ |
mbed_official | 41:e8b66477f5bf | 1171 | #define I2C0MMCTRL_MM_ENA (1 << 0) // Monitor mode enable. |
mbed_official | 41:e8b66477f5bf | 1172 | #define I2C0MMCTRL_ENA_SCL (1 << 1) // SCL output enable. |
mbed_official | 41:e8b66477f5bf | 1173 | |
mbed_official | 41:e8b66477f5bf | 1174 | /* I2C0DATA_BUFFER - 0x4000 002C */ |
mbed_official | 41:e8b66477f5bf | 1175 | #define I2C0DATA_BUFFER_DATA_MASK 0x00FF // This register holds contents of the 8 MSBs of the DAT shift register. Reserved. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1176 | #define I2C0DATA_BUFFER_DATA_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1177 | |
mbed_official | 41:e8b66477f5bf | 1178 | /* CANCNTL, address 0x4005 0000 */ |
mbed_official | 41:e8b66477f5bf | 1179 | #define CANCNTL_INIT (1 << 0) // Initialization |
mbed_official | 41:e8b66477f5bf | 1180 | #define CANCNTL_IE (1 << 1) // Module interrupt enable |
mbed_official | 41:e8b66477f5bf | 1181 | #define CANCNTL_SIE (1 << 2) // Status change interrupt enable |
mbed_official | 41:e8b66477f5bf | 1182 | #define CANCNTL_EIE (1 << 3) // Error interrupt enable |
mbed_official | 41:e8b66477f5bf | 1183 | #define CANCNTL_DAR (1 << 5) // Disable automatic retransmission |
mbed_official | 41:e8b66477f5bf | 1184 | #define CANCNTL_CCE (1 << 6) // Configuration change enable |
mbed_official | 41:e8b66477f5bf | 1185 | #define CANCNTL_TEST (1 << 7) // Test mode enable |
mbed_official | 41:e8b66477f5bf | 1186 | |
mbed_official | 41:e8b66477f5bf | 1187 | /* CANSTAT, address 0x4005 0004 */ |
mbed_official | 41:e8b66477f5bf | 1188 | #define CANSTAT_LEC_MASK 0x0007 // Last error code Type of the last error to occur on the CAN bus.The LEC field holds a code which indicates the type of the last error to occur on the CAN bus. This field will be cleared to `0' when a message has been transferred (reception or transmission) without error. The unused code `111' may be written by the CPU to check for updates. |
mbed_official | 41:e8b66477f5bf | 1189 | #define CANSTAT_LEC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1190 | #define CANSTAT_TXOK (1 << 3) // Transmitted a message successfully This bit must be reset by the CPU. It is never reset by the CAN controller. |
mbed_official | 41:e8b66477f5bf | 1191 | #define CANSTAT_RXOK (1 << 4) // Received a message successfully This bit must be reset by the CPU. It is never reset by the CAN controller. |
mbed_official | 41:e8b66477f5bf | 1192 | #define CANSTAT_EPASS (1 << 5) // Error passive |
mbed_official | 41:e8b66477f5bf | 1193 | #define CANSTAT_EWARN (1 << 6) // Warning status |
mbed_official | 41:e8b66477f5bf | 1194 | #define CANSTAT_BOFF (1 << 7) // Busoff status |
mbed_official | 41:e8b66477f5bf | 1195 | |
mbed_official | 41:e8b66477f5bf | 1196 | /* CANEC, address 0x4005 0008 */ |
mbed_official | 41:e8b66477f5bf | 1197 | #define CANEC_TEC_MASK 0x00FF // Transmit error counter Current value of the transmit error counter (maximum value 255) |
mbed_official | 41:e8b66477f5bf | 1198 | #define CANEC_TEC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1199 | #define CANEC_REC_MASK 0x7F00 // Receive error counter Current value of the receive error counter (maximum value 127). |
mbed_official | 41:e8b66477f5bf | 1200 | #define CANEC_REC_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1201 | #define CANEC_RP (1 << 15) // Receive error passive |
mbed_official | 41:e8b66477f5bf | 1202 | |
mbed_official | 41:e8b66477f5bf | 1203 | /* CANBT, address 0x4005 000C */ |
mbed_official | 41:e8b66477f5bf | 1204 | #define CANBT_BRP_MASK 0x003F // Baud rate prescaler The value by which the oscillator frequency is divided for generating the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the Baud Rate Prescaler are 0 to 63.[1] |
mbed_official | 41:e8b66477f5bf | 1205 | #define CANBT_BRP_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1206 | #define CANBT_SJW_MASK 0x00C0 // (Re)synchronization jump width Valid programmed values are 0 to 3.[1] |
mbed_official | 41:e8b66477f5bf | 1207 | #define CANBT_SJW_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1208 | #define CANBT_TSEG1_MASK 0x0F00 // Time segment before the sample point Valid values are 1 to 15.[1] |
mbed_official | 41:e8b66477f5bf | 1209 | #define CANBT_TSEG1_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1210 | #define CANBT_TSEG2_MASK 0x7000 // Time segment after the sample point Valid values are 0 to 7.[1] |
mbed_official | 41:e8b66477f5bf | 1211 | #define CANBT_TSEG2_SHIFT 12 |
mbed_official | 41:e8b66477f5bf | 1212 | |
mbed_official | 41:e8b66477f5bf | 1213 | /* CANINT, address 0x4005 0010 */ |
mbed_official | 41:e8b66477f5bf | 1214 | #define CANINT_INTID_MASK 0xFFFF // 0x0000 = No interrupt is pending. 0 0x0001 - 0x0020 = Number of message object which caused the interrupt. 0x0021 - 0x7FFF = Unused 0x8000 = Status interrupt 0x8001 - 0xFFFF = Unused |
mbed_official | 41:e8b66477f5bf | 1215 | #define CANINT_INTID_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1216 | |
mbed_official | 41:e8b66477f5bf | 1217 | /* CANTEST, address 0x4005 0014 */ |
mbed_official | 41:e8b66477f5bf | 1218 | #define CANTEST_BASIC (1 << 2) // Basic mode |
mbed_official | 41:e8b66477f5bf | 1219 | #define CANTEST_SILENT (1 << 3) // Silent mode |
mbed_official | 41:e8b66477f5bf | 1220 | #define CANTEST_LBACK (1 << 4) // Loop back mode |
mbed_official | 41:e8b66477f5bf | 1221 | #define CANTEST_TX_MASK 0x0060 // Control of CAN_TXD pins |
mbed_official | 41:e8b66477f5bf | 1222 | #define CANTEST_TX_SHIFT 5 |
mbed_official | 41:e8b66477f5bf | 1223 | #define CANTEST_RX (1 << 7) // Monitors the actual value of the CAN_RXD pin. |
mbed_official | 41:e8b66477f5bf | 1224 | |
mbed_official | 41:e8b66477f5bf | 1225 | /* CANBRPE, address 0x4005 0018 */ |
mbed_official | 41:e8b66477f5bf | 1226 | #define CANBRPE_BRPE_MASK 0x000F // Baud rate prescaler extension By programming BRPE the Baud Rate Prescaler can be extended to values up to 1023. Hardware interprets the value as the value of BRPE (MSBs) and BRP (LSBs) plus one. Allowed values are 0 to 15. |
mbed_official | 41:e8b66477f5bf | 1227 | #define CANBRPE_BRPE_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1228 | |
mbed_official | 41:e8b66477f5bf | 1229 | /* CANIF1_CMDREQ, address 0x4005 0020 and CANIF2_CMDREQ, address 0x4005 0080 */ |
mbed_official | 41:e8b66477f5bf | 1230 | #define CANIFn_CMDREQ_MN_MASK 0x003F // Message number 0x01 - 0x20 = Valid message numbers. The message object in the message RAM is selected for data transfer. 0x00 = Not a valid message number. This value is interpreted as 0x20.[1] 0x21 - 0x3F = Not a valid message number. This value is interpreted as 0x01 - 0x1F.[1] |
mbed_official | 41:e8b66477f5bf | 1231 | #define CANIFn_CMDREQ_MN_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1232 | #define CANIFn_CMDREQ_BUSY (1 << 15) // BUSY flag |
mbed_official | 41:e8b66477f5bf | 1233 | |
mbed_official | 41:e8b66477f5bf | 1234 | /* CANIF1_CMDMSK, address 0x4005 0024 and CANIF2_CMDMSK, address 0x4005 0084 */ |
mbed_official | 41:e8b66477f5bf | 1235 | #define CANIFn_CMDMSK_DATA_B (1 << 0) // Access data bytes 4-7 |
mbed_official | 41:e8b66477f5bf | 1236 | #define CANIFn_CMDMSK_DATA_A (1 << 1) // Access data bytes 0-3 |
mbed_official | 41:e8b66477f5bf | 1237 | #define CANIFn_CMDMSK_TXRQST (1 << 2) // Access transmission request bit (Write direction) |
mbed_official | 41:e8b66477f5bf | 1238 | #define CANIFn_CMDMSK_NEWDAT (1 << 2) // Access new data bit (Read direction) |
mbed_official | 41:e8b66477f5bf | 1239 | #define CANIFn_CMDMSK_CLRINTPND (1 << 3) // This bit is ignored in the write direction. |
mbed_official | 41:e8b66477f5bf | 1240 | #define CANIFn_CMDMSK_CTRL (1 << 4) // Access control bits |
mbed_official | 41:e8b66477f5bf | 1241 | #define CANIFn_CMDMSK_ARB (1 << 5) // Access arbitration bits |
mbed_official | 41:e8b66477f5bf | 1242 | #define CANIFn_CMDMSK_MASK (1 << 6) // Access mask bits |
mbed_official | 41:e8b66477f5bf | 1243 | #define CANIFn_CMDMSK_WR (1 << 7) // Write transfer Transfer data from the selected message buffer registers to the message object addressed by the command request register CANIFn_CMDREQ. |
mbed_official | 41:e8b66477f5bf | 1244 | #define CANIFn_CMDMSK_RD (0 << 7) // Read transfer Read data from the selected message buffer registers to the message object addressed by the command request register CANIFn_CMDREQ. |
mbed_official | 41:e8b66477f5bf | 1245 | |
mbed_official | 41:e8b66477f5bf | 1246 | /* CANIF1_MSK1, address 0x4005 0028 and CANIF2_MASK1, address 0x4005 0088 */ |
mbed_official | 41:e8b66477f5bf | 1247 | #define CANIFn_MSK1_MSK_MASK 0xFFFF // Identifier mask |
mbed_official | 41:e8b66477f5bf | 1248 | #define CANIFn_MSK1_MSK_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1249 | |
mbed_official | 41:e8b66477f5bf | 1250 | /* CANIF1_MSK2, address 0x4005 002C and CANIF2_MASK2, address 0x4005 008C */ |
mbed_official | 41:e8b66477f5bf | 1251 | #define CANIFn_MSK2_MSK_MASK 0x1FFF // Identifier mask |
mbed_official | 41:e8b66477f5bf | 1252 | #define CANIFn_MSK2_MSK_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1253 | #define CANIFn_MSK2_MDIR (1 << 14) // Mask message direction |
mbed_official | 41:e8b66477f5bf | 1254 | #define CANIFn_MSK2_MXTD (1 << 15) // Mask extend identifier |
mbed_official | 41:e8b66477f5bf | 1255 | |
mbed_official | 41:e8b66477f5bf | 1256 | /* CANIF1_ARB1, address 0x4005 0030 and CANIF2_ARB1, address 0x4005 0090 */ |
mbed_official | 41:e8b66477f5bf | 1257 | #define CANIFn_ARB1_ID_MASK 0xFFFF // Message identifier 29-bit identifier (extended frame) 11-bit identifier (standard frame) |
mbed_official | 41:e8b66477f5bf | 1258 | #define CANIFn_ARB1_ID_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1259 | |
mbed_official | 41:e8b66477f5bf | 1260 | /* CANIF1_ARB2, address 0x4005 0034 and CANIF2_ARB2, address 0x4005 0094 */ |
mbed_official | 41:e8b66477f5bf | 1261 | #define CANIFn_ARB2_ID_MASK 0x1FFF // Message identifier 29-bit identifier (extended frame) 11-bit identifier (standard frame) |
mbed_official | 41:e8b66477f5bf | 1262 | #define CANIFn_ARB2_ID_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1263 | #define CANIFn_ARB2_DIR (1 << 13) // Message direction |
mbed_official | 41:e8b66477f5bf | 1264 | #define CANIFn_ARB2_XTD (1 << 14) // Extend identifier |
mbed_official | 41:e8b66477f5bf | 1265 | #define CANIFn_ARB2_MSGVAL (1 << 15) // Message valid Remark: The CPU must reset the MSGVAL bit of all unused Messages Objects during the initialization before it resets bit INIT in the CAN Control Register. This bit must also be reset before the identifier ID28:0, the control bits XTD, DIR, or the Data Length Code DLC3:0 are modified, or if the Messages Object is no longer required. |
mbed_official | 41:e8b66477f5bf | 1266 | |
mbed_official | 41:e8b66477f5bf | 1267 | /* CANIF1_MCTRL, address 0x4005 0038 and CANIF2_MCTRL, address 0x4005 0098 */ |
mbed_official | 41:e8b66477f5bf | 1268 | #define CANIFn_MCTRL_DLC_MASK 0x000F // Data length code Remark: The Data Length Code of a Message Object must be defined the same as in all the corresponding objects with the same identifier at other nodes. When the Message Handler stores a data frame, it will write the DLC to the value given by the received message. 0000 - 1000 = Data frame has 0 - 8 data bytes. 1001 - 1111 = Data frame has 8 data bytes. |
mbed_official | 41:e8b66477f5bf | 1269 | #define CANIFn_MCTRL_DLC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1270 | #define CANIFn_MCTRL_EOB (1 << 7) // End of buffer |
mbed_official | 41:e8b66477f5bf | 1271 | #define CANIFn_MCTRL_TXRQST (1 << 8) // Transmit request |
mbed_official | 41:e8b66477f5bf | 1272 | #define CANIFn_MCTRL_RMTEN (1 << 9) // Remote enable |
mbed_official | 41:e8b66477f5bf | 1273 | #define CANIFn_MCTRL_RXIE (1 << 10) // Receive interrupt enable |
mbed_official | 41:e8b66477f5bf | 1274 | #define CANIFn_MCTRL_TXIE (1 << 11) // Transmit interrupt enable |
mbed_official | 41:e8b66477f5bf | 1275 | #define CANIFn_MCTRL_UMASK (1 << 12) // Use acceptance mask Remark: If UMASK is set to 1, the message object's mask bits have to be programmed during initialization of the message object before MAGVAL is set to 1. |
mbed_official | 41:e8b66477f5bf | 1276 | #define CANIFn_MCTRL_INTPND (1 << 13) // Interrupt pending |
mbed_official | 41:e8b66477f5bf | 1277 | #define CANIFn_MCTRL_MSGLST (1 << 14) // Message lost (only valid for message objects in the direction receive). |
mbed_official | 41:e8b66477f5bf | 1278 | #define CANIFn_MCTRL_NEWDAT (1 << 15) // New data |
mbed_official | 41:e8b66477f5bf | 1279 | |
mbed_official | 41:e8b66477f5bf | 1280 | /* CANIF1_DA1, address 0x4005 003C and CANIF2_DA1, address 0x4005 009C */ |
mbed_official | 41:e8b66477f5bf | 1281 | #define CANIFn_DA1_DATA0_MASK 0x00FF // Data byte 0 |
mbed_official | 41:e8b66477f5bf | 1282 | #define CANIFn_DA1_DATA0_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1283 | #define CANIFn_DA1_DATA1_MASK 0xFF00 // Data byte 1 |
mbed_official | 41:e8b66477f5bf | 1284 | #define CANIFn_DA1_DATA1_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1285 | |
mbed_official | 41:e8b66477f5bf | 1286 | /* CANIF1_DA2, address 0x4005 0040 and CANIF2_DA2, address 0x4005 00A0 */ |
mbed_official | 41:e8b66477f5bf | 1287 | #define CANIFn_DA2_DATA2_MASK 0x00FF // Data byte 2 |
mbed_official | 41:e8b66477f5bf | 1288 | #define CANIFn_DA2_DATA2_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1289 | #define CANIFn_DA2_DATA3_MASK 0xFF00 // Data byte 3 |
mbed_official | 41:e8b66477f5bf | 1290 | #define CANIFn_DA2_DATA3_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1291 | |
mbed_official | 41:e8b66477f5bf | 1292 | /* CANIF1_DB1, address 0x4005 0044 and CANIF2_DB1, address 0x4005 00A4 */ |
mbed_official | 41:e8b66477f5bf | 1293 | #define CANIFn_DB1_DATA4_MASK 0x00FF // Data byte 4 |
mbed_official | 41:e8b66477f5bf | 1294 | #define CANIFn_DB1_DATA4_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1295 | #define CANIFn_DB1_DATA5_MASK 0xFF00 // Data byte 5 |
mbed_official | 41:e8b66477f5bf | 1296 | #define CANIFn_DB1_DATA5_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1297 | |
mbed_official | 41:e8b66477f5bf | 1298 | /* CANIF1_DB2, address 0x4005 0048 and CANIF2_DB2, address 0x4005 00A8 */ |
mbed_official | 41:e8b66477f5bf | 1299 | #define CANIFn_DB2_DATA6_MASK 0x00FF // Data byte 6 |
mbed_official | 41:e8b66477f5bf | 1300 | #define CANIFn_DB2_DATA6_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1301 | #define CANIFn_DB2_DATA7_MASK 0xFF00 // Data byte 7 |
mbed_official | 41:e8b66477f5bf | 1302 | #define CANIFn_DB2_DATA7_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1303 | |
mbed_official | 41:e8b66477f5bf | 1304 | /* CANTXREQ1, address 0x4005 0100 */ |
mbed_official | 41:e8b66477f5bf | 1305 | #define CANTXREQ1_TXRQST_MASK 0xFFFF // Transmission request bit of message objects 16 to 1. 0 = This message object is not waiting for transmission. 1 = The transmission of this message object is requested and not yet done. Reserved |
mbed_official | 41:e8b66477f5bf | 1306 | #define CANTXREQ1_TXRQST_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1307 | |
mbed_official | 41:e8b66477f5bf | 1308 | /* CANTXREQ2, address 0x4005 0104 */ |
mbed_official | 41:e8b66477f5bf | 1309 | #define CANTXREQ2_TXRQST_MASK 0xFFFF // Transmission request bit of message objects 32 to 17. 0 = This message object is not waiting for transmission. 1 = The transmission of this message object is requested and not yet done. Reserved |
mbed_official | 41:e8b66477f5bf | 1310 | #define CANTXREQ2_TXRQST_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1311 | |
mbed_official | 41:e8b66477f5bf | 1312 | /* CANND1, address 0x4005 0120 */ |
mbed_official | 41:e8b66477f5bf | 1313 | #define CANND1_NEWDAT_MASK 0xFFFF // New data bits of message objects 16 to 1. 0 = No new data has been written into the data portion of this Message Object by the Message Handler since last time this flag was cleared by the CPU. 1 = The Message Handler or the CPU has written new data into the data portion of this Message Object. |
mbed_official | 41:e8b66477f5bf | 1314 | #define CANND1_NEWDAT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1315 | |
mbed_official | 41:e8b66477f5bf | 1316 | /* CANND2, address 0x4005 0124 */ |
mbed_official | 41:e8b66477f5bf | 1317 | #define CANND2_NEWDAT_MASK 0xFFFF // New data bits of message objects 32 to 17. 0 = No new data has been written into the data portion of this Message Object by the Message Handler since last time this flag was cleared by the CPU. 1 = The Message Handler or the CPU has written new data into the data portion of this Message Object. |
mbed_official | 41:e8b66477f5bf | 1318 | #define CANND2_NEWDAT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1319 | |
mbed_official | 41:e8b66477f5bf | 1320 | /* CANIR1, address 0x4005 0140 */ |
mbed_official | 41:e8b66477f5bf | 1321 | #define CANIR1_INTPND_INTERRUPT_MASK 0xFFFF // pending bits of message objects 16 to 1. essage object is ignored by the message essage object is the source of an interrupt. Reserved |
mbed_official | 41:e8b66477f5bf | 1322 | #define CANIR1_INTPND_INTERRUPT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1323 | |
mbed_official | 41:e8b66477f5bf | 1324 | /* CANIR2, addresses 0x4005 0144 */ |
mbed_official | 41:e8b66477f5bf | 1325 | #define CANIR2_INTPND_MASK 0xFFFF // Interrupt pending bits of message objects 32 to 17. 0 = This message object is ignored by the message handler. 1 = This message object is the source of an interrupt. Reserved |
mbed_official | 41:e8b66477f5bf | 1326 | #define CANIR2_INTPND_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1327 | |
mbed_official | 41:e8b66477f5bf | 1328 | /* CANMSGV1, addresses 0x4005 0160 */ |
mbed_official | 41:e8b66477f5bf | 1329 | #define CANMSGV1_MSGVAL_MASK 0xFFFF // Message valid bits of message objects 16 to 1. 0 = This message object is ignored by the message handler. 1 = This message object is configured and should be considered by the message handler. Reserved |
mbed_official | 41:e8b66477f5bf | 1330 | #define CANMSGV1_MSGVAL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1331 | |
mbed_official | 41:e8b66477f5bf | 1332 | /* CANMSGV2, address 0x4005 0164 */ |
mbed_official | 41:e8b66477f5bf | 1333 | #define CANMSGV2_MSGVAL_MASK 0xFFFF // Message valid bits of message objects 32 to 17. 0 = This message object is ignored by the message handler. 1 = This message object is configured and should be considered by the message handler. Reserved |
mbed_official | 41:e8b66477f5bf | 1334 | #define CANMSGV2_MSGVAL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1335 | |
mbed_official | 41:e8b66477f5bf | 1336 | /* CANCLKDIV, address 0x4005 0180 */ |
mbed_official | 41:e8b66477f5bf | 1337 | #define CANCLKDIV_CLKDIVVAL_MASK 0x000F // Clock divider value. CAN_CLK = PCLK/(CLKDIVVAL +1) 0000: CAN_CLK = PCLK divided by 1. 0001: CAN_CLK = PCLK divided by 2. 0010: CAN_CLK = PCLK divided by 3 0011: CAN_CLK = PCLK divided by 4. ... 1111: CAN_CLK = PCLK divided by 16. |
mbed_official | 41:e8b66477f5bf | 1338 | #define CANCLKDIV_CLKDIVVAL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1339 | |
mbed_official | 41:e8b66477f5bf | 1340 | /* TMR16B0IR - address 0x4000 C000 and TMR16B1IR - address 0x4001 0000 */ |
mbed_official | 41:e8b66477f5bf | 1341 | #define TMR16B0IR_MR0 (1 << 0) // Interrupt flag for match channel 0. |
mbed_official | 41:e8b66477f5bf | 1342 | #define TMR16B0IR_MR1 (1 << 1) // Interrupt flag for match channel 1. |
mbed_official | 41:e8b66477f5bf | 1343 | #define TMR16B0IR_MR2 (1 << 2) // Interrupt flag for match channel 2. |
mbed_official | 41:e8b66477f5bf | 1344 | #define TMR16B0IR_MR3 (1 << 3) // Interrupt flag for match channel 3. |
mbed_official | 41:e8b66477f5bf | 1345 | #define TMR16B0IR_CR0 (1 << 4) // Interrupt flag for capture channel 0 event. |
mbed_official | 41:e8b66477f5bf | 1346 | |
mbed_official | 41:e8b66477f5bf | 1347 | /* TMR16B0TCR - address 0x4000 C004 and TMR16B1TCR - address 0x4001 0004 */ |
mbed_official | 41:e8b66477f5bf | 1348 | #define TMR16B0TCR_CEN (1 << 0) // Counter Enable. When one, the Timer Counter and Prescale Counter are enabled for counting. When zero, the counters are disabled. |
mbed_official | 41:e8b66477f5bf | 1349 | #define TMR16B0TCR_CRST (1 << 1) // Counter Reset. When one, the Timer Counter and the Prescale Counter are synchronously reset on the next positive edge of PCLK. The counters remain reset until TCR[1] is returned to zero. |
mbed_official | 41:e8b66477f5bf | 1350 | |
mbed_official | 41:e8b66477f5bf | 1351 | /* TMR16B0TC, address 0x4000 C008 and TMR16B1TC 0x4001 0008 */ |
mbed_official | 41:e8b66477f5bf | 1352 | #define TMR16B0TC_TC_MASK 0xFFFF // Timer counter value. |
mbed_official | 41:e8b66477f5bf | 1353 | #define TMR16B0TC_TC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1354 | |
mbed_official | 41:e8b66477f5bf | 1355 | /* TMR16B0PR, address 0x4000 C00C and TMR16B1PR 0x4001 000C */ |
mbed_official | 41:e8b66477f5bf | 1356 | #define TMR16B0PR_PR_MASK 0xFFFF // Prescale max value. |
mbed_official | 41:e8b66477f5bf | 1357 | #define TMR16B0PR_PR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1358 | |
mbed_official | 41:e8b66477f5bf | 1359 | /* TMR16B0PC, address 0x4001 C010 and TMR16B1PC 0x4000 0010 */ |
mbed_official | 41:e8b66477f5bf | 1360 | #define TMR16B0PC_PC_MASK 0xFFFF // Prescale counter value. |
mbed_official | 41:e8b66477f5bf | 1361 | #define TMR16B0PC_PC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1362 | |
mbed_official | 41:e8b66477f5bf | 1363 | /* TMR16B0MCR - address 0x4000 C014 and TMR16B1MCR - address 0x4001 0014 */ |
mbed_official | 41:e8b66477f5bf | 1364 | #define TMR16B0MCR_MR0I (1 << 0) // Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1365 | #define TMR16B0MCR_MR0R (1 << 1) // Reset on MR0: the TC will be reset if MR0 matches it. |
mbed_official | 41:e8b66477f5bf | 1366 | #define TMR16B0MCR_MR0S (1 << 2) // Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1367 | #define TMR16B0MCR_MR1I (1 << 3) // Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1368 | #define TMR16B0MCR_MR1R (1 << 4) // Reset on MR1: the TC will be reset if MR1 matches it. |
mbed_official | 41:e8b66477f5bf | 1369 | #define TMR16B0MCR_MR1S (1 << 5) // Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1370 | #define TMR16B0MCR_MR2I (1 << 6) // Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1371 | #define TMR16B0MCR_MR2R (1 << 7) // Reset on MR2: the TC will be reset if MR2 matches it. |
mbed_official | 41:e8b66477f5bf | 1372 | #define TMR16B0MCR_MR2S (1 << 8) // Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1373 | #define TMR16B0MCR_MR3I (1 << 9) // Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1374 | #define TMR16B0MCR_MR3R (1 << 10) // Reset on MR3: the TC will be reset if MR3 matches it. |
mbed_official | 41:e8b66477f5bf | 1375 | #define TMR16B0MCR_MR3S (1 << 11) // Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1376 | |
mbed_official | 41:e8b66477f5bf | 1377 | /* TMR16B0MR0 to 3, addresses 0x4000 C018 to 24 and TMR16B1MR0 to 3, addresses 0x4001 0018 to 24 */ |
mbed_official | 41:e8b66477f5bf | 1378 | #define TMR16B0MR0_to_3_MATCH_MASK 0xFFFF // Timer counter match value. |
mbed_official | 41:e8b66477f5bf | 1379 | #define TMR16B0MR0_to_3_MATCH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1380 | |
mbed_official | 41:e8b66477f5bf | 1381 | /* TMR16B0CCR - address 0x4000 C028 and TMR16B1CCR - address 0x4001 0028 */ |
mbed_official | 41:e8b66477f5bf | 1382 | #define TMR16B0CCR_CAP0RE (1 << 0) // Capture on CT16Bn_CAP0 rising edge: a sequence of 0 then 1 on CT16Bn_CAP0 will cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1383 | #define TMR16B0CCR_CAP0FE (1 << 1) // Capture on CT16Bn_CAP0 falling edge: a sequence of 1 then 0 on CT16Bn_CAP0 will 0 cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1384 | #define TMR16B0CCR_CAP0I (1 << 2) // Interrupt on CT16Bn_CAP0 event: a CR0 load due to a CT16Bn_CAP0 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1385 | |
mbed_official | 41:e8b66477f5bf | 1386 | /* TMR16B0CR0, address 0x4000 C02C and TMR16B1CR0, address 0x4001 002C */ |
mbed_official | 41:e8b66477f5bf | 1387 | #define TMR16B0CR0_CAP_MASK 0xFFFF // Timer counter capture value. |
mbed_official | 41:e8b66477f5bf | 1388 | #define TMR16B0CR0_CAP_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1389 | |
mbed_official | 41:e8b66477f5bf | 1390 | /* TMR16B0EMR - address 0x4000 C03C and TMR16B1EMR - address 0x4001 003C */ |
mbed_official | 41:e8b66477f5bf | 1391 | #define TMR16B0EMR_EM0 (1 << 0) // External Match 0. This bit reflects the state of output CT16B0_MAT0/CT16B1_MAT0, 0 whether or not this output is connected to its pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[5:4] control the functionality of this output. This bit is driven to the CT16B0_MAT0/CT16B1_MAT0 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1392 | #define TMR16B0EMR_EM1 (1 << 1) // External Match 1. This bit reflects the state of output CT16B0_MAT1/CT16B1_MAT1, 0 whether or not this output is connected to its pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[7:6] control the functionality of this output. This bit is driven to the CT16B0_MAT1/CT16B1_MAT1 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1393 | #define TMR16B0EMR_EM2 (1 << 2) // External Match 2. This bit reflects the state of output match channel 2, whether or not 0 this output is connected to its pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[9:8] control the functionality of this output. Note that on counter/timer 0 this match channel is not pinned out. This bit is driven to the CT16B1_MAT2 pin if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1394 | #define TMR16B0EMR_EM3 (1 << 3) // External Match 3. This bit reflects the state of output of match channel 3. When a match 0 occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[11:10] control the functionality of this output. There is no output pin available for this channel on either of the 16-bit timers. |
mbed_official | 41:e8b66477f5bf | 1395 | #define TMR16B0EMR_EMC0_MASK 0x0030 // External Match Control 0. Determines the functionality of External Match 0. |
mbed_official | 41:e8b66477f5bf | 1396 | #define TMR16B0EMR_EMC0_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1397 | #define TMR16B0EMR_EMC1_MASK 0x00C0 // External Match Control 1. Determines the functionality of External Match 1. |
mbed_official | 41:e8b66477f5bf | 1398 | #define TMR16B0EMR_EMC1_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1399 | #define TMR16B0EMR_EMC2_MASK 0x0300 // External Match Control 2. Determines the functionality of External Match 2. |
mbed_official | 41:e8b66477f5bf | 1400 | #define TMR16B0EMR_EMC2_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1401 | #define TMR16B0EMR_EMC3_MASK 0x0C00 // External Match Control 3. Determines the functionality of External Match 3. |
mbed_official | 41:e8b66477f5bf | 1402 | #define TMR16B0EMR_EMC3_SHIFT 10 |
mbed_official | 41:e8b66477f5bf | 1403 | |
mbed_official | 41:e8b66477f5bf | 1404 | /* TMR16B0CTCR - address 0x4000 C070 and TMR16B1CTCR - address 0x4001 0070 */ |
mbed_official | 41:e8b66477f5bf | 1405 | #define TMR16B0CTCR_CTM_MASK 0x0003 // Counter/Timer Mode. This field selects which rising PCLK 00 edges can increment Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). |
mbed_official | 41:e8b66477f5bf | 1406 | #define TMR16B0CTCR_CTM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1407 | |
mbed_official | 41:e8b66477f5bf | 1408 | /* TMR16B0PWMC - address 0x4000 C074 and TMR16B1PWMC- address 0x4001 0074 */ |
mbed_official | 41:e8b66477f5bf | 1409 | #define TMR16B0PWMC_PWMEN0 (1 << 0) // PWM channel0 enable |
mbed_official | 41:e8b66477f5bf | 1410 | #define TMR16B0PWMC_PWMEN1 (1 << 1) // PWM channel1 enable |
mbed_official | 41:e8b66477f5bf | 1411 | #define TMR16B0PWMC_PWMEN2 (1 << 2) // PWM channel2 enable |
mbed_official | 41:e8b66477f5bf | 1412 | #define TMR16B0PWMC_PWMEN3 (1 << 3) // PWM channel3 enable Note: It is recommended to use match channel 3 to set the PWM cycle because it is not pinned out. |
mbed_official | 41:e8b66477f5bf | 1413 | |
mbed_official | 41:e8b66477f5bf | 1414 | /* TMR16B0IR - address 0x4000 C000 and TMR16B1IR - address 0x4001 0000 */ |
mbed_official | 41:e8b66477f5bf | 1415 | #define TMR16B0IR_MR0INT (1 << 0) // Interrupt flag for match channel 0. |
mbed_official | 41:e8b66477f5bf | 1416 | #define TMR16B0IR_MR1INT (1 << 1) // Interrupt flag for match channel 1. |
mbed_official | 41:e8b66477f5bf | 1417 | #define TMR16B0IR_MR2INT (1 << 2) // Interrupt flag for match channel 2. |
mbed_official | 41:e8b66477f5bf | 1418 | #define TMR16B0IR_MR3INT (1 << 3) // Interrupt flag for match channel 3. |
mbed_official | 41:e8b66477f5bf | 1419 | #define TMR16B0IR_CR0INT (1 << 4) // Interrupt flag for capture channel 0 event. |
mbed_official | 41:e8b66477f5bf | 1420 | #define TMR16B0IR_CR1INT (1 << 5) // Interrupt flag for capture channel 1 event. |
mbed_official | 41:e8b66477f5bf | 1421 | |
mbed_official | 41:e8b66477f5bf | 1422 | /* TMR16B0TCR - address 0x4000 C004 and TMR16B1TCR - address 0x4001 0004 */ |
mbed_official | 41:e8b66477f5bf | 1423 | #define TMR16B0TCR_CEN (1 << 0) // Counter Enable. When one, the Timer Counter and Prescale Counter are enabled for counting. When zero, the counters are disabled. |
mbed_official | 41:e8b66477f5bf | 1424 | #define TMR16B0TCR_CRST (1 << 1) // Counter Reset. When one, the Timer Counter and the Prescale Counter are synchronously reset on the next positive edge of PCLK. The counters remain reset until TCR[1] is returned to zero. |
mbed_official | 41:e8b66477f5bf | 1425 | |
mbed_official | 41:e8b66477f5bf | 1426 | /* TMR16B0TC, address 0x4000 C008 and TMR16B1TC 0x4001 0008 */ |
mbed_official | 41:e8b66477f5bf | 1427 | #define TMR16B0TC_TC_MASK 0xFFFF // Timer counter value. |
mbed_official | 41:e8b66477f5bf | 1428 | #define TMR16B0TC_TC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1429 | |
mbed_official | 41:e8b66477f5bf | 1430 | /* TMR16B0PR, address 0x4000 C00C and TMR16B1PR 0x4001 000C */ |
mbed_official | 41:e8b66477f5bf | 1431 | #define TMR16B0PR_PR_MASK 0xFFFF // Prescale max value. |
mbed_official | 41:e8b66477f5bf | 1432 | #define TMR16B0PR_PR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1433 | |
mbed_official | 41:e8b66477f5bf | 1434 | /* TMR16B0PC, address 0x4001 C010 and TMR16B1PC 0x4000 0010 */ |
mbed_official | 41:e8b66477f5bf | 1435 | #define TMR16B0PC_PC_MASK 0xFFFF // Prescale counter value. |
mbed_official | 41:e8b66477f5bf | 1436 | #define TMR16B0PC_PC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1437 | |
mbed_official | 41:e8b66477f5bf | 1438 | /* TMR16B0MCR - address 0x4000 C014 and TMR16B1MCR - address 0x4001 0014 */ |
mbed_official | 41:e8b66477f5bf | 1439 | #define TMR16B0MCR_MR0I (1 << 0) // Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1440 | #define TMR16B0MCR_MR0R (1 << 1) // Reset on MR0: the TC will be reset if MR0 matches it. |
mbed_official | 41:e8b66477f5bf | 1441 | #define TMR16B0MCR_MR0S (1 << 2) // Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1442 | #define TMR16B0MCR_MR1I (1 << 3) // Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1443 | #define TMR16B0MCR_MR1R (1 << 4) // Reset on MR1: the TC will be reset if MR1 matches it. |
mbed_official | 41:e8b66477f5bf | 1444 | #define TMR16B0MCR_MR1S (1 << 5) // Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1445 | #define TMR16B0MCR_MR2I (1 << 6) // Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1446 | #define TMR16B0MCR_MR2R (1 << 7) // Reset on MR2: the TC will be reset if MR2 matches it. |
mbed_official | 41:e8b66477f5bf | 1447 | #define TMR16B0MCR_MR2S (1 << 8) // Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1448 | #define TMR16B0MCR_MR3I (1 << 9) // Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1449 | #define TMR16B0MCR_MR3R (1 << 10) // Reset on MR3: the TC will be reset if MR3 matches it. |
mbed_official | 41:e8b66477f5bf | 1450 | #define TMR16B0MCR_MR3S (1 << 11) // Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1451 | |
mbed_official | 41:e8b66477f5bf | 1452 | /* TMR16B0MR0 to 3, addresses 0x4000 C018 to 24 and TMR16B1MR0 to 3, addresses 0x4001 0018 to 24 */ |
mbed_official | 41:e8b66477f5bf | 1453 | #define TMR16B0MR0_to_3_MATCH_MASK 0xFFFF // Timer counter match value. |
mbed_official | 41:e8b66477f5bf | 1454 | #define TMR16B0MR0_to_3_MATCH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1455 | |
mbed_official | 41:e8b66477f5bf | 1456 | /* TMR16B0CCR - address 0x4000 C028 and TMR16B1CCR - address 0x4001 0028 */ |
mbed_official | 41:e8b66477f5bf | 1457 | #define TMR16B0CCR_CAP0RE (1 << 0) // Capture on CT16Bn_CAP0 rising edge: a sequence of 0 then 1 on CT16Bn_CAP0 will cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1458 | #define TMR16B0CCR_CAP0FE (1 << 1) // Capture on CT16Bn_CAP0 falling edge: a sequence of 1 then 0 on CT16Bn_CAP0 will 0 cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1459 | #define TMR16B0CCR_CAP0I (1 << 2) // Interrupt on CT16Bn_CAP0 event: a CR0 load due to a CT16Bn_CAP0 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1460 | #define TMR16B0CCR_CAP1RE (1 << 3) // Capture on CT16Bn_CAP1 rising edge: a sequence of 0 then 1 on CT16Bn_CAP1 will cause CR1 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1461 | #define TMR16B0CCR_CAP1FE (1 << 4) // Capture on CT16Bn_CAP1 falling edge: a sequence of 1 then 0 on CT16Bn_CAP1 will 0 cause CR1 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1462 | #define TMR16B0CCR_CAP1I (1 << 5) // Interrupt on CT16Bn_CAP1 event: a CR1 load due to a CT16Bn_CAP1 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1463 | |
mbed_official | 41:e8b66477f5bf | 1464 | /* TMR16B0EMR - address 0x4000 C03C and TMR16B1EMR - address 0x4001 003C */ |
mbed_official | 41:e8b66477f5bf | 1465 | #define TMR16B0EMR_EM0 (1 << 0) // External Match 0. This bit reflects the state of output CT16B0_MAT0/CT16B1_MAT0, 0 whether or not this output is connected to its pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[5:4] control the functionality of this output. This bit is driven to the CT16B0_MAT0/CT16B1_MAT0 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1466 | #define TMR16B0EMR_EM1 (1 << 1) // External Match 1. This bit reflects the state of output CT16B0_MAT1/CT16B1_MAT1, 0 whether or not this output is connected to its pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[7:6] control the functionality of this output. This bit is driven to the CT16B0_MAT1/CT16B1_MAT1 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1467 | #define TMR16B0EMR_EM2 (1 << 2) // External Match 2. This bit reflects the state of output match channel 2, whether or not 0 this output is connected to its pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[9:8] control the functionality of this output. Note that on counter/timer 0 this match channel is not pinned out. This bit is driven to the CT16B1_MAT2 pin if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1468 | #define TMR16B0EMR_EM3 (1 << 3) // External Match 3. This bit reflects the state of output of match channel 3. When a match 0 occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[11:10] control the functionality of this output. There is no output pin available for this channel on either of the 16-bit timers. |
mbed_official | 41:e8b66477f5bf | 1469 | #define TMR16B0EMR_EMC0_MASK 0x0030 // External Match Control 0. Determines the functionality of External Match 0. |
mbed_official | 41:e8b66477f5bf | 1470 | #define TMR16B0EMR_EMC0_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1471 | #define TMR16B0EMR_EMC1_MASK 0x00C0 // External Match Control 1. Determines the functionality of External Match 1. |
mbed_official | 41:e8b66477f5bf | 1472 | #define TMR16B0EMR_EMC1_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1473 | #define TMR16B0EMR_EMC2_MASK 0x0300 // External Match Control 2. Determines the functionality of External Match 2. |
mbed_official | 41:e8b66477f5bf | 1474 | #define TMR16B0EMR_EMC2_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1475 | #define TMR16B0EMR_EMC3_MASK 0x0C00 // External Match Control 3. Determines the functionality of External Match 3. |
mbed_official | 41:e8b66477f5bf | 1476 | #define TMR16B0EMR_EMC3_SHIFT 10 |
mbed_official | 41:e8b66477f5bf | 1477 | |
mbed_official | 41:e8b66477f5bf | 1478 | /* TMR16B0CTCR - address 0x4000 C070 and TMR16B1CTCR - address 0x4001 0070 */ |
mbed_official | 41:e8b66477f5bf | 1479 | #define TMR16B0CTCR_CTM_MASK 0x0003 // Counter/Timer Mode. This field selects which rising PCLK 00 edges can increment Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). |
mbed_official | 41:e8b66477f5bf | 1480 | #define TMR16B0CTCR_CTM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1481 | #define TMR16B0CTCR_SELCC_MASK 0x00E0 // When bit 4 is one, these bits select which capture input edge 0 will cause the timer and prescaler to be cleared. These bits have no effect when bit 4 is zero. |
mbed_official | 41:e8b66477f5bf | 1482 | #define TMR16B0CTCR_SELCC_SHIFT 5 |
mbed_official | 41:e8b66477f5bf | 1483 | |
mbed_official | 41:e8b66477f5bf | 1484 | /* TMR16B0PWMC - address 0x4000 C074 and TMR16B1PWMC- address 0x4001 0074 */ |
mbed_official | 41:e8b66477f5bf | 1485 | #define TMR16B0PWMC_PWMEN0 (1 << 0) // PWM channel0 enable |
mbed_official | 41:e8b66477f5bf | 1486 | #define TMR16B0PWMC_PWMEN1 (1 << 1) // PWM channel1 enable |
mbed_official | 41:e8b66477f5bf | 1487 | #define TMR16B0PWMC_PWMEN2 (1 << 2) // PWM channel2 enable |
mbed_official | 41:e8b66477f5bf | 1488 | #define TMR16B0PWMC_PWMEN3 (1 << 3) // PWM channel3 enable Note: It is recommended to use match channel 3 to set the PWM cycle because it is not pinned out. |
mbed_official | 41:e8b66477f5bf | 1489 | |
mbed_official | 41:e8b66477f5bf | 1490 | /* TMR32B0IR - address 0x4001 4000 and TMR32B1IR - address 0x4001 8000 */ |
mbed_official | 41:e8b66477f5bf | 1491 | #define TMR32B0IR_MR0_INTERRUPT (1 << 0) // Interrupt flag for match channel 0. |
mbed_official | 41:e8b66477f5bf | 1492 | #define TMR32B0IR_MR1_INTERRUPT (1 << 1) // Interrupt flag for match channel 1. |
mbed_official | 41:e8b66477f5bf | 1493 | #define TMR32B0IR_MR2_INTERRUPT (1 << 2) // Interrupt flag for match channel 2. |
mbed_official | 41:e8b66477f5bf | 1494 | #define TMR32B0IR_MR3_INTERRUPT (1 << 3) // Interrupt flag for match channel 3. |
mbed_official | 41:e8b66477f5bf | 1495 | #define TMR32B0IR_CR0_INTERRUPT (1 << 4) // Interrupt flag for capture channel 0 event. |
mbed_official | 41:e8b66477f5bf | 1496 | |
mbed_official | 41:e8b66477f5bf | 1497 | /* TMR32B0TCR - address 0x4001 4004 and TMR32B1TCR - address 0x4001 8004 */ |
mbed_official | 41:e8b66477f5bf | 1498 | #define TMR32B0TCR_CEN (1 << 0) // When one, the Timer Counter and Prescale Counter are 0 enabled for counting. When zero, the counters are disabled. |
mbed_official | 41:e8b66477f5bf | 1499 | #define TMR32B0TCR_CRST (1 << 1) // When one, the Timer Counter and the Prescale Counter 0 are synchronously reset on the next positive edge of PCLK. The counters remain reset until TCR[1] is returned to zero. |
mbed_official | 41:e8b66477f5bf | 1500 | |
mbed_official | 41:e8b66477f5bf | 1501 | /* TMR32B0TC, address 0x4001 4008 and TMR32B1TC 0x4001 8008 */ |
mbed_official | 41:e8b66477f5bf | 1502 | #define TMR32B0TC_TC_MASK 0xFFFFFFFF // Timer counter value. |
mbed_official | 41:e8b66477f5bf | 1503 | #define TMR32B0TC_TC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1504 | |
mbed_official | 41:e8b66477f5bf | 1505 | /* TMR32B0PR, address 0x4001 400C and TMR32B1PR 0x4001 800C */ |
mbed_official | 41:e8b66477f5bf | 1506 | #define TMR32B0PR_PR_MASK 0xFFFFFFFF // Prescale value. |
mbed_official | 41:e8b66477f5bf | 1507 | #define TMR32B0PR_PR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1508 | |
mbed_official | 41:e8b66477f5bf | 1509 | /* TMR32B0PC, address 0x4001 4010 and TMR32B1PC 0x4001 8010 */ |
mbed_official | 41:e8b66477f5bf | 1510 | #define TMR32B0PC_PC_MASK 0xFFFFFFFF // Prescale counter value. |
mbed_official | 41:e8b66477f5bf | 1511 | #define TMR32B0PC_PC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1512 | |
mbed_official | 41:e8b66477f5bf | 1513 | /* TMR32B0MCR - address 0x4001 4014 and TMR32B1MCR - address 0x4001 8014 */ |
mbed_official | 41:e8b66477f5bf | 1514 | #define TMR32B0MCR_MR0I (1 << 0) // Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1515 | #define TMR32B0MCR_MR0R (1 << 1) // Reset on MR0: the TC will be reset if MR0 matches it. |
mbed_official | 41:e8b66477f5bf | 1516 | #define TMR32B0MCR_MR0S (1 << 2) // Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1517 | #define TMR32B0MCR_MR1I (1 << 3) // Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1518 | #define TMR32B0MCR_MR1R (1 << 4) // Reset on MR1: the TC will be reset if MR1 matches it. |
mbed_official | 41:e8b66477f5bf | 1519 | #define TMR32B0MCR_MR1S (1 << 5) // Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1520 | #define TMR32B0MCR_MR2I (1 << 6) // Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1521 | #define TMR32B0MCR_MR2R (1 << 7) // Reset on MR2: the TC will be reset if MR2 matches it. |
mbed_official | 41:e8b66477f5bf | 1522 | #define TMR32B0MCR_MR2S (1 << 8) // Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1523 | #define TMR32B0MCR_MR3I (1 << 9) // Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1524 | #define TMR32B0MCR_MR3R (1 << 10) // Reset on MR3: the TC will be reset if MR3 matches it. |
mbed_official | 41:e8b66477f5bf | 1525 | #define TMR32B0MCR_MR3S (1 << 11) // Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1526 | |
mbed_official | 41:e8b66477f5bf | 1527 | /* TMR32B0MR0 to 3, addresses 0x4001 4018 to 24 and TMR32B1MR0 to 3, addresses 0x4001 8018 to 24 */ |
mbed_official | 41:e8b66477f5bf | 1528 | #define TMR32B0MRn_MATCH_MASK 0xFFFFFFFF // Timer counter match value. |
mbed_official | 41:e8b66477f5bf | 1529 | #define TMR32B0MRn_MATCH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1530 | |
mbed_official | 41:e8b66477f5bf | 1531 | /* TMR32B0CCR - address 0x4001 4028 and TMR32B1CCR - address 0x4001 8028 */ |
mbed_official | 41:e8b66477f5bf | 1532 | #define TMR32B0CCR_CAP0RE (1 << 0) // Capture on CT32Bn_CAP0 rising edge: a sequence of 0 then 1 on CT32Bn_CAP0 will cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1533 | #define TMR32B0CCR_CAP0FE (1 << 1) // Capture on CT32Bn_CAP0 falling edge: a sequence of 1 then 0 on CT32Bn_CAP0 will 0 cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1534 | #define TMR32B0CCR_CAP0I (1 << 2) // Interrupt on CT32Bn_CAP0 event: a CR0 load due to a CT32Bn_CAP0 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1535 | |
mbed_official | 41:e8b66477f5bf | 1536 | /* TMR32B0CR0, addresses 0x4001 402C and TMR32B1CR0, addresses 0x4001 802C */ |
mbed_official | 41:e8b66477f5bf | 1537 | #define TMR32B0CR0_CAP_MASK 0xFFFFFFFF // Timer counter capture value. |
mbed_official | 41:e8b66477f5bf | 1538 | #define TMR32B0CR0_CAP_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1539 | |
mbed_official | 41:e8b66477f5bf | 1540 | /* TMR32B0EMR - address 0x4001 403C and TMR32B1EMR - address0x4001 803C */ |
mbed_official | 41:e8b66477f5bf | 1541 | #define TMR32B0EMR_EM0 (1 << 0) // External Match 0. This bit reflects the state of output CT32Bn_MAT0, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[5:4] control the functionality of this output. This bit is driven to the CT32B0_MAT0/CT16B1_MAT0 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1542 | #define TMR32B0EMR_EM1 (1 << 1) // External Match 1. This bit reflects the state of output CT32Bn_MAT1, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[7:6] control the functionality of this output. This bit is driven to the CT32B0_MAT1/CT16B1_MAT1 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1543 | #define TMR32B0EMR_EM2 (1 << 2) // External Match 2. This bit reflects the state of output CT32Bn_MAT2, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[9:8] control the functionality of this output. This bit is driven to the CT32B0_MAT2/CT16B1_MAT2 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1544 | #define TMR32B0EMR_EM3 (1 << 3) // External Match 3. This bit reflects the state of output CT32Bn_MAT3, whether or not this output is connected to its pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[11:10] control the functionality of this output. This bit is driven to the CT32B0_MAT3/CT16B1_MAT3 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1545 | #define TMR32B0EMR_EMC0_MASK 0x0030 // External Match Control 0. Determines the functionality of External Match 0. |
mbed_official | 41:e8b66477f5bf | 1546 | #define TMR32B0EMR_EMC0_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1547 | #define TMR32B0EMR_EMC1_MASK 0x00C0 // External Match Control 1. Determines the functionality of External Match 1. |
mbed_official | 41:e8b66477f5bf | 1548 | #define TMR32B0EMR_EMC1_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1549 | #define TMR32B0EMR_EMC2_MASK 0x0300 // External Match Control 2. Determines the functionality of External Match 2. |
mbed_official | 41:e8b66477f5bf | 1550 | #define TMR32B0EMR_EMC2_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1551 | #define TMR32B0EMR_EMC3_MASK 0x0C00 // External Match Control 3. Determines the functionality of External Match 3. |
mbed_official | 41:e8b66477f5bf | 1552 | #define TMR32B0EMR_EMC3_SHIFT 10 |
mbed_official | 41:e8b66477f5bf | 1553 | |
mbed_official | 41:e8b66477f5bf | 1554 | /* TMR32B0CTCR - address 0x4001 4070 and TMR32B1TCR - address 0x4001 8070 */ |
mbed_official | 41:e8b66477f5bf | 1555 | #define TMR32B0CTCR_CTM_MASK 0x0003 // Counter/Timer Mode. This field selects which rising PCLK edges can increment Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). Timer Mode: every rising PCLK edge |
mbed_official | 41:e8b66477f5bf | 1556 | #define TMR32B0CTCR_CTM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1557 | #define TMR32B0CTCR_CIS_MASK 0x000C // Count Input Select. When bits 1:0 in this register are not 00, these bits select which CAP pin is sampled for clocking: |
mbed_official | 41:e8b66477f5bf | 1558 | #define TMR32B0CTCR_CIS_SHIFT 2 |
mbed_official | 41:e8b66477f5bf | 1559 | |
mbed_official | 41:e8b66477f5bf | 1560 | /* TMR32B0PWMC - 0x4001 4074 and TMR32B1PWMC - 0x4001 8074 */ |
mbed_official | 41:e8b66477f5bf | 1561 | #define TMR32B0PWMC_PWMEN0 (1 << 0) // PWM channel 0 enable |
mbed_official | 41:e8b66477f5bf | 1562 | #define TMR32B0PWMC_PWMEN1 (1 << 1) // PWM channel 1 enable |
mbed_official | 41:e8b66477f5bf | 1563 | #define TMR32B0PWMC_PWMEN2 (1 << 2) // PWM channel 2 enable |
mbed_official | 41:e8b66477f5bf | 1564 | #define TMR32B0PWMC_PWMEN3 (1 << 3) // PWM channel 3 enable Note: It is recommended to use match channel 3 to set the PWM cycle. |
mbed_official | 41:e8b66477f5bf | 1565 | |
mbed_official | 41:e8b66477f5bf | 1566 | /* TMR32B0IR - address 0x4001 4000 and TMR32B1IR - address 0x4001 8000 */ |
mbed_official | 41:e8b66477f5bf | 1567 | #define TMR32B0IR_MR0INT (1 << 0) // Interrupt flag for match channel 0. |
mbed_official | 41:e8b66477f5bf | 1568 | #define TMR32B0IR_MR1INT (1 << 1) // Interrupt flag for match channel 1. |
mbed_official | 41:e8b66477f5bf | 1569 | #define TMR32B0IR_MR2INT (1 << 2) // Interrupt flag for match channel 2. |
mbed_official | 41:e8b66477f5bf | 1570 | #define TMR32B0IR_MR3INT (1 << 3) // Interrupt flag for match channel 3. |
mbed_official | 41:e8b66477f5bf | 1571 | #define TMR32B0IR_CR0INT (1 << 4) // Interrupt flag for capture channel 0 event. |
mbed_official | 41:e8b66477f5bf | 1572 | #define TMR32B0IR_CR1INT (1 << 5) // Interrupt flag for capture channel 1 event. |
mbed_official | 41:e8b66477f5bf | 1573 | |
mbed_official | 41:e8b66477f5bf | 1574 | /* TMR32B0TCR - address 0x4001 4004 and TMR32B1TCR - address 0x4001 8004 */ |
mbed_official | 41:e8b66477f5bf | 1575 | #define TMR32B0TCR_CEN (1 << 0) // When one, the Timer Counter and Prescale Counter are 0 enabled for counting. When zero, the counters are disabled. |
mbed_official | 41:e8b66477f5bf | 1576 | #define TMR32B0TCR_CRST (1 << 1) // When one, the Timer Counter and the Prescale Counter 0 are synchronously reset on the next positive edge of PCLK. The counters remain reset until TCR[1] is returned to zero. |
mbed_official | 41:e8b66477f5bf | 1577 | |
mbed_official | 41:e8b66477f5bf | 1578 | /* TMR32B0TC, address 0x4001 4008 and TMR32B1TC 0x4001 8008 */ |
mbed_official | 41:e8b66477f5bf | 1579 | #define TMR32B0TC_TC_MASK 0xFFFFFFFF // Timer counter value. |
mbed_official | 41:e8b66477f5bf | 1580 | #define TMR32B0TC_TC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1581 | |
mbed_official | 41:e8b66477f5bf | 1582 | /* TMR32B0PR, address 0x4001 400C and TMR32B1PR 0x4001 800C */ |
mbed_official | 41:e8b66477f5bf | 1583 | #define TMR32B0PR_PR_MASK 0xFFFFFFFF // Prescale value. |
mbed_official | 41:e8b66477f5bf | 1584 | #define TMR32B0PR_PR_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1585 | |
mbed_official | 41:e8b66477f5bf | 1586 | /* TMR32B0PC, address 0x4001 4010 and TMR32B1PC 0x4001 8010 */ |
mbed_official | 41:e8b66477f5bf | 1587 | #define TMR32B0PC_PC_MASK 0xFFFFFFFF // Prescale counter value. |
mbed_official | 41:e8b66477f5bf | 1588 | #define TMR32B0PC_PC_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1589 | |
mbed_official | 41:e8b66477f5bf | 1590 | /* TMR32B0MCR - address 0x4001 4014 and TMR32B1MCR - address 0x4001 8014 */ |
mbed_official | 41:e8b66477f5bf | 1591 | #define TMR32B0MCR_MR0I (1 << 0) // Interrupt on MR0: an interrupt is generated when MR0 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1592 | #define TMR32B0MCR_MR0R (1 << 1) // Reset on MR0: the TC will be reset if MR0 matches it. |
mbed_official | 41:e8b66477f5bf | 1593 | #define TMR32B0MCR_MR0S (1 << 2) // Stop on MR0: the TC and PC will be stopped and TCR[0] will be set to 0 if MR0 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1594 | #define TMR32B0MCR_MR1I (1 << 3) // Interrupt on MR1: an interrupt is generated when MR1 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1595 | #define TMR32B0MCR_MR1R (1 << 4) // Reset on MR1: the TC will be reset if MR1 matches it. |
mbed_official | 41:e8b66477f5bf | 1596 | #define TMR32B0MCR_MR1S (1 << 5) // Stop on MR1: the TC and PC will be stopped and TCR[0] will be set to 0 if MR1 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1597 | #define TMR32B0MCR_MR2I (1 << 6) // Interrupt on MR2: an interrupt is generated when MR2 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1598 | #define TMR32B0MCR_MR2R (1 << 7) // Reset on MR2: the TC will be reset if MR2 matches it. |
mbed_official | 41:e8b66477f5bf | 1599 | #define TMR32B0MCR_MR2S (1 << 8) // Stop on MR2: the TC and PC will be stopped and TCR[0] will be set to 0 if MR2 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1600 | #define TMR32B0MCR_MR3I (1 << 9) // Interrupt on MR3: an interrupt is generated when MR3 matches the value in the TC. |
mbed_official | 41:e8b66477f5bf | 1601 | #define TMR32B0MCR_MR3R (1 << 10) // Reset on MR3: the TC will be reset if MR3 matches it. |
mbed_official | 41:e8b66477f5bf | 1602 | #define TMR32B0MCR_MR3S (1 << 11) // Stop on MR3: the TC and PC will be stopped and TCR[0] will be set to 0 if MR3 matches 0 the TC. |
mbed_official | 41:e8b66477f5bf | 1603 | |
mbed_official | 41:e8b66477f5bf | 1604 | /* TMR32B0MR0 to 3, addresses 0x4001 4018 to 24 and TMR32B1MR0 to 3, addresses 0x4001 8018 to 24 */ |
mbed_official | 41:e8b66477f5bf | 1605 | #define TMR32B0MRn_MATCH_MASK 0xFFFFFFFF // Timer counter match value. |
mbed_official | 41:e8b66477f5bf | 1606 | #define TMR32B0MRn_MATCH_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1607 | |
mbed_official | 41:e8b66477f5bf | 1608 | /* TMR32B0CCR - address 0x4001 4028 and TMR32B1CCR - address 0x4001 8028 */ |
mbed_official | 41:e8b66477f5bf | 1609 | #define TMR32B0CCR_CAP0RE (1 << 0) // Capture on CT32Bn_CAP0 rising edge: a sequence of 0 then 1 on CT32Bn_CAP0 will cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1610 | #define TMR32B0CCR_CAP0FE (1 << 1) // Capture on CT32Bn_CAP0 falling edge: a sequence of 1 then 0 on CT32Bn_CAP0 will 0 cause CR0 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1611 | #define TMR32B0CCR_CAP0I (1 << 2) // Interrupt on CT32Bn_CAP0 event: a CR0 load due to a CT32Bn_CAP0 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1612 | #define TMR32B0CCR_CAP1RE (1 << 3) // Capture on CT32Bn_CAP1 rising edge: a sequence of 0 then 1 on CT32Bn_CAP1 will cause CR1 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1613 | #define TMR32B0CCR_CAP1FE (1 << 4) // Capture on CT32Bn_CAP1 falling edge: a sequence of 1 then 0 on CT32Bn_CAP1 will 0 cause CR1 to be loaded with the contents of TC. |
mbed_official | 41:e8b66477f5bf | 1614 | #define TMR32B0CCR_CAP1I (1 << 5) // Interrupt on CT32Bn_CAP1 event: a CR1 load due to a CT32Bn_CAP1 event will generate an interrupt. |
mbed_official | 41:e8b66477f5bf | 1615 | |
mbed_official | 41:e8b66477f5bf | 1616 | /* TMR32B0EMR - address 0x4001 403C and TMR32B1EMR - address0x4001 803C */ |
mbed_official | 41:e8b66477f5bf | 1617 | #define TMR32B0EMR_EM0 (1 << 0) // External Match 0. This bit reflects the state of output CT32Bn_MAT0, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR0, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[5:4] control the functionality of this output. This bit is driven to the CT32B0_MAT0/CT16B1_MAT0 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1618 | #define TMR32B0EMR_EM1 (1 << 1) // External Match 1. This bit reflects the state of output CT32Bn_MAT1, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR1, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[7:6] control the functionality of this output. This bit is driven to the CT32B0_MAT1/CT16B1_MAT1 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1619 | #define TMR32B0EMR_EM2 (1 << 2) // External Match 2. This bit reflects the state of output CT32Bn_MAT2, whether or not this 0 output is connected to its pin. When a match occurs between the TC and MR2, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[9:8] control the functionality of this output. This bit is driven to the CT32B0_MAT2/CT16B1_MAT2 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1620 | #define TMR32B0EMR_EM3 (1 << 3) // External Match 3. This bit reflects the state of output CT32Bn_MAT3, whether or not this output is connected to its pin. When a match occurs between the TC and MR3, this bit can either toggle, go LOW, go HIGH, or do nothing. Bits EMR[11:10] control the functionality of this output. This bit is driven to the CT32B0_MAT3/CT16B1_MAT3 pins if the match function is selected in the IOCON registers (0 = LOW, 1 = HIGH). |
mbed_official | 41:e8b66477f5bf | 1621 | #define TMR32B0EMR_EMC0_MASK 0x0030 // External Match Control 0. Determines the functionality of External Match 0. |
mbed_official | 41:e8b66477f5bf | 1622 | #define TMR32B0EMR_EMC0_SHIFT 4 |
mbed_official | 41:e8b66477f5bf | 1623 | #define TMR32B0EMR_EMC1_MASK 0x00C0 // External Match Control 1. Determines the functionality of External Match 1. |
mbed_official | 41:e8b66477f5bf | 1624 | #define TMR32B0EMR_EMC1_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1625 | #define TMR32B0EMR_EMC2_MASK 0x0300 // External Match Control 2. Determines the functionality of External Match 2. |
mbed_official | 41:e8b66477f5bf | 1626 | #define TMR32B0EMR_EMC2_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1627 | #define TMR32B0EMR_EMC3_MASK 0x0C00 // External Match Control 3. Determines the functionality of External Match 3. |
mbed_official | 41:e8b66477f5bf | 1628 | #define TMR32B0EMR_EMC3_SHIFT 10 |
mbed_official | 41:e8b66477f5bf | 1629 | |
mbed_official | 41:e8b66477f5bf | 1630 | /* TMR32B0CTCR - address 0x4001 4070 and TMR32B1TCR - address 0x4001 8070 */ |
mbed_official | 41:e8b66477f5bf | 1631 | #define TMR32B0CTCR_CTM_MASK 0x0003 // Counter/Timer Mode. This field selects which rising PCLK edges can increment Timer's Prescale Counter (PC), or clear PC and increment Timer Counter (TC). Timer Mode: every rising PCLK edge |
mbed_official | 41:e8b66477f5bf | 1632 | #define TMR32B0CTCR_CTM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1633 | #define TMR32B0CTCR_CIS_MASK 0x000C // Count Input Select. When bits 1:0 in this register are not 00, these bits select which CAP pin is sampled for clocking: |
mbed_official | 41:e8b66477f5bf | 1634 | #define TMR32B0CTCR_CIS_SHIFT 2 |
mbed_official | 41:e8b66477f5bf | 1635 | #define TMR32B0CTCR_ENCC (1 << 4) // Setting this bit to one enables clearing of the timer and the prescaler when the capture-edge event specified in bits 7:5 occurs. |
mbed_official | 41:e8b66477f5bf | 1636 | #define TMR32B0CTCR_SELCC_MASK 0x00E0 // When bit 4 is one, these bits select which capture input edge 0 will cause the timer and prescaler to be cleared. These bits have no effect when bit 4 is zero. |
mbed_official | 41:e8b66477f5bf | 1637 | #define TMR32B0CTCR_SELCC_SHIFT 5 |
mbed_official | 41:e8b66477f5bf | 1638 | |
mbed_official | 41:e8b66477f5bf | 1639 | /* TMR32B0PWMC - 0x4001 4074 and TMR32B1PWMC - 0x4001 8074 */ |
mbed_official | 41:e8b66477f5bf | 1640 | #define TMR32B0PWMC_PWMEN0 (1 << 0) // PWM channel 0 enable |
mbed_official | 41:e8b66477f5bf | 1641 | #define TMR32B0PWMC_PWMEN1 (1 << 1) // PWM channel 1 enable |
mbed_official | 41:e8b66477f5bf | 1642 | #define TMR32B0PWMC_PWMEN2 (1 << 2) // PWM channel 2 enable |
mbed_official | 41:e8b66477f5bf | 1643 | #define TMR32B0PWMC_PWMEN3 (1 << 3) // PWM channel 3 enable Note: It is recommended to use match channel 3 to set the PWM cycle. |
mbed_official | 41:e8b66477f5bf | 1644 | |
mbed_official | 41:e8b66477f5bf | 1645 | /* WDMOD - 0x4000 4000 */ |
mbed_official | 41:e8b66477f5bf | 1646 | #define WDMOD_WDEN (1 << 0) // Watchdog enable bit. This bit is Set Only. Remark: Setting this bit to one also locks the watchdog clock source. Once the watchdog timer is enabled, the watchdog timer clock source cannot be changed. If the watchdog timer is needed in Deep-sleep mode, the watchdog clock source must be changed to the watchdog oscillator before setting this bit to one. |
mbed_official | 41:e8b66477f5bf | 1647 | #define WDMOD_WDRESET (1 << 1) // Watchdog reset enable bit. This bit is Set Only. |
mbed_official | 41:e8b66477f5bf | 1648 | #define WDMOD_WDTOF (1 << 2) // Watchdog time-out flag. Set when the watchdog timer times out, by a feed error, or by events associated with WDPROTECT, cleared by software. Causes a chip reset if WDRESET = 1. |
mbed_official | 41:e8b66477f5bf | 1649 | #define WDMOD_WDINT (1 << 3) // Watchdog interrupt flag. Set when the timer reaches the value in WDWARNINT. Cleared by software. |
mbed_official | 41:e8b66477f5bf | 1650 | #define WDMOD_WDPROTECT (1 << 4) // Watchdog update mode. This bit is Set Only. |
mbed_official | 41:e8b66477f5bf | 1651 | |
mbed_official | 41:e8b66477f5bf | 1652 | /* WDTC - 0x4000 4004 */ |
mbed_official | 41:e8b66477f5bf | 1653 | #define WDTC_COUNT_MASK 0xFFFFFF // Watchdog time-out interval. |
mbed_official | 41:e8b66477f5bf | 1654 | #define WDTC_COUNT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1655 | |
mbed_official | 41:e8b66477f5bf | 1656 | /* WDFEED - 0x4000 4008 */ |
mbed_official | 41:e8b66477f5bf | 1657 | #define WDFEED_FEED_MASK 0x00FF // Feed value should be 0xAA followed by 0x55. |
mbed_official | 41:e8b66477f5bf | 1658 | #define WDFEED_FEED_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1659 | |
mbed_official | 41:e8b66477f5bf | 1660 | /* WDTV - 0x4000 400C */ |
mbed_official | 41:e8b66477f5bf | 1661 | #define WDTV_COUNT_MASK 0xFFFFFF // Counter timer value. |
mbed_official | 41:e8b66477f5bf | 1662 | #define WDTV_COUNT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1663 | |
mbed_official | 41:e8b66477f5bf | 1664 | /* WDWARNINT - 0x4000 4014 */ |
mbed_official | 41:e8b66477f5bf | 1665 | #define WDWARNINT_WARNINT_MASK 0x03FF // Watchdog warning interrupt compare value. |
mbed_official | 41:e8b66477f5bf | 1666 | #define WDWARNINT_WARNINT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1667 | |
mbed_official | 41:e8b66477f5bf | 1668 | /* WDWINDOW - 0x4000 4018 */ |
mbed_official | 41:e8b66477f5bf | 1669 | #define WDWINDOW_WINDOW_MASK 0xFFFFFF // Watchdog window value. |
mbed_official | 41:e8b66477f5bf | 1670 | #define WDWINDOW_WINDOW_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1671 | |
mbed_official | 41:e8b66477f5bf | 1672 | /* WDMOD - address 0x4000 4000 */ |
mbed_official | 41:e8b66477f5bf | 1673 | #define WDMOD_WDEN (1 << 0) // WDEN Watchdog enable bit (Set Only). When 1, the watchdog timer is running. Remark: Setting this bit to one also locks the watchdog clock source. Once the watchdog timer is enabled, the watchdog timer clock source cannot be changed. If the watchdog timer is needed in Deep-sleep mode, the watchdog clock source must be changed to the watchdog oscillator before setting this bit to one. The clock source lock feature is not available on all parts, see Section 23.1). |
mbed_official | 41:e8b66477f5bf | 1674 | #define WDMOD_WDRESET_WDRESET (1 << 1) // Watchdog reset enable bit (Set Only). When 1, og time-out will cause a chip reset. |
mbed_official | 41:e8b66477f5bf | 1675 | #define WDMOD_WDTOF (1 << 2) // WDTOF Watchdog time-out flag. Set when the watchdog |
mbed_official | 41:e8b66477f5bf | 1676 | #define WDMOD_WDINT (1 << 3) // WDINT Watchdog interrupt flag (Read Only, not clearable by software). |
mbed_official | 41:e8b66477f5bf | 1677 | |
mbed_official | 41:e8b66477f5bf | 1678 | /* WDTC - address 0x4000 4004 */ |
mbed_official | 41:e8b66477f5bf | 1679 | #define WDTC_COUNT_MASK 0xFFFFFF // Watchdog time-out interval. |
mbed_official | 41:e8b66477f5bf | 1680 | #define WDTC_COUNT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1681 | |
mbed_official | 41:e8b66477f5bf | 1682 | /* WDFEED - address 0x4000 4008 */ |
mbed_official | 41:e8b66477f5bf | 1683 | #define WDFEED_FEED_MASK 0x00FF // Feed value should be 0xAA followed by 0x55. |
mbed_official | 41:e8b66477f5bf | 1684 | #define WDFEED_FEED_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1685 | |
mbed_official | 41:e8b66477f5bf | 1686 | /* WDTV - address 0x4000 000C */ |
mbed_official | 41:e8b66477f5bf | 1687 | #define WDTV_COUNT_MASK 0xFFFFFF // Counter timer value. |
mbed_official | 41:e8b66477f5bf | 1688 | #define WDTV_COUNT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1689 | |
mbed_official | 41:e8b66477f5bf | 1690 | /* SYST_CSR - 0xE000 E010 */ |
mbed_official | 41:e8b66477f5bf | 1691 | #define SYST_CSR_ENABLE (1 << 0) // System Tick counter enable. When 1, the counter is enabled. When 0, the counter is disabled. |
mbed_official | 41:e8b66477f5bf | 1692 | #define SYST_CSR_TICKINT (1 << 1) // System Tick interrupt enable. When 1, the System Tick interrupt 0 is enabled. When 0, the System Tick interrupt is disabled. When enabled, the interrupt is generated when the System Tick counter counts down to 0. |
mbed_official | 41:e8b66477f5bf | 1693 | #define SYST_CSR_CLKSOURCE (1 << 2) // System Tick clock source selection. When 1, the system clock (CPU) clock is selected. When 0, the system clock/2 is selected as the reference clock. |
mbed_official | 41:e8b66477f5bf | 1694 | #define SYST_CSR_COUNTFLAG (1 << 16) // Returns 1 if the SysTick timer counted to 0 since the last read of this register. Reserved, user software should not write ones to reserved bits. The value read from a reserved bit is not defined. |
mbed_official | 41:e8b66477f5bf | 1695 | |
mbed_official | 41:e8b66477f5bf | 1696 | /* SYST_RVR - 0xE000 E014 */ |
mbed_official | 41:e8b66477f5bf | 1697 | #define SYST_RVR_RELOAD_MASK 0xFFFFFF // This is the value that is loaded into the System Tick counter when it 0 counts down to 0. |
mbed_official | 41:e8b66477f5bf | 1698 | #define SYST_RVR_RELOAD_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1699 | |
mbed_official | 41:e8b66477f5bf | 1700 | /* SYST_CVR - 0xE000 E018 */ |
mbed_official | 41:e8b66477f5bf | 1701 | #define SYST_CVR_CURRENT_MASK 0xFFFFFF // Reading this register returns the current value of the System Tick counter. Writing any value clears the System Tick counter and the COUNTFLAG bit in STCTRL. |
mbed_official | 41:e8b66477f5bf | 1702 | #define SYST_CVR_CURRENT_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1703 | |
mbed_official | 41:e8b66477f5bf | 1704 | /* SYST_CALIB - 0xE000 E01C */ |
mbed_official | 41:e8b66477f5bf | 1705 | #define SYST_CALIB_TENMS_MASK 0xFFFFFF // See Table 461. |
mbed_official | 41:e8b66477f5bf | 1706 | #define SYST_CALIB_TENMS_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1707 | #define SYST_CALIB_SKEW (1 << 30) // See Table 461. |
mbed_official | 41:e8b66477f5bf | 1708 | #define SYST_CALIB_NOREF (1 << 31) // See Table 461. |
mbed_official | 41:e8b66477f5bf | 1709 | |
mbed_official | 41:e8b66477f5bf | 1710 | /* AD0CR - address 0x4001 C000 */ |
mbed_official | 41:e8b66477f5bf | 1711 | #define AD0CR_SEL_MASK 0x00FF // Selects which of the AD7:0 pins is (are) to be sampled and converted. Bit 0 selects Pin 0x00 AD0, bit 1 selects pin AD1,..., and bit 7 selects pin AD7. In software-controlled mode (BURST = 0), only one channel can be selected, i.e. only one of these bits should be 1. In hardware scan mode (BURST = 1), any numbers of channels can be selected, i.e any or all bits can be set to 1. If all bits are set to 0, channel 0 is selected automatically (SEL = 0x01). |
mbed_official | 41:e8b66477f5bf | 1712 | #define AD0CR_SEL_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1713 | #define AD0CR_CLKDIV_MASK 0xFF00 // The APB clock (PCLK) is divided by CLKDIV +1 to produce the clock for the ADC, which 0 should be less than or equal to 4.5 MHz. Typically, software should program the smallest value in this field that yields a clock of 4.5 MHz or slightly less, but in certain cases (such as a high-impedance analog source) a slower clock may be desirable. |
mbed_official | 41:e8b66477f5bf | 1714 | #define AD0CR_CLKDIV_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1715 | #define AD0CR_BURST (1 << 16) // Burst mode Remark: If BURST is set to 1, the ADGINTEN bit in the AD0INTEN register (Table 365) must be set to 0. |
mbed_official | 41:e8b66477f5bf | 1716 | #define AD0CR_CLKS_MASK 0xE0000 // This field selects the number of clocks used for each conversion in Burst mode, and the number of bits of accuracy of the result in the LS bits of ADDR, between 11 clocks (10 bits) and 4 clocks (3 bits). |
mbed_official | 41:e8b66477f5bf | 1717 | #define AD0CR_CLKS_SHIFT 17 |
mbed_official | 41:e8b66477f5bf | 1718 | #define AD0CR_START_MASK 0x7000000 // When the BURST bit is 0, these bits control whether and when an A/D conversion is started: |
mbed_official | 41:e8b66477f5bf | 1719 | #define AD0CR_START_SHIFT 24 |
mbed_official | 41:e8b66477f5bf | 1720 | #define AD0CR_EDGE (1 << 27) // This bit is significant only when the START field contains 010-111. In these cases: |
mbed_official | 41:e8b66477f5bf | 1721 | |
mbed_official | 41:e8b66477f5bf | 1722 | /* AD0GDR - address 0x4001 C004 */ |
mbed_official | 41:e8b66477f5bf | 1723 | #define AD0GDR_V_VREF_MASK 0xFFC0 // When DONE is 1, this field contains a binary fraction representing X the voltage on the ADn pin selected by the SEL field, divided by the voltage on the VDD pin. Zero in the field indicates that the voltage on the ADn pin was less than, equal to, or close to that on VSS, while 0x3FF indicates that the voltage on ADn was close to, equal to, or greater than that on VREF. |
mbed_official | 41:e8b66477f5bf | 1724 | #define AD0GDR_V_VREF_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1725 | #define AD0GDR_CHN_MASK 0x7000000 // These bits contain the channel from which the result bits V_VREF X were converted. |
mbed_official | 41:e8b66477f5bf | 1726 | #define AD0GDR_CHN_SHIFT 24 |
mbed_official | 41:e8b66477f5bf | 1727 | #define AD0GDR_OVERRUN (1 << 30) // This bit is 1 in burst mode if the results of one or more conversions 0 was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits. |
mbed_official | 41:e8b66477f5bf | 1728 | #define AD0GDR_DONE (1 << 31) // This bit is set to 1 when an A/D conversion completes. It is cleared 0 when this register is read and when the ADCR is written. If the ADCR is written while a conversion is still in progress, this bit is set and a new conversion is started. |
mbed_official | 41:e8b66477f5bf | 1729 | |
mbed_official | 41:e8b66477f5bf | 1730 | /* AD0INTEN - address 0x4001 C00C */ |
mbed_official | 41:e8b66477f5bf | 1731 | #define AD0INTEN_ADINTEN_MASK 0x00FF // These bits allow control over which A/D channels generate 0x00 interrupts for conversion completion. When bit 0 is one, completion of a conversion on A/D channel 0 will generate an interrupt, when bit 1 is one, completion of a conversion on A/D channel 1 will generate an interrupt, etc. |
mbed_official | 41:e8b66477f5bf | 1732 | #define AD0INTEN_ADINTEN_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1733 | #define AD0INTEN_ADGINTEN (1 << 8) // When 1, enables the global DONE flag in ADDR to generate an interrupt. When 0, only the individual A/D channels enabled by ADINTEN 7:0 will generate interrupts. Remark: This bit must be set to 0 in burst mode (BURST = 1 in the AD0CR register). Reserved. Unused, always 0. |
mbed_official | 41:e8b66477f5bf | 1734 | |
mbed_official | 41:e8b66477f5bf | 1735 | /* AD0DR0 to AD0DR7 - addresses 0x4001 C010 to 0x4001 C02C */ |
mbed_official | 41:e8b66477f5bf | 1736 | #define AD0DRn_V_VREF_MASK 0xFFC0 // When DONE is 1, this field contains a binary fraction representing the NA voltage on the ADn pin, divided by the voltage on the VREF pin. Zero in the field indicates that the voltage on the ADn pin was less than, equal to, or close to that on VREF, while 0x3FF indicates that the voltage on AD input was close to, equal to, or greater than that on VREF. Reserved. |
mbed_official | 41:e8b66477f5bf | 1737 | #define AD0DRn_V_VREF_SHIFT 6 |
mbed_official | 41:e8b66477f5bf | 1738 | #define AD0DRn_OVERRUN (1 << 30) // This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits.This bit is cleared by reading this register. |
mbed_official | 41:e8b66477f5bf | 1739 | #define AD0DRn_DONE (1 << 31) // This bit is set to 1 when an A/D conversion completes. It is cleared when this register is read. |
mbed_official | 41:e8b66477f5bf | 1740 | |
mbed_official | 41:e8b66477f5bf | 1741 | /* AD0STAT - address 0x4001 C030 */ |
mbed_official | 41:e8b66477f5bf | 1742 | #define AD0STAT_DONE_MASK 0x00FF // These bits mirror the DONE status flags that appear in the result register for each A/D channel n. |
mbed_official | 41:e8b66477f5bf | 1743 | #define AD0STAT_DONE_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1744 | #define AD0STAT_OVERRUN_MASK 0xFF00 // These bits mirror the OVERRRUN status flags that appear in the result register for each A/D channel n. Reading ADSTAT allows checking the status of all A/D channels simultaneously. |
mbed_official | 41:e8b66477f5bf | 1745 | #define AD0STAT_OVERRUN_SHIFT 8 |
mbed_official | 41:e8b66477f5bf | 1746 | #define AD0STAT_ADINT (1 << 16) // This bit is the A/D interrupt flag. It is one when any of the individual A/D channel Done flags is asserted and enabled to contribute to the A/D interrupt via the ADINTEN register. Reserved. Unused, always 0. |
mbed_official | 41:e8b66477f5bf | 1747 | |
mbed_official | 41:e8b66477f5bf | 1748 | /* FLASHCFG, address 0x4003 C010 */ |
mbed_official | 41:e8b66477f5bf | 1749 | #define FLASHCFG_FLASHTIM_MASK 0x0003 // Flash memory access time. FLASHTIM +1 is equal to the number of system clocks used for flash access. |
mbed_official | 41:e8b66477f5bf | 1750 | #define FLASHCFG_FLASHTIM_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1751 | |
mbed_official | 41:e8b66477f5bf | 1752 | /* FMSSTART - 0x4003 C020 */ |
mbed_official | 41:e8b66477f5bf | 1753 | #define FMSSTART_START_MASK 0x1FFFF // Signature generation start address (corresponds to AHB byte address bits[20:4]). |
mbed_official | 41:e8b66477f5bf | 1754 | #define FMSSTART_START_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1755 | |
mbed_official | 41:e8b66477f5bf | 1756 | /* FMSSTOP - 0x4003 C024 */ |
mbed_official | 41:e8b66477f5bf | 1757 | #define FMSSTOP_STOP_MASK 0x1FFFF // BIST stop address divided by 16 (corresponds to AHB byte address [20:4]). |
mbed_official | 41:e8b66477f5bf | 1758 | #define FMSSTOP_STOP_SHIFT 0 |
mbed_official | 41:e8b66477f5bf | 1759 | #define FMSSTOP_SIG_START (1 << 17) // Start control bit for signature generation. |
mbed_official | 41:e8b66477f5bf | 1760 | |
mbed_official | 41:e8b66477f5bf | 1761 | /* FMSTAT - 0x4003 CFE0 */ |
mbed_official | 41:e8b66477f5bf | 1762 | #define FMSTAT_SIG_DONE (1 << 2) // When 1, a previously started signature generation has 0 completed. See FMSTATCLR register description for clearing this flag. |
mbed_official | 41:e8b66477f5bf | 1763 | |
mbed_official | 41:e8b66477f5bf | 1764 | /* FMSTATCLR - 0x0x4003 CFE8 */ |
mbed_official | 41:e8b66477f5bf | 1765 | #define FMSTATCLR_SIG_DONE_CLR (1 << 2) // Writing a 1 to this bits clears the signature generation completion flag (SIG_DONE) in the FMSTAT register. |
mbed_official | 41:e8b66477f5bf | 1766 | |
mbed_official | 41:e8b66477f5bf | 1767 | |
mbed_official | 41:e8b66477f5bf | 1768 | #endif |