Skip to content

Instantly share code, notes, and snippets.

@posborne
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save posborne/2549a1a3c598b66b7ef2 to your computer and use it in GitHub Desktop.
Save posborne/2549a1a3c598b66b7ef2 to your computer and use it in GitHub Desktop.
KL25Z Generated ioregs!
use volatile_cell::VolatileCell;
use core::ops::Drop;
ioregs! (FTFA_FlashConfig @ 0x400 = { //! Flash configuration field
0x00 => reg8 backkey3 { //! Backdoor Comparison Key 3.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x01 => reg8 backkey2 { //! Backdoor Comparison Key 2.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x02 => reg8 backkey1 { //! Backdoor Comparison Key 1.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x03 => reg8 backkey0 { //! Backdoor Comparison Key 0.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x04 => reg8 backkey7 { //! Backdoor Comparison Key 7.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x05 => reg8 backkey6 { //! Backdoor Comparison Key 6.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x06 => reg8 backkey5 { //! Backdoor Comparison Key 5.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x07 => reg8 backkey4 { //! Backdoor Comparison Key 4.
8..0 => key: ro, //= Backdoor Comparison Key.
},
0x08 => reg8 fprot3 { //! Non-volatile P-Flash Protection 1 - Low Register
8..0 => prot: ro, //= P-Flash Region Protect
},
0x09 => reg8 fprot2 { //! Non-volatile P-Flash Protection 1 - High Register
8..0 => prot: ro, //= P-Flash Region Protect
},
0x0a => reg8 fprot1 { //! Non-volatile P-Flash Protection 0 - Low Register
8..0 => prot: ro, //= P-Flash Region Protect
},
0x0b => reg8 fprot0 { //! Non-volatile P-Flash Protection 0 - High Register
8..0 => prot: ro, //= P-Flash Region Protect
},
0x0c => reg8 fsec { //! Non-volatile Flash Security Register
2..0 => sec: ro, //= Flash Security
4..2 => fslacc: ro, //= Freescale Failure Analysis Access Code
6..4 => meen: ro, //= no description available
8..6 => keyen: ro, //= Backdoor Key Security Enable
},
0x0d => reg8 fopt { //! Non-volatile Flash Option Register
1..0 => lpboot0: ro, //= no description available
3..2 => nmi_dis: ro, //= no description available
4..3 => reset_pin_cfg: ro, //= no description available
5..4 => lpboot1: ro, //= no description available
6..5 => fast_init: ro, //= no description available
},
});
ioregs! (DMA @ 0x40008000 = { //! DMA Controller
0x100 => reg32 sar0 { //! Source Address Register
32..0 => sar, //= no description available
},
0x104 => reg32 dar0 { //! Destination Address Register
32..0 => dar, //= no description available
},
0x108 => reg32 dsr_bcr0 { //! DMA Status Register / Byte Count Register
24..0 => bcr, //= no description available
25..24 => done { //! Transactions done
0 => E_0, //= DMA transfer is not yet complete. Writing a 0 has no effect.
1 => E_1, //= DMA transfer completed. Writing a 1 to this bit clears all DMA status bits and should be used in an interrupt service routine to clear the DMA interrupt and error bits.
}
26..25 => bsy: ro { //! Busy
0 => E_0, //= DMA channel is inactive. Cleared when the DMA has finished the last transaction.
1 => E_1, //= BSY is set the first time the channel is enabled after a transfer is initiated.
}
27..26 => req: ro { //! Request
0 => E_0, //= No request is pending or the channel is currently active. Cleared when the channel is selected.
1 => E_1, //= The DMA channel has a transfer remaining and the channel is not selected.
}
29..28 => bed: ro { //! Bus error on destination
0 => E_0, //= No bus error occurred.
1 => E_1, //= The DMA channel terminated with a bus error during the write portion of a transfer.
}
30..29 => bes: ro { //! Bus error on source
0 => E_0, //= No bus error occurred.
1 => E_1, //= The DMA channel terminated with a bus error during the read portion of a transfer.
}
31..30 => ce: ro { //! Configuration error
0 => E_0, //= No configuration error exists.
1 => E_1, //= A configuration error has occurred.
}
},
0x10b => reg8 dsr0 { //! DMA_DSR0 register.
},
0x10c => reg32 dcr0 { //! DMA Control Register
2..0 => lch2 { //! Link channel 2
0 => E_00, //= DMA Channel 0
2 => E_01, //= DMA Channel 1
1 => E_10, //= DMA Channel 2
3 => E_11, //= DMA Channel 3
}
4..2 => lch1 { //! Link channel 1
0 => E_00, //= DMA Channel 0
2 => E_01, //= DMA Channel 1
1 => E_10, //= DMA Channel 2
3 => E_11, //= DMA Channel 3
}
6..4 => linkcc { //! Link channel control
0 => E_00, //= No channel-to-channel linking
2 => E_01, //= Perform a link to channel LCH1 after each cycle-steal transfer followed by a link to LCH2 after the BCR decrements to zero
1 => E_10, //= Perform a link to channel LCH1 after each cycle-steal transfer
3 => E_11, //= Perform a link to channel LCH1 after the BCR decrements to zero
}
8..7 => d_req { //! Disable request
0 => E_0, //= ERQ bit is not affected.
1 => E_1, //= ERQ bit is cleared when the BCR is exhausted.
}
12..8 => dmod { //! Destination address modulo
0 => E_0000, //= Buffer disabled
8 => E_0001, //= Circular buffer size is 16 bytes
4 => E_0010, //= Circular buffer size is 32 bytes
12 => E_0011, //= Circular buffer size is 64 bytes
2 => E_0100, //= Circular buffer size is 128 bytes
10 => E_0101, //= Circular buffer size is 256 bytes
6 => E_0110, //= Circular buffer size is 512 bytes
14 => E_0111, //= Circular buffer size is 1 KB
1 => E_1000, //= Circular buffer size is 2 KB
9 => E_1001, //= Circular buffer size is 4 KB
5 => E_1010, //= Circular buffer size is 8 KB
13 => E_1011, //= Circular buffer size is 16 KB
3 => E_1100, //= Circular buffer size is 32 KB
11 => E_1101, //= Circular buffer size is 64 KB
7 => E_1110, //= Circular buffer size is 128 KB
15 => E_1111, //= Circular buffer size is 256 KB
}
16..12 => smod { //! Source address modulo
0 => E_0000, //= Buffer disabled
8 => E_0001, //= Circular buffer size is 16 bytes
4 => E_0010, //= Circular buffer size is 32 bytes
12 => E_0011, //= Circular buffer size is 64 bytes
2 => E_0100, //= Circular buffer size is 128 bytes
10 => E_0101, //= Circular buffer size is 256 bytes
6 => E_0110, //= Circular buffer size is 512 bytes
14 => E_0111, //= Circular buffer size is 1 KB
1 => E_1000, //= Circular buffer size is 2 KB
9 => E_1001, //= Circular buffer size is 4 KB
5 => E_1010, //= Circular buffer size is 8 KB
13 => E_1011, //= Circular buffer size is 16 KB
3 => E_1100, //= Circular buffer size is 32 KB
11 => E_1101, //= Circular buffer size is 64 KB
7 => E_1110, //= Circular buffer size is 128 KB
15 => E_1111, //= Circular buffer size is 256 KB
}
17..16 => start: wo { //! Start transfer
0 => E_0, //= DMA inactive
1 => E_1, //= The DMA begins the transfer in accordance to the values in the TCDn. START is cleared automatically after one module clock and always reads as logic 0.
}
19..17 => dsize { //! Destination size
0 => E_00, //= 32-bit
2 => E_01, //= 8-bit
1 => E_10, //= 16-bit
3 => E_11, //= Reserved (generates a configuration error (DSRn[CE]) if incorrectly specified at time of channel activation)
}
20..19 => dinc { //! Destination increment
0 => E_0, //= No change to the DAR after a successful transfer.
1 => E_1, //= The DAR increments by 1, 2, 4 depending upon the size of the transfer.
}
22..20 => ssize { //! Source size
0 => E_00, //= 32-bit
2 => E_01, //= 8-bit
1 => E_10, //= 16-bit
3 => E_11, //= Reserved (generates a configuration error (DSRn[CE]) if incorrectly specified at time of channel activation)
}
23..22 => sinc { //! Source increment
0 => E_0, //= No change to SAR after a successful transfer.
1 => E_1, //= The SAR increments by 1, 2, 4 as determined by the transfer size.
}
24..23 => eadreq { //! Enable asynchronous DMA requests
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
29..28 => aa { //! Auto-align
0 => E_0, //= Auto-align disabled
1 => E_1, //= If SSIZE indicates a transfer no smaller than DSIZE, source accesses are auto-aligned; otherwise, destination accesses are auto-aligned. Source alignment takes precedence over destination alignment. If auto-alignment is enabled, the appropriate address register increments, regardless of DINC or SINC.
}
30..29 => cs { //! Cycle steal
0 => E_0, //= DMA continuously makes read/write transfers until the BCR decrements to 0.
1 => E_1, //= Forces a single read/write transfer per request.
}
31..30 => erq { //! Enable peripheral request
0 => E_0, //= Peripheral request is ignored.
1 => E_1, //= Enables peripheral request to initiate transfer. A software-initiated request (setting the START bit) is always enabled.
}
32..31 => eint { //! Enable interrupt on completion of transfer
0 => E_0, //= No interrupt is generated.
1 => E_1, //= Interrupt signal is enabled.
}
},
0x11b => reg8 dsr1 { //! DMA_DSR1 register.
},
0x12b => reg8 dsr2 { //! DMA_DSR2 register.
},
0x13b => reg8 dsr3 { //! DMA_DSR3 register.
},
});
ioregs! (FTFA @ 0x40020000 = { //! Flash Memory Interface
0x00 => reg8 fstat { //! Flash Status Register
1..0 => mgstat0: ro, //= Memory Controller Command Completion Status Flag
5..4 => fpviol { //! Flash Protection Violation Flag
0 => E_0, //= No protection violation detected
1 => E_1, //= Protection violation detected
}
6..5 => accerr { //! Flash Access Error Flag
0 => E_0, //= No access error detected
1 => E_1, //= Access error detected
}
7..6 => rdcolerr { //! Flash Read Collision Error Flag
0 => E_0, //= No collision error detected
1 => E_1, //= Collision error detected
}
8..7 => ccif { //! Command Complete Interrupt Flag
0 => E_0, //= Flash command in progress
1 => E_1, //= Flash command has completed
}
},
0x01 => reg8 fcnfg { //! Flash Configuration Register
5..4 => erssusp { //! Erase Suspend
0 => E_0, //= No suspend requested
1 => E_1, //= Suspend the current Erase Flash Sector command execution.
}
6..5 => ersareq: ro { //! Erase All Request
0 => E_0, //= No request or request complete
1 => E_1, //= Request to: run the Erase All Blocks command, verify the erased state, program the security byte in the Flash Configuration Field to the unsecure state, and release MCU security by setting the FSEC[SEC] field to the unsecure state.
}
7..6 => rdcollie { //! Read Collision Error Interrupt Enable
0 => E_0, //= Read collision error interrupt disabled
1 => E_1, //= Read collision error interrupt enabled. An interrupt request is generated whenever a flash memory read collision error is detected (see the description of FSTAT[RDCOLERR]).
}
8..7 => ccie { //! Command Complete Interrupt Enable
0 => E_0, //= Command complete interrupt disabled
1 => E_1, //= Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT[CCIF] flag is set.
}
},
0x02 => reg8 fsec { //! Flash Security Register
2..0 => sec: ro { //! Flash Security
0 => E_00, //= MCU security status is secure
2 => E_01, //= MCU security status is secure
1 => E_10, //= MCU security status is unsecure (The standard shipping condition of the flash memory module is unsecure.)
3 => E_11, //= MCU security status is secure
}
4..2 => fslacc: ro { //! Freescale Failure Analysis Access Code
0 => E_00, //= Freescale factory access granted
2 => E_01, //= Freescale factory access denied
1 => E_10, //= Freescale factory access denied
3 => E_11, //= Freescale factory access granted
}
6..4 => meen: ro { //! Mass Erase Enable Bits
0 => E_00, //= Mass erase is enabled
2 => E_01, //= Mass erase is enabled
1 => E_10, //= Mass erase is disabled
3 => E_11, //= Mass erase is enabled
}
8..6 => keyen: ro { //! Backdoor Key Security Enable
0 => E_00, //= Backdoor key access disabled
2 => E_01, //= Backdoor key access disabled (preferred KEYEN state to disable backdoor key access)
1 => E_10, //= Backdoor key access enabled
3 => E_11, //= Backdoor key access disabled
}
},
0x03 => reg8 fopt { //! Flash Option Register
8..0 => opt: ro, //= Nonvolatile Option
},
0x04 => reg8 fccob3 { //! Flash Common Command Object Registers
8..0 => ccobn, //= no description available
},
0x10 => reg8 fprot3 { //! Program Flash Protection Registers
8..0 => prot { //! Program Flash Region Protect
0 => E_0, //= Program flash region is protected.
1 => E_1, //= Program flash region is not protected
}
},
});
ioregs! (DMAMUX0 @ 0x40021000 = { //! DMA channel multiplexor
0x00 => reg8 chcfg0 { //! Channel Configuration register
6..0 => source, //= DMA Channel Source (Slot)
7..6 => trig { //! DMA Channel Trigger Enable
0 => E_0, //= Triggering is disabled. If triggering is disabled, and the ENBL bit is set, the DMA Channel will simply route the specified source to the DMA channel. (Normal mode)
1 => E_1, //= Triggering is enabled. If triggering is enabled, and the ENBL bit is set, the DMAMUX is in Periodic Trigger mode.
}
8..7 => enbl { //! DMA Channel Enable
0 => E_0, //= DMA channel is disabled. This mode is primarily used during configuration of the DMA Mux. The DMA has separate channel enables/disables, which should be used to disable or re-configure a DMA channel.
1 => E_1, //= DMA channel is enabled
}
},
});
ioregs! (PIT @ 0x40037000 = { //! Periodic Interrupt Timer
0x00 => reg32 mcr { //! PIT Module Control Register
1..0 => frz { //! Freeze
0 => E_0, //= Timers continue to run in Debug mode.
1 => E_1, //= Timers are stopped in Debug mode.
}
2..1 => mdis { //! Module Disable - (PIT section)
0 => E_0, //= Clock for standard PIT timers is enabled.
1 => E_1, //= Clock for standard PIT timers is disabled.
}
},
0xe0 => reg32 ltmr64h { //! PIT Upper Lifetime Timer Register
32..0 => lth: ro, //= Life Timer value
},
0xe4 => reg32 ltmr64l { //! PIT Lower Lifetime Timer Register
32..0 => ltl: ro, //= Life Timer value
},
0x100 => reg32 ldval0 { //! Timer Load Value Register
32..0 => tsv, //= Timer Start Value
},
0x104 => reg32 cval0 { //! Current Timer Value Register
32..0 => tvl: ro, //= Current Timer Value
},
0x108 => reg32 tctrl0 { //! Timer Control Register
1..0 => ten { //! Timer Enable
0 => E_0, //= Timer n is disabled.
1 => E_1, //= Timer n is enabled.
}
2..1 => tie { //! Timer Interrupt Enable
0 => E_0, //= Interrupt requests from Timer n are disabled.
1 => E_1, //= Interrupt will be requested whenever TIF is set.
}
3..2 => chn { //! Chain Mode
0 => E_0, //= Timer is not chained.
1 => E_1, //= Timer is chained to previous timer. For example, for Channel 2, if this field is set, Timer 2 is chained to Timer 1.
}
},
0x10c => reg32 tflg0 { //! Timer Flag Register
1..0 => tif { //! Timer Interrupt Flag
0 => E_0, //= Timeout has not yet occurred.
1 => E_1, //= Timeout has occurred.
}
},
});
ioregs! (TPM0 @ 0x40038000 = { //! Timer/PWM Module
0x00 => reg32 sc { //! Status and Control
3..0 => ps { //! Prescale Factor Selection
0 => E_000, //= Divide by 1
4 => E_001, //= Divide by 2
2 => E_010, //= Divide by 4
6 => E_011, //= Divide by 8
1 => E_100, //= Divide by 16
5 => E_101, //= Divide by 32
3 => E_110, //= Divide by 64
7 => E_111, //= Divide by 128
}
5..3 => cmod { //! Clock Mode Selection
0 => E_00, //= LPTPM counter is disabled
2 => E_01, //= LPTPM counter increments on every LPTPM counter clock
1 => E_10, //= LPTPM counter increments on rising edge of LPTPM_EXTCLK synchronized to the LPTPM counter clock
3 => E_11, //= Reserved
}
6..5 => cpwms { //! Center-aligned PWM Select
0 => E_0, //= LPTPM counter operates in up counting mode.
1 => E_1, //= LPTPM counter operates in up-down counting mode.
}
7..6 => toie { //! Timer Overflow Interrupt Enable
0 => E_0, //= Disable TOF interrupts. Use software polling or DMA request.
1 => E_1, //= Enable TOF interrupts. An interrupt is generated when TOF equals one.
}
8..7 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
9..8 => dma { //! DMA Enable
0 => E_0, //= Disables DMA transfers.
1 => E_1, //= Enables DMA transfers.
}
},
0x04 => reg32 cnt { //! Counter
16..0 => count, //= Counter value
},
0x08 => reg32 mod { //! Modulo
16..0 => mod, //= Modulo value
},
0x0c => reg32 c0sc { //! Channel (n) Status and Control
1..0 => dma { //! DMA Enable
0 => E_0, //= Disable DMA transfers.
1 => E_1, //= Enable DMA transfers.
}
3..2 => elsa, //= Edge or Level Select
4..3 => elsb, //= Edge or Level Select
5..4 => msa, //= Channel Mode Select
6..5 => msb, //= Channel Mode Select
7..6 => chie { //! Channel Interrupt Enable
0 => E_0, //= Disable channel interrupts.
1 => E_1, //= Enable channel interrupts.
}
8..7 => chf { //! Channel Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
},
0x10 => reg32 c0v { //! Channel (n) Value
16..0 => val, //= Channel Value
},
0x50 => reg32 status { //! Capture and Compare Status
1..0 => ch0f { //! Channel 0 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
2..1 => ch1f { //! Channel 1 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
3..2 => ch2f { //! Channel 2 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
4..3 => ch3f { //! Channel 3 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
5..4 => ch4f { //! Channel 4 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
6..5 => ch5f { //! Channel 5 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
9..8 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
},
0x84 => reg32 conf { //! Configuration
6..5 => dozeen { //! Doze Enable
0 => E_0, //= Internal LPTPM counter continues in Doze mode.
1 => E_1, //= Internal LPTPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored.
}
8..6 => dbgmode { //! Debug Mode
0 => E_00, //= LPTPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored.
3 => E_11, //= LPTPM counter continues in debug mode.
}
10..9 => gtbeen { //! Global time base enable
0 => E_0, //= All channels use the internally generated LPTPM counter as their timebase
1 => E_1, //= All channels use an externally generated global timebase as their timebase
}
17..16 => csot { //! Counter Start on Trigger
0 => E_0, //= LPTPM counter starts to increment immediately, once it is enabled.
1 => E_1, //= LPTPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow.
}
18..17 => csoo { //! Counter Stop On Overflow
0 => E_0, //= LPTPM counter continues incrementing or decrementing after overflow
1 => E_1, //= LPTPM counter stops incrementing or decrementing after overflow.
}
19..18 => crot { //! Counter Reload On Trigger
0 => E_0, //= Counter is not reloaded due to a rising edge on the selected input trigger
1 => E_1, //= Counter is reloaded when a rising edge is detected on the selected input trigger
}
28..24 => trgsel, //= Trigger Select
},
});
ioregs! (TPM1 @ 0x40039000 = { //! Timer/PWM Module
0x00 => reg32 sc { //! Status and Control
3..0 => ps { //! Prescale Factor Selection
0 => E_000, //= Divide by 1
4 => E_001, //= Divide by 2
2 => E_010, //= Divide by 4
6 => E_011, //= Divide by 8
1 => E_100, //= Divide by 16
5 => E_101, //= Divide by 32
3 => E_110, //= Divide by 64
7 => E_111, //= Divide by 128
}
5..3 => cmod { //! Clock Mode Selection
0 => E_00, //= LPTPM counter is disabled
2 => E_01, //= LPTPM counter increments on every LPTPM counter clock
1 => E_10, //= LPTPM counter increments on rising edge of LPTPM_EXTCLK synchronized to the LPTPM counter clock
3 => E_11, //= Reserved
}
6..5 => cpwms { //! Center-aligned PWM Select
0 => E_0, //= LPTPM counter operates in up counting mode.
1 => E_1, //= LPTPM counter operates in up-down counting mode.
}
7..6 => toie { //! Timer Overflow Interrupt Enable
0 => E_0, //= Disable TOF interrupts. Use software polling or DMA request.
1 => E_1, //= Enable TOF interrupts. An interrupt is generated when TOF equals one.
}
8..7 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
9..8 => dma { //! DMA Enable
0 => E_0, //= Disables DMA transfers.
1 => E_1, //= Enables DMA transfers.
}
},
0x04 => reg32 cnt { //! Counter
16..0 => count, //= Counter value
},
0x08 => reg32 mod { //! Modulo
16..0 => mod, //= Modulo value
},
0x0c => reg32 c0sc { //! Channel (n) Status and Control
1..0 => dma { //! DMA Enable
0 => E_0, //= Disable DMA transfers.
1 => E_1, //= Enable DMA transfers.
}
3..2 => elsa, //= Edge or Level Select
4..3 => elsb, //= Edge or Level Select
5..4 => msa, //= Channel Mode Select
6..5 => msb, //= Channel Mode Select
7..6 => chie { //! Channel Interrupt Enable
0 => E_0, //= Disable channel interrupts.
1 => E_1, //= Enable channel interrupts.
}
8..7 => chf { //! Channel Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
},
0x10 => reg32 c0v { //! Channel (n) Value
16..0 => val, //= Channel Value
},
0x50 => reg32 status { //! Capture and Compare Status
1..0 => ch0f { //! Channel 0 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
2..1 => ch1f { //! Channel 1 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
3..2 => ch2f { //! Channel 2 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
4..3 => ch3f { //! Channel 3 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
5..4 => ch4f { //! Channel 4 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
6..5 => ch5f { //! Channel 5 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
9..8 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
},
0x84 => reg32 conf { //! Configuration
6..5 => dozeen { //! Doze Enable
0 => E_0, //= Internal LPTPM counter continues in Doze mode.
1 => E_1, //= Internal LPTPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored.
}
8..6 => dbgmode { //! Debug Mode
0 => E_00, //= LPTPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored.
3 => E_11, //= LPTPM counter continues in debug mode.
}
10..9 => gtbeen { //! Global time base enable
0 => E_0, //= All channels use the internally generated LPTPM counter as their timebase
1 => E_1, //= All channels use an externally generated global timebase as their timebase
}
17..16 => csot { //! Counter Start on Trigger
0 => E_0, //= LPTPM counter starts to increment immediately, once it is enabled.
1 => E_1, //= LPTPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow.
}
18..17 => csoo { //! Counter Stop On Overflow
0 => E_0, //= LPTPM counter continues incrementing or decrementing after overflow
1 => E_1, //= LPTPM counter stops incrementing or decrementing after overflow.
}
19..18 => crot { //! Counter Reload On Trigger
0 => E_0, //= Counter is not reloaded due to a rising edge on the selected input trigger
1 => E_1, //= Counter is reloaded when a rising edge is detected on the selected input trigger
}
28..24 => trgsel, //= Trigger Select
},
});
ioregs! (TPM2 @ 0x4003a000 = { //! Timer/PWM Module
0x00 => reg32 sc { //! Status and Control
3..0 => ps { //! Prescale Factor Selection
0 => E_000, //= Divide by 1
4 => E_001, //= Divide by 2
2 => E_010, //= Divide by 4
6 => E_011, //= Divide by 8
1 => E_100, //= Divide by 16
5 => E_101, //= Divide by 32
3 => E_110, //= Divide by 64
7 => E_111, //= Divide by 128
}
5..3 => cmod { //! Clock Mode Selection
0 => E_00, //= LPTPM counter is disabled
2 => E_01, //= LPTPM counter increments on every LPTPM counter clock
1 => E_10, //= LPTPM counter increments on rising edge of LPTPM_EXTCLK synchronized to the LPTPM counter clock
3 => E_11, //= Reserved
}
6..5 => cpwms { //! Center-aligned PWM Select
0 => E_0, //= LPTPM counter operates in up counting mode.
1 => E_1, //= LPTPM counter operates in up-down counting mode.
}
7..6 => toie { //! Timer Overflow Interrupt Enable
0 => E_0, //= Disable TOF interrupts. Use software polling or DMA request.
1 => E_1, //= Enable TOF interrupts. An interrupt is generated when TOF equals one.
}
8..7 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
9..8 => dma { //! DMA Enable
0 => E_0, //= Disables DMA transfers.
1 => E_1, //= Enables DMA transfers.
}
},
0x04 => reg32 cnt { //! Counter
16..0 => count, //= Counter value
},
0x08 => reg32 mod { //! Modulo
16..0 => mod, //= Modulo value
},
0x0c => reg32 c0sc { //! Channel (n) Status and Control
1..0 => dma { //! DMA Enable
0 => E_0, //= Disable DMA transfers.
1 => E_1, //= Enable DMA transfers.
}
3..2 => elsa, //= Edge or Level Select
4..3 => elsb, //= Edge or Level Select
5..4 => msa, //= Channel Mode Select
6..5 => msb, //= Channel Mode Select
7..6 => chie { //! Channel Interrupt Enable
0 => E_0, //= Disable channel interrupts.
1 => E_1, //= Enable channel interrupts.
}
8..7 => chf { //! Channel Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
},
0x10 => reg32 c0v { //! Channel (n) Value
16..0 => val, //= Channel Value
},
0x50 => reg32 status { //! Capture and Compare Status
1..0 => ch0f { //! Channel 0 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
2..1 => ch1f { //! Channel 1 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
3..2 => ch2f { //! Channel 2 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
4..3 => ch3f { //! Channel 3 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
5..4 => ch4f { //! Channel 4 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
6..5 => ch5f { //! Channel 5 Flag
0 => E_0, //= No channel event has occurred.
1 => E_1, //= A channel event has occurred.
}
9..8 => tof { //! Timer Overflow Flag
0 => E_0, //= LPTPM counter has not overflowed.
1 => E_1, //= LPTPM counter has overflowed.
}
},
0x84 => reg32 conf { //! Configuration
6..5 => dozeen { //! Doze Enable
0 => E_0, //= Internal LPTPM counter continues in Doze mode.
1 => E_1, //= Internal LPTPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture events are also ignored.
}
8..6 => dbgmode { //! Debug Mode
0 => E_00, //= LPTPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events are also ignored.
3 => E_11, //= LPTPM counter continues in debug mode.
}
10..9 => gtbeen { //! Global time base enable
0 => E_0, //= All channels use the internally generated LPTPM counter as their timebase
1 => E_1, //= All channels use an externally generated global timebase as their timebase
}
17..16 => csot { //! Counter Start on Trigger
0 => E_0, //= LPTPM counter starts to increment immediately, once it is enabled.
1 => E_1, //= LPTPM counter only starts to increment when it a rising edge on the selected input trigger is detected, after it has been enabled or after it has stopped due to overflow.
}
18..17 => csoo { //! Counter Stop On Overflow
0 => E_0, //= LPTPM counter continues incrementing or decrementing after overflow
1 => E_1, //= LPTPM counter stops incrementing or decrementing after overflow.
}
19..18 => crot { //! Counter Reload On Trigger
0 => E_0, //= Counter is not reloaded due to a rising edge on the selected input trigger
1 => E_1, //= Counter is reloaded when a rising edge is detected on the selected input trigger
}
28..24 => trgsel, //= Trigger Select
},
});
ioregs! (ADC0 @ 0x4003b000 = { //! Analog-to-Digital Converter
0x00 => reg32 sc10 { //! ADC Status and Control Registers 1
5..0 => adch { //! Input channel select
0 => E_00000, //= When DIFF=0, DADP0 is selected as input; when DIFF=1, DAD0 is selected as input.
16 => E_00001, //= When DIFF=0, DADP1 is selected as input; when DIFF=1, DAD1 is selected as input.
8 => E_00010, //= When DIFF=0, DADP2 is selected as input; when DIFF=1, DAD2 is selected as input.
24 => E_00011, //= When DIFF=0, DADP3 is selected as input; when DIFF=1, DAD3 is selected as input.
4 => E_00100, //= When DIFF=0, AD4 is selected as input; when DIFF=1, it is reserved.
20 => E_00101, //= When DIFF=0, AD5 is selected as input; when DIFF=1, it is reserved.
12 => E_00110, //= When DIFF=0, AD6 is selected as input; when DIFF=1, it is reserved.
28 => E_00111, //= When DIFF=0, AD7 is selected as input; when DIFF=1, it is reserved.
2 => E_01000, //= When DIFF=0, AD8 is selected as input; when DIFF=1, it is reserved.
18 => E_01001, //= When DIFF=0, AD9 is selected as input; when DIFF=1, it is reserved.
10 => E_01010, //= When DIFF=0, AD10 is selected as input; when DIFF=1, it is reserved.
26 => E_01011, //= When DIFF=0, AD11 is selected as input; when DIFF=1, it is reserved.
6 => E_01100, //= When DIFF=0, AD12 is selected as input; when DIFF=1, it is reserved.
22 => E_01101, //= When DIFF=0, AD13 is selected as input; when DIFF=1, it is reserved.
14 => E_01110, //= When DIFF=0, AD14 is selected as input; when DIFF=1, it is reserved.
30 => E_01111, //= When DIFF=0, AD15 is selected as input; when DIFF=1, it is reserved.
1 => E_10000, //= When DIFF=0, AD16 is selected as input; when DIFF=1, it is reserved.
17 => E_10001, //= When DIFF=0, AD17 is selected as input; when DIFF=1, it is reserved.
9 => E_10010, //= When DIFF=0, AD18 is selected as input; when DIFF=1, it is reserved.
25 => E_10011, //= When DIFF=0, AD19 is selected as input; when DIFF=1, it is reserved.
5 => E_10100, //= When DIFF=0, AD20 is selected as input; when DIFF=1, it is reserved.
21 => E_10101, //= When DIFF=0, AD21 is selected as input; when DIFF=1, it is reserved.
13 => E_10110, //= When DIFF=0, AD22 is selected as input; when DIFF=1, it is reserved.
29 => E_10111, //= When DIFF=0, AD23 is selected as input; when DIFF=1, it is reserved.
3 => E_11000, //= Reserved.
19 => E_11001, //= Reserved.
11 => E_11010, //= When DIFF=0, Temp Sensor (single-ended) is selected as input; when DIFF=1, Temp Sensor (differential) is selected as input.
27 => E_11011, //= When DIFF=0, Bandgap (single-ended) is selected as input; when DIFF=1, Bandgap (differential) is selected as input.
7 => E_11100, //= Reserved.
23 => E_11101, //= When DIFF=0,VREFSH is selected as input; when DIFF=1, -VREFSH (differential) is selected as input. Voltage reference selected is determined by SC2[REFSEL].
15 => E_11110, //= When DIFF=0,VREFSL is selected as input; when DIFF=1, it is reserved. Voltage reference selected is determined by SC2[REFSEL].
31 => E_11111, //= Module is disabled.
}
6..5 => diff { //! Differential Mode Enable
0 => E_0, //= Single-ended conversions and input channels are selected.
1 => E_1, //= Differential conversions and input channels are selected.
}
7..6 => aien { //! Interrupt Enable
0 => E_0, //= Conversion complete interrupt is disabled.
1 => E_1, //= Conversion complete interrupt is enabled.
}
8..7 => coco: ro { //! Conversion Complete Flag
0 => E_0, //= Conversion is not completed.
1 => E_1, //= Conversion is completed.
}
},
0x08 => reg32 cfg1 { //! ADC Configuration Register 1
2..0 => adiclk { //! Input Clock Select
0 => E_00, //= Bus clock
2 => E_01, //= (Bus clock)/2
1 => E_10, //= Alternate clock (ALTCLK)
3 => E_11, //= Asynchronous clock (ADACK)
}
4..2 => mode { //! Conversion mode selection
0 => E_00, //= When DIFF=0:It is single-ended 8-bit conversion; when DIFF=1, it is differential 9-bit conversion with 2's complement output.
2 => E_01, //= When DIFF=0:It is single-ended 12-bit conversion ; when DIFF=1, it is differential 13-bit conversion with 2's complement output.
1 => E_10, //= When DIFF=0:It is single-ended 10-bit conversion ; when DIFF=1, it is differential 11-bit conversion with 2's complement output.
3 => E_11, //= When DIFF=0:It is single-ended 16-bit conversion; when DIFF=1, it is differential 16-bit conversion with 2's complement output.
}
5..4 => adlsmp { //! Sample time configuration
0 => E_0, //= Short sample time.
1 => E_1, //= Long sample time.
}
7..5 => adiv { //! Clock Divide Select
0 => E_00, //= The divide ratio is 1 and the clock rate is input clock.
2 => E_01, //= The divide ratio is 2 and the clock rate is (input clock)/2.
1 => E_10, //= The divide ratio is 4 and the clock rate is (input clock)/4.
3 => E_11, //= The divide ratio is 8 and the clock rate is (input clock)/8.
}
8..7 => adlpc { //! Low-Power Configuration
0 => E_0, //= Normal power configuration.
1 => E_1, //= Low-power configuration. The power is reduced at the expense of maximum clock speed.
}
},
0x0c => reg32 cfg2 { //! ADC Configuration Register 2
2..0 => adlsts { //! Long Sample Time Select
0 => E_00, //= Default longest sample time; 20 extra ADCK cycles; 24 ADCK cycles total.
2 => E_01, //= 12 extra ADCK cycles; 16 ADCK cycles total sample time.
1 => E_10, //= 6 extra ADCK cycles; 10 ADCK cycles total sample time.
3 => E_11, //= 2 extra ADCK cycles; 6 ADCK cycles total sample time.
}
3..2 => adhsc { //! High-Speed Configuration
0 => E_0, //= Normal conversion sequence selected.
1 => E_1, //= High-speed conversion sequence selected with 2 additional ADCK cycles to total conversion time.
}
4..3 => adacken { //! Asynchronous Clock Output Enable
0 => E_0, //= Asynchronous clock output disabled; Asynchronous clock is enabled only if selected by ADICLK and a conversion is active.
1 => E_1, //= Asynchronous clock and clock output is enabled regardless of the state of the ADC.
}
5..4 => muxsel { //! ADC Mux Select
0 => E_0, //= ADxxa channels are selected.
1 => E_1, //= ADxxb channels are selected.
}
},
0x10 => reg32 r0 { //! ADC Data Result Register
16..0 => d: ro, //= Data result
},
0x18 => reg32 cv1 { //! Compare Value Registers
16..0 => cv, //= Compare Value.
},
0x20 => reg32 sc2 { //! Status and Control Register 2
2..0 => refsel { //! Voltage Reference Selection
0 => E_00, //= Default voltage reference pin pair, that is, external pins VREFH and VREFL
2 => E_01, //= Alternate reference pair, that is, VALTH and VALTL . This pair may be additional external pins or internal sources depending on the MCU configuration. See the chip configuration information for details specific to this MCU
1 => E_10, //= Reserved
3 => E_11, //= Reserved
}
3..2 => dmaen { //! DMA Enable
0 => E_0, //= DMA is disabled.
1 => E_1, //= DMA is enabled and will assert the ADC DMA request during an ADC conversion complete event noted when any of the SC1n[COCO] flags is asserted.
}
4..3 => acren { //! Compare Function Range Enable
0 => E_0, //= Range function disabled. Only CV1 is compared.
1 => E_1, //= Range function enabled. Both CV1 and CV2 are compared.
}
5..4 => acfgt { //! Compare Function Greater Than Enable
0 => E_0, //= Configures less than threshold, outside range not inclusive and inside range not inclusive; functionality based on the values placed in CV1 and CV2.
1 => E_1, //= Configures greater than or equal to threshold, outside and inside ranges inclusive; functionality based on the values placed in CV1 and CV2.
}
6..5 => acfe { //! Compare Function Enable
0 => E_0, //= Compare function disabled.
1 => E_1, //= Compare function enabled.
}
7..6 => adtrg { //! Conversion Trigger Select
0 => E_0, //= Software trigger selected.
1 => E_1, //= Hardware trigger selected.
}
8..7 => adact: ro { //! Conversion Active
0 => E_0, //= Conversion not in progress.
1 => E_1, //= Conversion in progress.
}
},
0x24 => reg32 sc3 { //! Status and Control Register 3
2..0 => avgs { //! Hardware Average Select
0 => E_00, //= 4 samples averaged.
2 => E_01, //= 8 samples averaged.
1 => E_10, //= 16 samples averaged.
3 => E_11, //= 32 samples averaged.
}
3..2 => avge { //! Hardware Average Enable
0 => E_0, //= Hardware average function disabled.
1 => E_1, //= Hardware average function enabled.
}
4..3 => adco { //! Continuous Conversion Enable
0 => E_0, //= One conversion or one set of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion.
1 => E_1, //= Continuous conversions or sets of conversions if the hardware average function is enabled, that is, AVGE=1, after initiating a conversion.
}
7..6 => calf: ro { //! Calibration Failed Flag
0 => E_0, //= Calibration completed normally.
1 => E_1, //= Calibration failed. ADC accuracy specifications are not guaranteed.
}
8..7 => cal, //= Calibration
},
0x28 => reg32 ofs { //! ADC Offset Correction Register
16..0 => ofs, //= Offset Error Correction Value
},
0x2c => reg32 pg { //! ADC Plus-Side Gain Register
16..0 => pg, //= Plus-Side Gain
},
0x30 => reg32 mg { //! ADC Minus-Side Gain Register
16..0 => mg, //= Minus-Side Gain
},
0x34 => reg32 clpd { //! ADC Plus-Side General Calibration Value Register
6..0 => clpd, //= no description available
},
0x38 => reg32 clps { //! ADC Plus-Side General Calibration Value Register
6..0 => clps, //= no description available
},
0x3c => reg32 clp4 { //! ADC Plus-Side General Calibration Value Register
10..0 => clp4, //= no description available
},
0x40 => reg32 clp3 { //! ADC Plus-Side General Calibration Value Register
9..0 => clp3, //= no description available
},
0x44 => reg32 clp2 { //! ADC Plus-Side General Calibration Value Register
8..0 => clp2, //= no description available
},
0x48 => reg32 clp1 { //! ADC Plus-Side General Calibration Value Register
7..0 => clp1, //= no description available
},
0x4c => reg32 clp0 { //! ADC Plus-Side General Calibration Value Register
6..0 => clp0, //= no description available
},
0x54 => reg32 clmd { //! ADC Minus-Side General Calibration Value Register
6..0 => clmd, //= no description available
},
0x58 => reg32 clms { //! ADC Minus-Side General Calibration Value Register
6..0 => clms, //= no description available
},
0x5c => reg32 clm4 { //! ADC Minus-Side General Calibration Value Register
10..0 => clm4, //= no description available
},
0x60 => reg32 clm3 { //! ADC Minus-Side General Calibration Value Register
9..0 => clm3, //= no description available
},
0x64 => reg32 clm2 { //! ADC Minus-Side General Calibration Value Register
8..0 => clm2, //= no description available
},
0x68 => reg32 clm1 { //! ADC Minus-Side General Calibration Value Register
7..0 => clm1, //= no description available
},
0x6c => reg32 clm0 { //! ADC Minus-Side General Calibration Value Register
6..0 => clm0, //= no description available
},
});
ioregs! (RTC @ 0x4003d000 = { //! Secure Real Time Clock
0x00 => reg32 tsr { //! RTC Time Seconds Register
32..0 => tsr, //= Time Seconds Register
},
0x04 => reg32 tpr { //! RTC Time Prescaler Register
16..0 => tpr, //= Time Prescaler Register
},
0x08 => reg32 tar { //! RTC Time Alarm Register
32..0 => tar, //= Time Alarm Register
},
0x0c => reg32 tcr { //! RTC Time Compensation Register
8..0 => tcr { //! Time Compensation Register
1 => E_10000000, //= Time Prescaler Register overflows every 32896 clock cycles.
255 => E_11111111, //= Time Prescaler Register overflows every 32769 clock cycles.
0 => E_0, //= Time Prescaler Register overflows every 32768 clock cycles.
1 => E_1, //= Time Prescaler Register overflows every 32767 clock cycles.
127 => E_1111111, //= Time Prescaler Register overflows every 32641 clock cycles.
}
16..8 => cir, //= Compensation Interval Register
24..16 => tcv: ro, //= Time Compensation Value
32..24 => cic: ro, //= Compensation Interval Counter
},
0x10 => reg32 cr { //! RTC Control Register
1..0 => swr { //! Software Reset
0 => E_0, //= No effect.
1 => E_1, //= Resets all RTC registers except for the SWR bit . The SWR bit is cleared by POR and by software explicitly clearing it.
}
2..1 => wpe { //! Wakeup Pin Enable
0 => E_0, //= Wakeup pin is disabled.
1 => E_1, //= Wakeup pin is enabled and wakeup pin asserts if the RTC interrupt asserts or the wakeup pin is turned on.
}
3..2 => sup { //! Supervisor Access
0 => E_0, //= Non-supervisor mode write accesses are not supported and generate a bus error.
1 => E_1, //= Non-supervisor mode write accesses are supported.
}
4..3 => um { //! Update Mode
0 => E_0, //= Registers cannot be written when locked.
1 => E_1, //= Registers can be written when locked under limited conditions.
}
9..8 => osce { //! Oscillator Enable
0 => E_0, //= 32.768 kHz oscillator is disabled.
1 => E_1, //= 32.768 kHz oscillator is enabled. After setting this bit, wait the oscillator startup time before enabling the time counter to allow the 32.768 kHz clock time to stabilize.
}
10..9 => clko { //! Clock Output
0 => E_0, //= The 32 kHz clock is output to other peripherals.
1 => E_1, //= The 32 kHz clock is not output to other peripherals.
}
11..10 => sc16p { //! Oscillator 16pF Load Configure
0 => E_0, //= Disable the load.
1 => E_1, //= Enable the additional load.
}
12..11 => sc8p { //! Oscillator 8pF Load Configure
0 => E_0, //= Disable the load.
1 => E_1, //= Enable the additional load.
}
13..12 => sc4p { //! Oscillator 4pF Load Configure
0 => E_0, //= Disable the load.
1 => E_1, //= Enable the additional load.
}
14..13 => sc2p { //! Oscillator 2pF Load Configure
0 => E_0, //= Disable the load.
1 => E_1, //= Enable the additional load.
}
},
0x14 => reg32 sr { //! RTC Status Register
1..0 => tif: ro { //! Time Invalid Flag
0 => E_0, //= Time is valid.
1 => E_1, //= Time is invalid and time counter is read as zero.
}
2..1 => tof: ro { //! Time Overflow Flag
0 => E_0, //= Time overflow has not occurred.
1 => E_1, //= Time overflow has occurred and time counter is read as zero.
}
3..2 => taf: ro { //! Time Alarm Flag
0 => E_0, //= Time alarm has not occurred.
1 => E_1, //= Time alarm has occurred.
}
5..4 => tce { //! Time Counter Enable
0 => E_0, //= Time counter is disabled.
1 => E_1, //= Time counter is enabled.
}
},
0x18 => reg32 lr { //! RTC Lock Register
4..3 => tcl { //! Time Compensation Lock
0 => E_0, //= Time Compensation Register is locked and writes are ignored.
1 => E_1, //= Time Compensation Register is not locked and writes complete as normal.
}
5..4 => crl { //! Control Register Lock
0 => E_0, //= Control Register is locked and writes are ignored.
1 => E_1, //= Control Register is not locked and writes complete as normal.
}
6..5 => srl { //! Status Register Lock
0 => E_0, //= Status Register is locked and writes are ignored.
1 => E_1, //= Status Register is not locked and writes complete as normal.
}
7..6 => lrl { //! Lock Register Lock
0 => E_0, //= Lock Register is locked and writes are ignored.
1 => E_1, //= Lock Register is not locked and writes complete as normal.
}
},
0x1c => reg32 ier { //! RTC Interrupt Enable Register
1..0 => tiie { //! Time Invalid Interrupt Enable
0 => E_0, //= Time invalid flag does not generate an interrupt.
1 => E_1, //= Time invalid flag does generate an interrupt.
}
2..1 => toie { //! Time Overflow Interrupt Enable
0 => E_0, //= Time overflow flag does not generate an interrupt.
1 => E_1, //= Time overflow flag does generate an interrupt.
}
3..2 => taie { //! Time Alarm Interrupt Enable
0 => E_0, //= Time alarm flag does not generate an interrupt.
1 => E_1, //= Time alarm flag does generate an interrupt.
}
5..4 => tsie { //! Time Seconds Interrupt Enable
0 => E_0, //= Seconds interrupt is disabled.
1 => E_1, //= Seconds interrupt is enabled.
}
8..7 => wpon { //! Wakeup Pin On
0 => E_0, //= No effect.
1 => E_1, //= If the wakeup pin is enabled, then the wakeup pin will assert.
}
},
});
ioregs! (DAC0 @ 0x4003f000 = { //! 12-Bit Digital-to-Analog Converter
0x00 => reg8 dat0l { //! DAC Data Low Register
8..0 => data0, //= no description available
},
0x01 => reg8 dat0h { //! DAC Data High Register
4..0 => data1, //= no description available
},
0x20 => reg8 sr { //! DAC Status Register
1..0 => dacbfrpbf { //! DAC Buffer Read Pointer Bottom Position Flag
0 => E_0, //= The DAC buffer read pointer is not equal to C2[DACBFUP].
1 => E_1, //= The DAC buffer read pointer is equal to C2[DACBFUP].
}
2..1 => dacbfrptf { //! DAC Buffer Read Pointer Top Position Flag
0 => E_0, //= The DAC buffer read pointer is not zero.
1 => E_1, //= The DAC buffer read pointer is zero.
}
},
0x21 => reg8 c0 { //! DAC Control Register
1..0 => dacbbien { //! DAC Buffer Read Pointer Bottom Flag Interrupt Enable
0 => E_0, //= The DAC buffer read pointer bottom flag interrupt is disabled.
1 => E_1, //= The DAC buffer read pointer bottom flag interrupt is enabled.
}
2..1 => dacbtien { //! DAC Buffer Read Pointer Top Flag Interrupt Enable
0 => E_0, //= The DAC buffer read pointer top flag interrupt is disabled.
1 => E_1, //= The DAC buffer read pointer top flag interrupt is enabled.
}
4..3 => lpen { //! DAC Low Power Control
0 => E_0, //= High-Power mode
1 => E_1, //= Low-Power mode
}
5..4 => dacswtrg: wo { //! DAC Software Trigger
0 => E_0, //= The DAC soft trigger is not valid.
1 => E_1, //= The DAC soft trigger is valid.
}
6..5 => dactrgsel { //! DAC Trigger Select
0 => E_0, //= The DAC hardware trigger is selected.
1 => E_1, //= The DAC software trigger is selected.
}
7..6 => dacrfs { //! DAC Reference Select
0 => E_0, //= The DAC selects DACREF_1 as the reference voltage.
1 => E_1, //= The DAC selects DACREF_2 as the reference voltage.
}
8..7 => dacen { //! DAC Enable
0 => E_0, //= The DAC system is disabled.
1 => E_1, //= The DAC system is enabled.
}
},
0x22 => reg8 c1 { //! DAC Control Register 1
1..0 => dacbfen { //! DAC Buffer Enable
0 => E_0, //= Buffer read pointer is disabled. The converted data is always the first word of the buffer.
1 => E_1, //= Buffer read pointer is enabled. The converted data is the word that the read pointer points to. It means converted data can be from any word of the buffer.
}
3..2 => dacbfmd { //! DAC Buffer Work Mode Select
0 => E_0, //= Normal mode
1 => E_1, //= One-Time Scan mode
}
8..7 => dmaen { //! DMA Enable Select
0 => E_0, //= DMA is disabled.
1 => E_1, //= DMA is enabled. When DMA is enabled, the DMA request will be generated by original interrupts. The interrupts will not be presented on this module at the same time.
}
},
0x23 => reg8 c2 { //! DAC Control Register 2
1..0 => dacbfup, //= DAC Buffer Upper Limit
5..4 => dacbfrp, //= DAC Buffer Read Pointer
},
});
ioregs! (LPTMR0 @ 0x40040000 = { //! Low Power Timer
0x00 => reg32 csr { //! Low Power Timer Control Status Register
1..0 => ten { //! Timer Enable
0 => E_0, //= LPTMR is disabled and internal logic is reset.
1 => E_1, //= LPTMR is enabled.
}
2..1 => tms { //! Timer Mode Select
0 => E_0, //= Time Counter mode.
1 => E_1, //= Pulse Counter mode.
}
3..2 => tfc { //! Timer Free-Running Counter
0 => E_0, //= CNR is reset whenever TCF is set.
1 => E_1, //= CNR is reset on overflow.
}
4..3 => tpp { //! Timer Pin Polarity
0 => E_0, //= Pulse Counter input source is active-high, and the CNR will increment on the rising-edge.
1 => E_1, //= Pulse Counter input source is active-low, and the CNR will increment on the falling-edge.
}
6..4 => tps { //! Timer Pin Select
0 => E_00, //= Pulse counter input 0 is selected.
2 => E_01, //= Pulse counter input 1 is selected.
1 => E_10, //= Pulse counter input 2 is selected.
3 => E_11, //= Pulse counter input 3 is selected.
}
7..6 => tie { //! Timer Interrupt Enable
0 => E_0, //= Timer interrupt disabled.
1 => E_1, //= Timer interrupt enabled.
}
8..7 => tcf { //! Timer Compare Flag
0 => E_0, //= The value of CNR is not equal to CMR and increments.
1 => E_1, //= The value of CNR is equal to CMR and increments.
}
},
0x04 => reg32 psr { //! Low Power Timer Prescale Register
2..0 => pcs { //! Prescaler Clock Select
0 => E_00, //= Prescaler/glitch filter clock 0 selected.
2 => E_01, //= Prescaler/glitch filter clock 1 selected.
1 => E_10, //= Prescaler/glitch filter clock 2 selected.
3 => E_11, //= Prescaler/glitch filter clock 3 selected.
}
3..2 => pbyp { //! Prescaler Bypass
0 => E_0, //= Prescaler/glitch filter is enabled.
1 => E_1, //= Prescaler/glitch filter is bypassed.
}
7..3 => prescale { //! Prescale Value
0 => E_0000, //= Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration.
8 => E_0001, //= Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges.
4 => E_0010, //= Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges.
12 => E_0011, //= Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges.
2 => E_0100, //= Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges.
10 => E_0101, //= Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges.
6 => E_0110, //= Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges.
14 => E_0111, //= Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges.
1 => E_1000, //= Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges.
9 => E_1001, //= Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges.
5 => E_1010, //= Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges.
13 => E_1011, //= Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges.
3 => E_1100, //= Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges.
11 => E_1101, //= Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges.
7 => E_1110, //= Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges.
15 => E_1111, //= Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges.
}
},
0x08 => reg32 cmr { //! Low Power Timer Compare Register
16..0 => compare, //= Compare Value
},
0x0c => reg32 cnr { //! Low Power Timer Counter Register
16..0 => counter: ro, //= Counter Value
},
});
ioregs! (TSI0 @ 0x40045000 = { //! Touch sense input
0x00 => reg32 gencs { //! TSI General Control and Status Register
2..1 => cursw { //! CURSW
0 => E_0, //= The current source pair are not swapped.
1 => E_1, //= The current source pair are swapped.
}
3..2 => eosf { //! End of Scan Flag
0 => E_0, //= Scan not complete.
1 => E_1, //= Scan complete.
}
4..3 => scnip: ro { //! Scan In Progress Status
0 => E_0, //= No scan in progress.
1 => E_1, //= Scan in progress.
}
5..4 => stm { //! Scan Trigger Mode
0 => E_0, //= Software trigger scan.
1 => E_1, //= Hardware trigger scan.
}
6..5 => stpe { //! TSI STOP Enable
0 => E_0, //= TSI is disabled when MCU goes into low power mode.
1 => E_1, //= Allows TSI to continue running in all low power modes.
}
7..6 => tsiien { //! Touch Sensing Input Interrupt Enable
0 => E_0, //= TSI interrupt is disabled.
1 => E_1, //= TSI interrupt is enabled.
}
8..7 => tsien { //! Touch Sensing Input Module Enable
0 => E_0, //= TSI module disabled.
1 => E_1, //= TSI module enabled.
}
13..8 => nscn { //! NSCN
0 => E_00000, //= Once per electrode
16 => E_00001, //= Twice per electrode
8 => E_00010, //= 3 times per electrode
24 => E_00011, //= 4 times per electrode
4 => E_00100, //= 5 times per electrode
20 => E_00101, //= 6 times per electrode
12 => E_00110, //= 7 times per electrode
28 => E_00111, //= 8 times per electrode
2 => E_01000, //= 9 times per electrode
18 => E_01001, //= 10 times per electrode
10 => E_01010, //= 11 times per electrode
26 => E_01011, //= 12 times per electrode
6 => E_01100, //= 13 times per electrode
22 => E_01101, //= 14 times per electrode
14 => E_01110, //= 15 times per electrode
30 => E_01111, //= 16 times per electrode
1 => E_10000, //= 17 times per electrode
17 => E_10001, //= 18 times per electrode
9 => E_10010, //= 19 times per electrode
25 => E_10011, //= 20 times per electrode
5 => E_10100, //= 21 times per electrode
21 => E_10101, //= 22 times per electrode
13 => E_10110, //= 23 times per electrode
29 => E_10111, //= 24 times per electrode
3 => E_11000, //= 25 times per electrode
19 => E_11001, //= 26 times per electrode
11 => E_11010, //= 27 times per electrode
27 => E_11011, //= 28 times per electrode
7 => E_11100, //= 29 times per electrode
23 => E_11101, //= 30 times per electrode
15 => E_11110, //= 31 times per electrode
31 => E_11111, //= 32 times per electrode
}
16..13 => ps { //! PS
0 => E_000, //= Electrode Oscillator Frequency divided by 1
4 => E_001, //= Electrode Oscillator Frequency divided by 2
2 => E_010, //= Electrode Oscillator Frequency divided by 4
6 => E_011, //= Electrode Oscillator Frequency divided by 8
1 => E_100, //= Electrode Oscillator Frequency divided by 16
5 => E_101, //= Electrode Oscillator Frequency divided by 32
3 => E_110, //= Electrode Oscillator Frequency divided by 64
7 => E_111, //= Electrode Oscillator Frequency divided by 128
}
19..16 => extchrg { //! EXTCHRG
0 => E_000, //= 500 nA.
4 => E_001, //= 1 μA.
2 => E_010, //= 2 μA.
6 => E_011, //= 4 μA.
1 => E_100, //= 8 μA.
5 => E_101, //= 16 μA.
3 => E_110, //= 32 μA.
7 => E_111, //= 64 μA.
}
21..19 => dvolt { //! DVOLT
0 => E_00, //= DV = 1.03 V; VP = 1.33 V; Vm = 0.30 V.
2 => E_01, //= DV = 0.73 V; VP = 1.18 V; Vm = 0.45 V.
1 => E_10, //= DV = 0.43 V; VP = 1.03 V; Vm = 0.60 V.
3 => E_11, //= DV = 0.29 V; VP = 0.95 V; Vm = 0.67 V.
}
24..21 => refchrg { //! REFCHRG
0 => E_000, //= 500 nA.
4 => E_001, //= 1 μA.
2 => E_010, //= 2 μA.
6 => E_011, //= 4 μA.
1 => E_100, //= 8 μA.
5 => E_101, //= 16 μA.
3 => E_110, //= 32 μA.
7 => E_111, //= 64 μA.
}
28..24 => mode { //! TSI analog modes setup and status bits.
0 => E_0000, //= Set TSI in capacitive sensing(non-noise detection) mode.
2 => E_0100, //= Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is disabled.
1 => E_1000, //= Set TSI analog to work in single threshold noise detection mode and the frequency limitation circuit is enabled to work in higher frequencies operations.
3 => E_1100, //= Set TSI analog to work in automatic noise detection mode.
}
29..28 => esor { //! End-of-scan or Out-of-Range Interrupt Selection
0 => E_0, //= Out-of-range interrupt is allowed.
1 => E_1, //= End-of-scan interrupt is allowed.
}
32..31 => outrgf, //= Out of Range Flag.
},
0x04 => reg32 data { //! TSI DATA Register
16..0 => tsicnt: ro, //= TSI Conversion Counter Value
23..22 => swts: wo { //! Software Trigger Start
0 => E_0, //= No effect.
1 => E_1, //= Start a scan to determine which channel is specified by TSI_DATA[TSICH].
}
24..23 => dmaen { //! DMA Transfer Enabled
0 => E_0, //= Interrupt is selected when the interrupt enable bit is set and the corresponding TSI events assert.
1 => E_1, //= DMA transfer request is selected when the interrupt enable bit is set and the corresponding TSI events assert.
}
32..28 => tsich { //! TSICH
0 => E_0000, //= Channel 0.
8 => E_0001, //= Channel 1.
4 => E_0010, //= Channel 2.
12 => E_0011, //= Channel 3.
2 => E_0100, //= Channel 4.
10 => E_0101, //= Channel 5.
6 => E_0110, //= Channel 6.
14 => E_0111, //= Channel 7.
1 => E_1000, //= Channel 8.
9 => E_1001, //= Channel 9.
5 => E_1010, //= Channel 10.
13 => E_1011, //= Channel 11.
3 => E_1100, //= Channel 12.
11 => E_1101, //= Channel 13.
7 => E_1110, //= Channel 14.
15 => E_1111, //= Channel 15.
}
},
0x08 => reg32 tshd { //! TSI Threshold Register
16..0 => thresl, //= TSI Wakeup Channel Low-threshold
32..16 => thresh, //= TSI Wakeup Channel High-threshold
},
});
ioregs! (SIM @ 0x40047000 = { //! System Integration Module
0x00 => reg32 sopt1 { //! System Options Register 1
20..18 => osc32ksel { //! 32K oscillator clock select
0 => E_00, //= System oscillator (OSC32KCLK)
2 => E_01, //= Reserved
1 => E_10, //= RTC_CLKIN
3 => E_11, //= LPO 1kHz
}
30..29 => usbvstby { //! USB voltage regulator in standby mode during VLPR and VLPW modes
0 => E_0, //= USB voltage regulator not in standby during VLPR and VLPW modes.
1 => E_1, //= USB voltage regulator in standby during VLPR and VLPW modes.
}
31..30 => usbsstby { //! USB voltage regulator in standby mode during Stop, VLPS, LLS and VLLS modes.
0 => E_0, //= USB voltage regulator not in standby during Stop, VLPS, LLS and VLLS modes.
1 => E_1, //= USB voltage regulator in standby during Stop, VLPS, LLS and VLLS modes.
}
32..31 => usbregen { //! USB voltage regulator enable
0 => E_0, //= USB voltage regulator is disabled.
1 => E_1, //= USB voltage regulator is enabled.
}
},
0x04 => reg32 sopt1cfg { //! SOPT1 Configuration Register
25..24 => urwe { //! USB voltage regulator enable write enable
0 => E_0, //= SOPT1 USBREGEN cannot be written.
1 => E_1, //= SOPT1 USBREGEN can be written.
}
26..25 => uvswe { //! USB voltage regulator VLP standby write enable
0 => E_0, //= SOPT1 USBVSTB cannot be written.
1 => E_1, //= SOPT1 USBVSTB can be written.
}
27..26 => usswe { //! USB voltage regulator stop standby write enable
0 => E_0, //= SOPT1 USBSSTB cannot be written.
1 => E_1, //= SOPT1 USBSSTB can be written.
}
},
0x1004 => reg32 sopt2 { //! System Options Register 2
5..4 => rtcclkoutsel { //! RTC clock out select
0 => E_0, //= RTC 1 Hz clock is output on the RTC_CLKOUT pin.
1 => E_1, //= OSCERCLK clock is output on the RTC_CLKOUT pin.
}
8..5 => clkoutsel { //! CLKOUT select
0 => E_000, //= Reserved
4 => E_001, //= Reserved
2 => E_010, //= Bus clock
6 => E_011, //= LPO clock (1 kHz)
1 => E_100, //= MCGIRCLK
5 => E_101, //= Reserved
3 => E_110, //= OSCERCLK
7 => E_111, //= Reserved
}
17..16 => pllfllsel { //! PLL/FLL clock select
0 => E_0, //= MCGFLLCLK clock
1 => E_1, //= MCGPLLCLK clock with fixed divide by two
}
19..18 => usbsrc { //! USB clock source select
0 => E_0, //= External bypass clock (USB_CLKIN).
1 => E_1, //= MCGPLLCLK/2 or MCGFLLCLK clock
}
26..24 => tpmsrc { //! TPM clock source select
0 => E_00, //= Clock disabled
2 => E_01, //= MCGFLLCLK clock or MCGPLLCLK/2
1 => E_10, //= OSCERCLK clock
3 => E_11, //= MCGIRCLK clock
}
28..26 => uart0src { //! UART0 clock source select
0 => E_00, //= Clock disabled
2 => E_01, //= MCGFLLCLK clock or MCGPLLCLK/2 clock
1 => E_10, //= OSCERCLK clock
3 => E_11, //= MCGIRCLK clock
}
},
0x100c => reg32 sopt4 { //! System Options Register 4
19..18 => tpm1ch0src { //! TPM1 channel 0 input capture source select
0 => E_0, //= TPM1_CH0 signal
1 => E_1, //= CMP0 output
}
21..20 => tpm2ch0src { //! TPM2 channel 0 input capture source select
0 => E_0, //= TPM2_CH0 signal
1 => E_1, //= CMP0 output
}
25..24 => tpm0clksel { //! TPM0 External Clock Pin Select
0 => E_0, //= TPM0 external clock driven by TPM_CLKIN0 pin.
1 => E_1, //= TPM0 external clock driven by TPM_CLKIN1 pin.
}
26..25 => tpm1clksel { //! TPM1 External Clock Pin Select
0 => E_0, //= TPM1 external clock driven by TPM_CLKIN0 pin.
1 => E_1, //= TPM1 external clock driven by TPM_CLKIN1 pin.
}
27..26 => tpm2clksel { //! TPM2 External Clock Pin Select
0 => E_0, //= TPM2 external clock driven by TPM_CLKIN0 pin.
1 => E_1, //= TPM2 external clock driven by TPM_CLKIN1 pin.
}
},
0x1010 => reg32 sopt5 { //! System Options Register 5
2..0 => uart0txsrc { //! UART0 transmit data source select
0 => E_00, //= UART0_TX pin
2 => E_01, //= UART0_TX pin modulated with TPM1 channel 0 output
1 => E_10, //= UART0_TX pin modulated with TPM2 channel 0 output
3 => E_11, //= Reserved
}
3..2 => uart0rxsrc { //! UART0 receive data source select
0 => E_0, //= UART0_RX pin
1 => E_1, //= CMP0 output
}
6..4 => uart1txsrc { //! UART1 transmit data source select
0 => E_00, //= UART1_TX pin
2 => E_01, //= UART1_TX pin modulated with TPM1 channel 0 output
1 => E_10, //= UART1_TX pin modulated with TPM2 channel 0 output
3 => E_11, //= Reserved
}
7..6 => uart1rxsrc { //! UART1 receive data source select
0 => E_0, //= UART1_RX pin
1 => E_1, //= CMP0 output
}
17..16 => uart0ode { //! UART0 Open Drain Enable
0 => E_0, //= Open drain is disabled on UART0
1 => E_1, //= Open drain is enabled on UART0
}
18..17 => uart1ode { //! UART1 Open Drain Enable
0 => E_0, //= Open drain is disabled on UART1
1 => E_1, //= Open drain is enabled on UART1
}
19..18 => uart2ode { //! UART2 Open Drain Enable
0 => E_0, //= Open drain is disabled on UART2
1 => E_1, //= Open drain is enabled on UART2
}
},
0x1018 => reg32 sopt7 { //! System Options Register 7
4..0 => adc0trgsel { //! ADC0 trigger select
0 => E_0000, //= External trigger pin input (EXTRG_IN)
8 => E_0001, //= CMP0 output
4 => E_0010, //= Reserved
12 => E_0011, //= Reserved
2 => E_0100, //= PIT trigger 0
10 => E_0101, //= PIT trigger 1
6 => E_0110, //= Reserved
14 => E_0111, //= Reserved
1 => E_1000, //= TPM0 overflow
9 => E_1001, //= TPM1 overflow
5 => E_1010, //= TPM2 overflow
13 => E_1011, //= Reserved
3 => E_1100, //= RTC alarm
11 => E_1101, //= RTC seconds
7 => E_1110, //= LPTMR0 trigger
15 => E_1111, //= Reserved
}
5..4 => adc0pretrgsel { //! ADC0 pretrigger select
0 => E_0, //= Pre-trigger A
1 => E_1, //= Pre-trigger B
}
8..7 => adc0alttrgen { //! ADC0 alternate trigger enable
0 => E_0, //= TPM1 channel 0 (A) and channel 1 (B) triggers selected for ADC0.
1 => E_1, //= Alternate trigger selected for ADC0.
}
},
0x1024 => reg32 sdid { //! System Device Identification Register
4..0 => pinid: ro { //! Pincount identification
0 => E_0000, //= 16-pin
8 => E_0001, //= 24-pin
4 => E_0010, //= 32-pin
12 => E_0011, //= Reserved
2 => E_0100, //= 48-pin
10 => E_0101, //= 64-pin
6 => E_0110, //= 80-pin
14 => E_0111, //= Reserved
1 => E_1000, //= 100-pin
9 => E_1001, //= Reserved
5 => E_1010, //= Reserved
13 => E_1011, //= Reserved
3 => E_1100, //= Reserved
11 => E_1101, //= Reserved
7 => E_1110, //= Reserved
15 => E_1111, //= Reserved
}
12..7 => dieid: ro, //= Device die number
16..12 => revid: ro, //= Device revision number
20..16 => sramsize: ro { //! System SRAM Size
0 => E_0000, //= 0.5 KB
8 => E_0001, //= 1 KB
4 => E_0010, //= 2 KB
12 => E_0011, //= 4 KB
2 => E_0100, //= 8 KB
10 => E_0101, //= 16 KB
6 => E_0110, //= 32 KB
14 => E_0111, //= 64 KB
}
24..20 => seriesid: ro { //! Kinetis Series ID
8 => E_0001, //= KL family
}
28..24 => subfamid: ro { //! Kinetis Sub-Family ID
4 => E_0010, //= KLx2 Subfamily (low end)
2 => E_0100, //= KLx4 Subfamily (basic analog)
10 => E_0101, //= KLx5 Subfamily (advanced analog)
6 => E_0110, //= KLx6 Subfamily (advanced analog with I2S)
}
32..28 => famid: ro { //! Kinetis family ID
0 => E_0000, //= KL0x Family (low end)
8 => E_0001, //= KL1x Family (basic)
4 => E_0010, //= KL2x Family (USB)
12 => E_0011, //= KL3x Family (Segment LCD)
2 => E_0100, //= KL4x Family (USB and Segment LCD)
}
},
0x1034 => reg32 scgc4 { //! System Clock Gating Control Register 4
7..6 => i2c0 { //! I2C0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
8..7 => i2c1 { //! I2C1 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
11..10 => uart0 { //! UART0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
12..11 => uart1 { //! UART1 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
13..12 => uart2 { //! UART2 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
19..18 => usbotg { //! USB Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
20..19 => cmp { //! Comparator Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
23..22 => spi0 { //! SPI0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
24..23 => spi1 { //! SPI1 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
},
0x1038 => reg32 scgc5 { //! System Clock Gating Control Register 5
1..0 => lptmr { //! Low Power Timer Access Control
0 => E_0, //= Access disabled
1 => E_1, //= Access enabled
}
6..5 => tsi { //! TSI Access Control
0 => E_0, //= Access disabled
1 => E_1, //= Access enabled
}
10..9 => porta { //! Port A Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
11..10 => portb { //! Port B Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
12..11 => portc { //! Port C Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
13..12 => portd { //! Port D Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
14..13 => porte { //! Port E Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
},
0x103c => reg32 scgc6 { //! System Clock Gating Control Register 6
1..0 => ftf { //! Flash Memory Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
2..1 => dmamux { //! DMA Mux Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
24..23 => pit { //! PIT Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
25..24 => tpm0 { //! TPM0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
26..25 => tpm1 { //! TPM1 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
27..26 => tpm2 { //! TPM2 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
28..27 => adc0 { //! ADC0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
30..29 => rtc { //! RTC Access Control
0 => E_0, //= Access and interrupts disabled
1 => E_1, //= Access and interrupts enabled
}
32..31 => dac0 { //! DAC0 Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
},
0x1040 => reg32 scgc7 { //! System Clock Gating Control Register 7
9..8 => dma { //! DMA Clock Gate Control
0 => E_0, //= Clock disabled
1 => E_1, //= Clock enabled
}
},
0x1044 => reg32 clkdiv1 { //! System Clock Divider Register 1
19..16 => outdiv4 { //! Clock 4 output divider value
0 => E_000, //= Divide-by-1.
4 => E_001, //= Divide-by-2.
2 => E_010, //= Divide-by-3.
6 => E_011, //= Divide-by-4.
1 => E_100, //= Divide-by-5.
5 => E_101, //= Divide-by-6.
3 => E_110, //= Divide-by-7.
7 => E_111, //= Divide-by-8.
}
32..28 => outdiv1 { //! Clock 1 output divider value
0 => E_0000, //= Divide-by-1.
8 => E_0001, //= Divide-by-2.
4 => E_0010, //= Divide-by-3.
12 => E_0011, //= Divide-by-4.
2 => E_0100, //= Divide-by-5.
10 => E_0101, //= Divide-by-6.
6 => E_0110, //= Divide-by-7.
14 => E_0111, //= Divide-by-8.
1 => E_1000, //= Divide-by-9.
9 => E_1001, //= Divide-by-10.
5 => E_1010, //= Divide-by-11.
13 => E_1011, //= Divide-by-12.
3 => E_1100, //= Divide-by-13.
11 => E_1101, //= Divide-by-14.
7 => E_1110, //= Divide-by-15.
15 => E_1111, //= Divide-by-16.
}
},
0x104c => reg32 fcfg1 { //! Flash Configuration Register 1
1..0 => flashdis { //! Flash Disable
0 => E_0, //= Flash is enabled
1 => E_1, //= Flash is disabled
}
2..1 => flashdoze { //! Flash Doze
0 => E_0, //= Flash remains enabled during Doze mode
1 => E_1, //= Flash is disabled for the duration of Doze mode
}
28..24 => pfsize: ro { //! Program flash size
0 => E_0000, //= 8 KB of program flash memory, 0.25 KB protection region
8 => E_0001, //= 16 KB of program flash memory, 0.5 KB protection region
12 => E_0011, //= 32 KB of program flash memory, 1 KB protection region
10 => E_0101, //= 64 KB of program flash memory, 2 KB protection region
14 => E_0111, //= 128 KB of program flash memory, 4 KB protection region
9 => E_1001, //= 256 KB of program flash memory, 8 KB protection region
15 => E_1111, //= 128 KB of program flash memory, 4 KB protection region
}
},
0x1050 => reg32 fcfg2 { //! Flash Configuration Register 2
31..24 => maxaddr0: ro, //= Max address block
},
0x1058 => reg32 uidmh { //! Unique Identification Register Mid-High
16..0 => uid: ro, //= Unique Identification
},
0x105c => reg32 uidml { //! Unique Identification Register Mid Low
32..0 => uid: ro, //= Unique Identification
},
0x1060 => reg32 uidl { //! Unique Identification Register Low
32..0 => uid: ro, //= Unique Identification
},
0x1100 => reg32 copc { //! COP Control Register
1..0 => copw { //! COP windowed mode
0 => E_0, //= Normal mode
1 => E_1, //= Windowed mode
}
2..1 => copclks { //! COP Clock Select
0 => E_0, //= Internal 1 kHz clock is source to COP
1 => E_1, //= Bus clock is source to COP
}
4..2 => copt { //! COP Watchdog Timeout
0 => E_00, //= COP disabled
2 => E_01, //= COP timeout after 2^5 LPO cycles or 213 bus clock cycles
1 => E_10, //= COP timeout after 2^8 LPO cycles or 216 bus clock cycles
3 => E_11, //= COP timeout after 2^10 LPO cycles or 218 bus clock cycles
}
},
0x1104 => reg32 srvcop { //! Service COP Register
8..0 => srvcop: wo, //= Sevice COP Register
},
});
ioregs! (PORTA @ 0x40049000 = { //! Pin Control and Interrupts
0x00 => reg32 pcr0 { //! Pin Control Register n
1..0 => ps { //! Pull Select
0 => E_0, //= Internal pulldown resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
1 => E_1, //= Internal pullup resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
}
2..1 => pe { //! Pull Enable
0 => E_0, //= Internal pullup or pulldown resistor is not enabled on the corresponding pin.
1 => E_1, //= Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
}
3..2 => sre { //! Slew Rate Enable
0 => E_0, //= Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
1 => E_1, //= Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
}
5..4 => pfe { //! Passive Filter Enable
0 => E_0, //= Passive input filter is disabled on the corresponding pin.
1 => E_1, //= Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
}
7..6 => dse { //! Drive Strength Enable
0 => E_0, //= Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
1 => E_1, //= High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
}
11..8 => mux { //! Pin Mux Control
0 => E_000, //= Pin disabled (analog).
4 => E_001, //= Alternative 1 (GPIO).
2 => E_010, //= Alternative 2 (chip-specific).
6 => E_011, //= Alternative 3 (chip-specific).
1 => E_100, //= Alternative 4 (chip-specific).
5 => E_101, //= Alternative 5 (chip-specific).
3 => E_110, //= Alternative 6 (chip-specific).
7 => E_111, //= Alternative 7 (chip-specific).
}
20..16 => irqc { //! Interrupt Configuration
0 => E_0000, //= Interrupt/DMA request disabled.
8 => E_0001, //= DMA request on rising edge.
4 => E_0010, //= DMA request on falling edge.
12 => E_0011, //= DMA request on either edge.
1 => E_1000, //= Interrupt when logic zero.
9 => E_1001, //= Interrupt on rising edge.
5 => E_1010, //= Interrupt on falling edge.
13 => E_1011, //= Interrupt on either edge.
3 => E_1100, //= Interrupt when logic one.
}
25..24 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
0x80 => reg32 gpclr { //! Global Pin Control Low Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0x84 => reg32 gpchr { //! Global Pin Control High Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0xa0 => reg32 isfr { //! Interrupt Status Flag Register
32..0 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
});
ioregs! (PORTB @ 0x4004a000 = { //! Pin Control and Interrupts
0x00 => reg32 pcr0 { //! Pin Control Register n
1..0 => ps { //! Pull Select
0 => E_0, //= Internal pulldown resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
1 => E_1, //= Internal pullup resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
}
2..1 => pe { //! Pull Enable
0 => E_0, //= Internal pullup or pulldown resistor is not enabled on the corresponding pin.
1 => E_1, //= Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
}
3..2 => sre { //! Slew Rate Enable
0 => E_0, //= Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
1 => E_1, //= Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
}
5..4 => pfe { //! Passive Filter Enable
0 => E_0, //= Passive input filter is disabled on the corresponding pin.
1 => E_1, //= Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
}
7..6 => dse { //! Drive Strength Enable
0 => E_0, //= Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
1 => E_1, //= High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
}
11..8 => mux { //! Pin Mux Control
0 => E_000, //= Pin disabled (analog).
4 => E_001, //= Alternative 1 (GPIO).
2 => E_010, //= Alternative 2 (chip-specific).
6 => E_011, //= Alternative 3 (chip-specific).
1 => E_100, //= Alternative 4 (chip-specific).
5 => E_101, //= Alternative 5 (chip-specific).
3 => E_110, //= Alternative 6 (chip-specific).
7 => E_111, //= Alternative 7 (chip-specific).
}
20..16 => irqc { //! Interrupt Configuration
0 => E_0000, //= Interrupt/DMA request disabled.
8 => E_0001, //= DMA request on rising edge.
4 => E_0010, //= DMA request on falling edge.
12 => E_0011, //= DMA request on either edge.
1 => E_1000, //= Interrupt when logic zero.
9 => E_1001, //= Interrupt on rising edge.
5 => E_1010, //= Interrupt on falling edge.
13 => E_1011, //= Interrupt on either edge.
3 => E_1100, //= Interrupt when logic one.
}
25..24 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
0x80 => reg32 gpclr { //! Global Pin Control Low Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0x84 => reg32 gpchr { //! Global Pin Control High Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0xa0 => reg32 isfr { //! Interrupt Status Flag Register
32..0 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
});
ioregs! (PORTC @ 0x4004b000 = { //! Pin Control and Interrupts
0x00 => reg32 pcr0 { //! Pin Control Register n
1..0 => ps { //! Pull Select
0 => E_0, //= Internal pulldown resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
1 => E_1, //= Internal pullup resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
}
2..1 => pe { //! Pull Enable
0 => E_0, //= Internal pullup or pulldown resistor is not enabled on the corresponding pin.
1 => E_1, //= Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
}
3..2 => sre { //! Slew Rate Enable
0 => E_0, //= Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
1 => E_1, //= Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
}
5..4 => pfe { //! Passive Filter Enable
0 => E_0, //= Passive input filter is disabled on the corresponding pin.
1 => E_1, //= Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
}
7..6 => dse { //! Drive Strength Enable
0 => E_0, //= Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
1 => E_1, //= High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
}
11..8 => mux { //! Pin Mux Control
0 => E_000, //= Pin disabled (analog).
4 => E_001, //= Alternative 1 (GPIO).
2 => E_010, //= Alternative 2 (chip-specific).
6 => E_011, //= Alternative 3 (chip-specific).
1 => E_100, //= Alternative 4 (chip-specific).
5 => E_101, //= Alternative 5 (chip-specific).
3 => E_110, //= Alternative 6 (chip-specific).
7 => E_111, //= Alternative 7 (chip-specific).
}
20..16 => irqc { //! Interrupt Configuration
0 => E_0000, //= Interrupt/DMA request disabled.
8 => E_0001, //= DMA request on rising edge.
4 => E_0010, //= DMA request on falling edge.
12 => E_0011, //= DMA request on either edge.
1 => E_1000, //= Interrupt when logic zero.
9 => E_1001, //= Interrupt on rising edge.
5 => E_1010, //= Interrupt on falling edge.
13 => E_1011, //= Interrupt on either edge.
3 => E_1100, //= Interrupt when logic one.
}
25..24 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
0x80 => reg32 gpclr { //! Global Pin Control Low Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0x84 => reg32 gpchr { //! Global Pin Control High Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0xa0 => reg32 isfr { //! Interrupt Status Flag Register
32..0 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
});
ioregs! (PORTD @ 0x4004c000 = { //! Pin Control and Interrupts
0x00 => reg32 pcr0 { //! Pin Control Register n
1..0 => ps { //! Pull Select
0 => E_0, //= Internal pulldown resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
1 => E_1, //= Internal pullup resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
}
2..1 => pe { //! Pull Enable
0 => E_0, //= Internal pullup or pulldown resistor is not enabled on the corresponding pin.
1 => E_1, //= Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
}
3..2 => sre { //! Slew Rate Enable
0 => E_0, //= Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
1 => E_1, //= Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
}
5..4 => pfe { //! Passive Filter Enable
0 => E_0, //= Passive input filter is disabled on the corresponding pin.
1 => E_1, //= Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
}
7..6 => dse { //! Drive Strength Enable
0 => E_0, //= Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
1 => E_1, //= High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
}
11..8 => mux { //! Pin Mux Control
0 => E_000, //= Pin disabled (analog).
4 => E_001, //= Alternative 1 (GPIO).
2 => E_010, //= Alternative 2 (chip-specific).
6 => E_011, //= Alternative 3 (chip-specific).
1 => E_100, //= Alternative 4 (chip-specific).
5 => E_101, //= Alternative 5 (chip-specific).
3 => E_110, //= Alternative 6 (chip-specific).
7 => E_111, //= Alternative 7 (chip-specific).
}
20..16 => irqc { //! Interrupt Configuration
0 => E_0000, //= Interrupt/DMA request disabled.
8 => E_0001, //= DMA request on rising edge.
4 => E_0010, //= DMA request on falling edge.
12 => E_0011, //= DMA request on either edge.
1 => E_1000, //= Interrupt when logic zero.
9 => E_1001, //= Interrupt on rising edge.
5 => E_1010, //= Interrupt on falling edge.
13 => E_1011, //= Interrupt on either edge.
3 => E_1100, //= Interrupt when logic one.
}
25..24 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
0x80 => reg32 gpclr { //! Global Pin Control Low Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0x84 => reg32 gpchr { //! Global Pin Control High Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0xa0 => reg32 isfr { //! Interrupt Status Flag Register
32..0 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
});
ioregs! (PORTE @ 0x4004d000 = { //! Pin Control and Interrupts
0x00 => reg32 pcr0 { //! Pin Control Register n
1..0 => ps { //! Pull Select
0 => E_0, //= Internal pulldown resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
1 => E_1, //= Internal pullup resistor is enabled on the corresponding pin, if the corresponding Port Pull Enable field is set.
}
2..1 => pe { //! Pull Enable
0 => E_0, //= Internal pullup or pulldown resistor is not enabled on the corresponding pin.
1 => E_1, //= Internal pullup or pulldown resistor is enabled on the corresponding pin, if the pin is configured as a digital input.
}
3..2 => sre { //! Slew Rate Enable
0 => E_0, //= Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
1 => E_1, //= Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output.
}
5..4 => pfe { //! Passive Filter Enable
0 => E_0, //= Passive input filter is disabled on the corresponding pin.
1 => E_1, //= Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. Refer to the device data sheet for filter characteristics.
}
7..6 => dse { //! Drive Strength Enable
0 => E_0, //= Low drive strength is configured on the corresponding pin, if pin is configured as a digital output.
1 => E_1, //= High drive strength is configured on the corresponding pin, if pin is configured as a digital output.
}
11..8 => mux { //! Pin Mux Control
0 => E_000, //= Pin disabled (analog).
4 => E_001, //= Alternative 1 (GPIO).
2 => E_010, //= Alternative 2 (chip-specific).
6 => E_011, //= Alternative 3 (chip-specific).
1 => E_100, //= Alternative 4 (chip-specific).
5 => E_101, //= Alternative 5 (chip-specific).
3 => E_110, //= Alternative 6 (chip-specific).
7 => E_111, //= Alternative 7 (chip-specific).
}
20..16 => irqc { //! Interrupt Configuration
0 => E_0000, //= Interrupt/DMA request disabled.
8 => E_0001, //= DMA request on rising edge.
4 => E_0010, //= DMA request on falling edge.
12 => E_0011, //= DMA request on either edge.
1 => E_1000, //= Interrupt when logic zero.
9 => E_1001, //= Interrupt on rising edge.
5 => E_1010, //= Interrupt on falling edge.
13 => E_1011, //= Interrupt on either edge.
3 => E_1100, //= Interrupt when logic one.
}
25..24 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
0x80 => reg32 gpclr { //! Global Pin Control Low Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0x84 => reg32 gpchr { //! Global Pin Control High Register
16..0 => gpwd: wo, //= Global Pin Write Data
32..16 => gpwe: wo { //! Global Pin Write Enable
0 => E_0, //= Corresponding Pin Control Register is not updated with the value in GPWD.
1 => E_1, //= Corresponding Pin Control Register is updated with the value in GPWD.
}
},
0xa0 => reg32 isfr { //! Interrupt Status Flag Register
32..0 => isf { //! Interrupt Status Flag
0 => E_0, //= Configured interrupt is not detected.
1 => E_1, //= Configured interrupt is detected. If the pin is configured to generate a DMA request, then the corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to the flag. If the pin is configured for a level sensitive interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared.
}
},
});
ioregs! (MCG @ 0x40064000 = { //! Multipurpose Clock Generator module
0x00 => reg8 c1 { //! MCG Control 1 Register
1..0 => irefsten { //! Internal Reference Stop Enable
0 => E_0, //= Internal reference clock is disabled in Stop mode.
1 => E_1, //= Internal reference clock is enabled in Stop mode if IRCLKEN is set or if MCG is in FEI, FBI, or BLPI modes before entering Stop mode.
}
2..1 => irclken { //! Internal Reference Clock Enable
0 => E_0, //= MCGIRCLK inactive.
1 => E_1, //= MCGIRCLK active.
}
3..2 => irefs { //! Internal Reference Select
0 => E_0, //= External reference clock is selected.
1 => E_1, //= The slow internal reference clock is selected.
}
6..3 => frdiv { //! FLL External Reference Divider
0 => E_000, //= If RANGE 0 = 0 , Divide Factor is 1; for all other RANGE 0 values, Divide Factor is 32.
4 => E_001, //= If RANGE 0 = 0 , Divide Factor is 2; for all other RANGE 0 values, Divide Factor is 64.
2 => E_010, //= If RANGE 0 = 0 , Divide Factor is 4; for all other RANGE 0 values, Divide Factor is 128.
6 => E_011, //= If RANGE 0 = 0 , Divide Factor is 8; for all other RANGE 0 values, Divide Factor is 256.
1 => E_100, //= If RANGE 0 = 0 , Divide Factor is 16; for all other RANGE 0 values, Divide Factor is 512.
5 => E_101, //= If RANGE 0 = 0 , Divide Factor is 32; for all other RANGE 0 values, Divide Factor is 1024.
3 => E_110, //= If RANGE 0 = 0 , Divide Factor is 64; for all other RANGE 0 values, Divide Factor is 1280 .
7 => E_111, //= If RANGE 0 = 0 , Divide Factor is 128; for all other RANGE 0 values, Divide Factor is 1536 .
}
8..6 => clks { //! Clock Source Select
0 => E_00, //= Encoding 0 - Output of FLL or PLL is selected (depends on PLLS control bit).
2 => E_01, //= Encoding 1 - Internal reference clock is selected.
1 => E_10, //= Encoding 2 - External reference clock is selected.
3 => E_11, //= Encoding 3 - Reserved.
}
},
0x01 => reg8 c2 { //! MCG Control 2 Register
1..0 => ircs { //! Internal Reference Clock Select
0 => E_0, //= Slow internal reference clock selected.
1 => E_1, //= Fast internal reference clock selected.
}
2..1 => lp { //! Low Power Select
0 => E_0, //= FLL or PLL is not disabled in bypass modes.
1 => E_1, //= FLL or PLL is disabled in bypass modes (lower power)
}
3..2 => erefs0 { //! External Reference Select
0 => E_0, //= External reference clock requested.
1 => E_1, //= Oscillator requested.
}
4..3 => hgo0 { //! High Gain Oscillator Select
0 => E_0, //= Configure crystal oscillator for low-power operation.
1 => E_1, //= Configure crystal oscillator for high-gain operation.
}
6..4 => range0 { //! Frequency Range Select
0 => E_00, //= Encoding 0 - Low frequency range selected for the crystal oscillator .
2 => E_01, //= Encoding 1 - High frequency range selected for the crystal oscillator .
}
8..7 => locre0 { //! Loss of Clock Reset Enable
0 => E_0, //= Interrupt request is generated on a loss of OSC0 external reference clock.
1 => E_1, //= Generate a reset request on a loss of OSC0 external reference clock.
}
},
0x02 => reg8 c3 { //! MCG Control 3 Register
8..0 => sctrim, //= Slow Internal Reference Clock Trim Setting
},
0x03 => reg8 c4 { //! MCG Control 4 Register
1..0 => scftrim, //= Slow Internal Reference Clock Fine Trim
5..1 => fctrim, //= Fast Internal Reference Clock Trim Setting
7..5 => drst_drs { //! DCO Range Select
0 => E_00, //= Encoding 0 - Low range (reset default).
2 => E_01, //= Encoding 1 - Mid range.
1 => E_10, //= Encoding 2 - Mid-high range.
3 => E_11, //= Encoding 3 - High range.
}
8..7 => dmx32 { //! DCO Maximum Frequency with 32.768 kHz Reference
0 => E_0, //= DCO has a default range of 25%.
1 => E_1, //= DCO is fine-tuned for maximum frequency with 32.768 kHz reference.
}
},
0x04 => reg8 c5 { //! MCG Control 5 Register
5..0 => prdiv0, //= PLL External Reference Divider
6..5 => pllsten0 { //! PLL Stop Enable
0 => E_0, //= MCGPLLCLK is disabled in any of the Stop modes.
1 => E_1, //= MCGPLLCLK is enabled if system is in Normal Stop mode.
}
7..6 => pllclken0 { //! PLL Clock Enable
0 => E_0, //= MCGPLLCLK is inactive.
1 => E_1, //= MCGPLLCLK is active.
}
},
0x05 => reg8 c6 { //! MCG Control 6 Register
5..0 => vdiv0, //= VCO 0 Divider
6..5 => cme0 { //! Clock Monitor Enable
0 => E_0, //= External clock monitor is disabled for OSC0.
1 => E_1, //= External clock monitor is enabled for OSC0.
}
7..6 => plls { //! PLL Select
0 => E_0, //= FLL is selected.
1 => E_1, //= PLL is selected (PRDIV 0 need to be programmed to the correct divider to generate a PLL reference clock in the range of 2-4 MHz prior to setting the PLLS bit).
}
8..7 => lolie0 { //! Loss of Lock Interrrupt Enable
0 => E_0, //= No interrupt request is generated on loss of lock.
1 => E_1, //= Generate an interrupt request on loss of lock.
}
},
0x06 => reg8 s { //! MCG Status Register
1..0 => ircst: ro { //! Internal Reference Clock Status
0 => E_0, //= Source of internal reference clock is the slow clock (32 kHz IRC).
1 => E_1, //= Source of internal reference clock is the fast clock (4 MHz IRC).
}
2..1 => oscinit0: ro, //= OSC Initialization
4..2 => clkst: ro { //! Clock Mode Status
0 => E_00, //= Encoding 0 - Output of the FLL is selected (reset default).
2 => E_01, //= Encoding 1 - Internal reference clock is selected.
1 => E_10, //= Encoding 2 - External reference clock is selected.
3 => E_11, //= Encoding 3 - Output of the PLL is selected.
}
5..4 => irefst: ro { //! Internal Reference Status
0 => E_0, //= Source of FLL reference clock is the external reference clock.
1 => E_1, //= Source of FLL reference clock is the internal reference clock.
}
6..5 => pllst: ro { //! PLL Select Status
0 => E_0, //= Source of PLLS clock is FLL clock.
1 => E_1, //= Source of PLLS clock is PLL output clock.
}
7..6 => lock0: ro { //! Lock Status
0 => E_0, //= PLL is currently unlocked.
1 => E_1, //= PLL is currently locked.
}
8..7 => lols0: ro { //! Loss of Lock Status
0 => E_0, //= PLL has not lost lock since LOLS 0 was last cleared.
1 => E_1, //= PLL has lost lock since LOLS 0 was last cleared.
}
},
0x08 => reg8 sc { //! MCG Status and Control Register
1..0 => locs0: ro { //! OSC0 Loss of Clock Status
0 => E_0, //= Loss of OSC0 has not occurred.
1 => E_1, //= Loss of OSC0 has occurred.
}
4..1 => fcrdiv { //! Fast Clock Internal Reference Divider
0 => E_000, //= Divide Factor is 1
4 => E_001, //= Divide Factor is 2.
2 => E_010, //= Divide Factor is 4.
6 => E_011, //= Divide Factor is 8.
1 => E_100, //= Divide Factor is 16
5 => E_101, //= Divide Factor is 32
3 => E_110, //= Divide Factor is 64
7 => E_111, //= Divide Factor is 128.
}
5..4 => fltprsrv { //! FLL Filter Preserve Enable
0 => E_0, //= FLL filter and FLL frequency will reset on changes to currect clock mode.
1 => E_1, //= Fll filter and FLL frequency retain their previous values during new clock mode change.
}
6..5 => atmf: ro { //! Automatic Trim Machine Fail Flag
0 => E_0, //= Automatic Trim Machine completed normally.
1 => E_1, //= Automatic Trim Machine failed.
}
7..6 => atms { //! Automatic Trim Machine Select
0 => E_0, //= 32 kHz Internal Reference Clock selected.
1 => E_1, //= 4 MHz Internal Reference Clock selected.
}
8..7 => atme { //! Automatic Trim Machine Enable
0 => E_0, //= Auto Trim Machine disabled.
1 => E_1, //= Auto Trim Machine enabled.
}
},
0x0a => reg8 atcvh { //! MCG Auto Trim Compare Value High Register
8..0 => atcvh, //= ATM Compare Value High
},
0x0b => reg8 atcvl { //! MCG Auto Trim Compare Value Low Register
8..0 => atcvl, //= ATM Compare Value Low
},
0x0c => reg8 c7 { //! MCG Control 7 Register
},
0x0d => reg8 c8 { //! MCG Control 8 Register
7..6 => lolre { //! PLL Loss of Lock Reset Enable
0 => E_0, //= Interrupt request is generated on a PLL loss of lock indication. The PLL loss of lock interrupt enable bit must also be set to generate the interrupt request.
1 => E_1, //= Generate a reset request on a PLL loss of lock indication.
}
},
0x0e => reg8 c9 { //! MCG Control 9 Register
},
0x0f => reg8 c10 { //! MCG Control 10 Register
},
});
ioregs! (OSC0 @ 0x40065000 = { //! Oscillator
0x00 => reg8 cr { //! OSC Control Register
1..0 => sc16p { //! Oscillator 16 pF Capacitor Load Configure
0 => E_0, //= Disable the selection.
1 => E_1, //= Add 16 pF capacitor to the oscillator load.
}
2..1 => sc8p { //! Oscillator 8 pF Capacitor Load Configure
0 => E_0, //= Disable the selection.
1 => E_1, //= Add 8 pF capacitor to the oscillator load.
}
3..2 => sc4p { //! Oscillator 4 pF Capacitor Load Configure
0 => E_0, //= Disable the selection.
1 => E_1, //= Add 4 pF capacitor to the oscillator load.
}
4..3 => sc2p { //! Oscillator 2 pF Capacitor Load Configure
0 => E_0, //= Disable the selection.
1 => E_1, //= Add 2 pF capacitor to the oscillator load.
}
6..5 => erefsten { //! External Reference Stop Enable
0 => E_0, //= External reference clock is disabled in Stop mode.
1 => E_1, //= External reference clock stays enabled in Stop mode if ERCLKEN is set before entering Stop mode.
}
8..7 => erclken { //! External Reference Enable
0 => E_0, //= External reference clock is inactive.
1 => E_1, //= External reference clock is enabled.
}
},
});
ioregs! (I2C0 @ 0x40066000 = { //! Inter-Integrated Circuit
0x00 => reg8 a1 { //! I2C Address Register 1
8..1 => ad, //= Address
},
0x01 => reg8 f { //! I2C Frequency Divider register
6..0 => icr, //= ClockRate
8..6 => mult { //! no description available
0 => E_00, //= mul = 1
2 => E_01, //= mul = 2
1 => E_10, //= mul = 4
3 => E_11, //= Reserved
}
},
0x02 => reg8 c1 { //! I2C Control Register 1
1..0 => dmaen { //! DMA Enable
0 => E_0, //= All DMA signalling disabled.
1 => E_1, //= DMA transfer is enabled and the following conditions trigger the DMA request: While FACK = 0, a data byte is received, either address or data is transmitted. (ACK/NACK automatic) While FACK = 0, the first byte received matches the A1 register or is general call address. If any address matching occurs, IAAS and TCF are set. If the direction of transfer is known from master to slave, then it is not required to check the SRW. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted.
}
2..1 => wuen { //! Wakeup Enable
0 => E_0, //= Normal operation. No interrupt generated when address matching in low power mode.
1 => E_1, //= Enables the wakeup function in low power mode.
}
3..2 => rsta: wo, //= Repeat START
4..3 => txak { //! Transmit Acknowledge Enable
0 => E_0, //= An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set).
1 => E_1, //= No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set).
}
5..4 => tx { //! Transmit Mode Select
0 => E_0, //= Receive
1 => E_1, //= Transmit
}
6..5 => mst { //! Master Mode Select
0 => E_0, //= Slave mode
1 => E_1, //= Master mode
}
7..6 => iicie { //! I2C Interrupt Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
8..7 => iicen { //! I2C Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
},
0x03 => reg8 s { //! I2C Status register
1..0 => rxak: ro { //! Receive Acknowledge
0 => E_0, //= Acknowledge signal was received after the completion of one byte of data transmission on the bus
1 => E_1, //= No acknowledge signal detected
}
2..1 => iicif { //! Interrupt Flag
0 => E_0, //= No interrupt pending
1 => E_1, //= Interrupt pending
}
3..2 => srw: ro { //! Slave Read/Write
0 => E_0, //= Slave receive, master writing to slave
1 => E_1, //= Slave transmit, master reading from slave
}
4..3 => ram { //! Range Address Match
0 => E_0, //= Not addressed
1 => E_1, //= Addressed as a slave
}
5..4 => arbl { //! Arbitration Lost
0 => E_0, //= Standard bus operation.
1 => E_1, //= Loss of arbitration.
}
6..5 => busy: ro { //! Bus Busy
0 => E_0, //= Bus is idle
1 => E_1, //= Bus is busy
}
7..6 => iaas { //! Addressed As A Slave
0 => E_0, //= Not addressed
1 => E_1, //= Addressed as a slave
}
8..7 => tcf: ro { //! Transfer Complete Flag
0 => E_0, //= Transfer in progress
1 => E_1, //= Transfer complete
}
},
0x04 => reg8 d { //! I2C Data I/O register
8..0 => data, //= Data
},
0x05 => reg8 c2 { //! I2C Control Register 2
3..0 => ad, //= Slave Address
4..3 => rmen { //! Range Address Matching Enable
0 => E_0, //= Range mode disabled. No address match occurs for an address within the range of values of the A1 and RA registers.
1 => E_1, //= Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers.
}
5..4 => sbrc { //! Slave Baud Rate Control
0 => E_0, //= The slave baud rate follows the master baud rate and clock stretching may occur
1 => E_1, //= Slave baud rate is independent of the master baud rate
}
6..5 => hdrs { //! High Drive Select
0 => E_0, //= Normal drive mode
1 => E_1, //= High drive mode
}
7..6 => adext { //! Address Extension
0 => E_0, //= 7-bit address scheme
1 => E_1, //= 10-bit address scheme
}
8..7 => gcaen { //! General Call Address Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
},
0x06 => reg8 flt { //! I2C Programmable Input Glitch Filter register
5..0 => flt { //! I2C Programmable Filter Factor
0 => E_0, //= No filter/bypass
}
6..5 => stopie { //! I2C Bus Stop Interrupt Enable
0 => E_0, //= Stop detection interrupt is disabled
1 => E_1, //= Stop detection interrupt is enabled
}
7..6 => stopf { //! I2C Bus Stop Detect Flag
0 => E_0, //= No stop happens on I2C bus
1 => E_1, //= Stop detected on I2C bus
}
8..7 => shen { //! Stop Hold Enable
0 => E_0, //= Stop holdoff is disabled. The MCU's entry to stop mode is not gated.
1 => E_1, //= Stop holdoff is enabled.
}
},
0x07 => reg8 ra { //! I2C Range Address register
8..1 => rad, //= Range Slave Address
},
0x08 => reg8 smb { //! I2C SMBus Control and Status register
1..0 => shtf2ie { //! SHTF2 Interrupt Enable
0 => E_0, //= SHTF2 interrupt is disabled
1 => E_1, //= SHTF2 interrupt is enabled
}
2..1 => shtf2 { //! SCL High Timeout Flag 2
0 => E_0, //= No SCL high and SDA low timeout occurs
1 => E_1, //= SCL high and SDA low timeout occurs
}
3..2 => shtf1: ro { //! SCL High Timeout Flag 1
0 => E_0, //= No SCL high and SDA high timeout occurs
1 => E_1, //= SCL high and SDA high timeout occurs
}
4..3 => sltf { //! SCL Low Timeout Flag
0 => E_0, //= No low timeout occurs
1 => E_1, //= Low timeout occurs
}
5..4 => tcksel { //! Timeout Counter Clock Select
0 => E_0, //= Timeout counter counts at the frequency of the bus clock / 64
1 => E_1, //= Timeout counter counts at the frequency of the bus clock
}
6..5 => siicaen { //! Second I2C Address Enable
0 => E_0, //= I2C address register 2 matching is disabled
1 => E_1, //= I2C address register 2 matching is enabled
}
7..6 => alerten { //! SMBus Alert Response Address Enable
0 => E_0, //= SMBus alert response address matching is disabled
1 => E_1, //= SMBus alert response address matching is enabled
}
8..7 => fack { //! Fast NACK/ACK Enable
0 => E_0, //= An ACK or NACK is sent on the following receiving data byte
1 => E_1, //= Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK.
}
},
0x09 => reg8 a2 { //! I2C Address Register 2
8..1 => sad, //= SMBus Address
},
0x0a => reg8 slth { //! I2C SCL Low Timeout Register High
8..0 => sslt, //= no description available
},
0x0b => reg8 sltl { //! I2C SCL Low Timeout Register Low
8..0 => sslt, //= no description available
},
});
ioregs! (I2C1 @ 0x40067000 = { //! Inter-Integrated Circuit
0x00 => reg8 a1 { //! I2C Address Register 1
8..1 => ad, //= Address
},
0x01 => reg8 f { //! I2C Frequency Divider register
6..0 => icr, //= ClockRate
8..6 => mult { //! no description available
0 => E_00, //= mul = 1
2 => E_01, //= mul = 2
1 => E_10, //= mul = 4
3 => E_11, //= Reserved
}
},
0x02 => reg8 c1 { //! I2C Control Register 1
1..0 => dmaen { //! DMA Enable
0 => E_0, //= All DMA signalling disabled.
1 => E_1, //= DMA transfer is enabled and the following conditions trigger the DMA request: While FACK = 0, a data byte is received, either address or data is transmitted. (ACK/NACK automatic) While FACK = 0, the first byte received matches the A1 register or is general call address. If any address matching occurs, IAAS and TCF are set. If the direction of transfer is known from master to slave, then it is not required to check the SRW. With this assumption, DMA can also be used in this case. In other cases, if the master reads data from the slave, then it is required to rewrite the C1 register operation. With this assumption, DMA cannot be used. When FACK = 1, an address or a data byte is transmitted.
}
2..1 => wuen { //! Wakeup Enable
0 => E_0, //= Normal operation. No interrupt generated when address matching in low power mode.
1 => E_1, //= Enables the wakeup function in low power mode.
}
3..2 => rsta: wo, //= Repeat START
4..3 => txak { //! Transmit Acknowledge Enable
0 => E_0, //= An acknowledge signal is sent to the bus on the following receiving byte (if FACK is cleared) or the current receiving byte (if FACK is set).
1 => E_1, //= No acknowledge signal is sent to the bus on the following receiving data byte (if FACK is cleared) or the current receiving data byte (if FACK is set).
}
5..4 => tx { //! Transmit Mode Select
0 => E_0, //= Receive
1 => E_1, //= Transmit
}
6..5 => mst { //! Master Mode Select
0 => E_0, //= Slave mode
1 => E_1, //= Master mode
}
7..6 => iicie { //! I2C Interrupt Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
8..7 => iicen { //! I2C Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
},
0x03 => reg8 s { //! I2C Status register
1..0 => rxak: ro { //! Receive Acknowledge
0 => E_0, //= Acknowledge signal was received after the completion of one byte of data transmission on the bus
1 => E_1, //= No acknowledge signal detected
}
2..1 => iicif { //! Interrupt Flag
0 => E_0, //= No interrupt pending
1 => E_1, //= Interrupt pending
}
3..2 => srw: ro { //! Slave Read/Write
0 => E_0, //= Slave receive, master writing to slave
1 => E_1, //= Slave transmit, master reading from slave
}
4..3 => ram { //! Range Address Match
0 => E_0, //= Not addressed
1 => E_1, //= Addressed as a slave
}
5..4 => arbl { //! Arbitration Lost
0 => E_0, //= Standard bus operation.
1 => E_1, //= Loss of arbitration.
}
6..5 => busy: ro { //! Bus Busy
0 => E_0, //= Bus is idle
1 => E_1, //= Bus is busy
}
7..6 => iaas { //! Addressed As A Slave
0 => E_0, //= Not addressed
1 => E_1, //= Addressed as a slave
}
8..7 => tcf: ro { //! Transfer Complete Flag
0 => E_0, //= Transfer in progress
1 => E_1, //= Transfer complete
}
},
0x04 => reg8 d { //! I2C Data I/O register
8..0 => data, //= Data
},
0x05 => reg8 c2 { //! I2C Control Register 2
3..0 => ad, //= Slave Address
4..3 => rmen { //! Range Address Matching Enable
0 => E_0, //= Range mode disabled. No address match occurs for an address within the range of values of the A1 and RA registers.
1 => E_1, //= Range mode enabled. Address matching occurs when a slave receives an address within the range of values of the A1 and RA registers.
}
5..4 => sbrc { //! Slave Baud Rate Control
0 => E_0, //= The slave baud rate follows the master baud rate and clock stretching may occur
1 => E_1, //= Slave baud rate is independent of the master baud rate
}
6..5 => hdrs { //! High Drive Select
0 => E_0, //= Normal drive mode
1 => E_1, //= High drive mode
}
7..6 => adext { //! Address Extension
0 => E_0, //= 7-bit address scheme
1 => E_1, //= 10-bit address scheme
}
8..7 => gcaen { //! General Call Address Enable
0 => E_0, //= Disabled
1 => E_1, //= Enabled
}
},
0x06 => reg8 flt { //! I2C Programmable Input Glitch Filter register
5..0 => flt { //! I2C Programmable Filter Factor
0 => E_0, //= No filter/bypass
}
6..5 => stopie { //! I2C Bus Stop Interrupt Enable
0 => E_0, //= Stop detection interrupt is disabled
1 => E_1, //= Stop detection interrupt is enabled
}
7..6 => stopf { //! I2C Bus Stop Detect Flag
0 => E_0, //= No stop happens on I2C bus
1 => E_1, //= Stop detected on I2C bus
}
8..7 => shen { //! Stop Hold Enable
0 => E_0, //= Stop holdoff is disabled. The MCU's entry to stop mode is not gated.
1 => E_1, //= Stop holdoff is enabled.
}
},
0x07 => reg8 ra { //! I2C Range Address register
8..1 => rad, //= Range Slave Address
},
0x08 => reg8 smb { //! I2C SMBus Control and Status register
1..0 => shtf2ie { //! SHTF2 Interrupt Enable
0 => E_0, //= SHTF2 interrupt is disabled
1 => E_1, //= SHTF2 interrupt is enabled
}
2..1 => shtf2 { //! SCL High Timeout Flag 2
0 => E_0, //= No SCL high and SDA low timeout occurs
1 => E_1, //= SCL high and SDA low timeout occurs
}
3..2 => shtf1: ro { //! SCL High Timeout Flag 1
0 => E_0, //= No SCL high and SDA high timeout occurs
1 => E_1, //= SCL high and SDA high timeout occurs
}
4..3 => sltf { //! SCL Low Timeout Flag
0 => E_0, //= No low timeout occurs
1 => E_1, //= Low timeout occurs
}
5..4 => tcksel { //! Timeout Counter Clock Select
0 => E_0, //= Timeout counter counts at the frequency of the bus clock / 64
1 => E_1, //= Timeout counter counts at the frequency of the bus clock
}
6..5 => siicaen { //! Second I2C Address Enable
0 => E_0, //= I2C address register 2 matching is disabled
1 => E_1, //= I2C address register 2 matching is enabled
}
7..6 => alerten { //! SMBus Alert Response Address Enable
0 => E_0, //= SMBus alert response address matching is disabled
1 => E_1, //= SMBus alert response address matching is enabled
}
8..7 => fack { //! Fast NACK/ACK Enable
0 => E_0, //= An ACK or NACK is sent on the following receiving data byte
1 => E_1, //= Writing 0 to TXAK after receiving a data byte generates an ACK. Writing 1 to TXAK after receiving a data byte generates a NACK.
}
},
0x09 => reg8 a2 { //! I2C Address Register 2
8..1 => sad, //= SMBus Address
},
0x0a => reg8 slth { //! I2C SCL Low Timeout Register High
8..0 => sslt, //= no description available
},
0x0b => reg8 sltl { //! I2C SCL Low Timeout Register Low
8..0 => sslt, //= no description available
},
});
ioregs! (UART0 @ 0x4006a000 = { //! Universal Asynchronous Receiver/Transmitter
0x00 => reg8 bdh { //! UART Baud Rate Register High
5..0 => sbr, //= Baud Rate Modulo Divisor.
6..5 => sbns { //! Stop Bit Number Select
0 => E_0, //= One stop bit.
1 => E_1, //= Two stop bit.
}
7..6 => rxedgie { //! RX Input Active Edge Interrupt Enable (for RXEDGIF)
0 => E_0, //= Hardware interrupts from UART _S2[RXEDGIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART _S2[RXEDGIF] flag is 1.
}
8..7 => lbkdie { //! LIN Break Detect Interrupt Enable (for LBKDIF)
0 => E_0, //= Hardware interrupts from UART _S2[LBKDIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART _S2[LBKDIF] flag is 1.
}
},
0x01 => reg8 bdl { //! UART Baud Rate Register Low
8..0 => sbr, //= Baud Rate Modulo Divisor
},
0x02 => reg8 c1 { //! UART Control Register 1
1..0 => pt { //! Parity Type
0 => E_0, //= Even parity.
1 => E_1, //= Odd parity.
}
2..1 => pe { //! Parity Enable
0 => E_0, //= No hardware parity generation or checking.
1 => E_1, //= Parity enabled.
}
3..2 => ilt { //! Idle Line Type Select
0 => E_0, //= Idle character bit count starts after start bit.
1 => E_1, //= Idle character bit count starts after stop bit.
}
4..3 => wake { //! Receiver Wakeup Method Select
0 => E_0, //= Idle-line wakeup.
1 => E_1, //= Address-mark wakeup.
}
5..4 => m { //! 9-Bit or 8-Bit Mode Select
0 => E_0, //= Receiver and transmitter use 8-bit data characters.
1 => E_1, //= Receiver and transmitter use 9-bit data characters.
}
6..5 => rsrc { //! Receiver Source Select
0 => E_0, //= Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the UART does not use the UART _RX pins.
1 => E_1, //= Single-wire UART mode where the UART _TX pin is connected to the transmitter output and receiver input.
}
7..6 => dozeen { //! Doze Enable
0 => E_0, //= UART is enabled in Wait mode.
1 => E_1, //= UART is disabled in Wait mode.
}
8..7 => loops { //! Loop Mode Select
0 => E_0, //= Normal operation - UART _RX and UART _TX use separate pins.
1 => E_1, //= Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input. (See RSRC bit.) UART _RX pin is not used by UART .
}
},
0x03 => reg8 c2 { //! UART Control Register 2
1..0 => sbk { //! Send Break
0 => E_0, //= Normal transmitter operation.
1 => E_1, //= Queue break character(s) to be sent.
}
2..1 => rwu { //! Receiver Wakeup Control
0 => E_0, //= Normal UART receiver operation.
1 => E_1, //= UART receiver in standby waiting for wakeup condition.
}
3..2 => re { //! Receiver Enable
0 => E_0, //= Receiver disabled.
1 => E_1, //= Receiver enabled.
}
4..3 => te { //! Transmitter Enable
0 => E_0, //= Transmitter disabled.
1 => E_1, //= Transmitter enabled.
}
5..4 => ilie { //! Idle Line Interrupt Enable for IDLE
0 => E_0, //= Hardware interrupts from IDLE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when IDLE flag is 1.
}
6..5 => rie { //! Receiver Interrupt Enable for RDRF
0 => E_0, //= Hardware interrupts from RDRF disabled; use polling.
1 => E_1, //= Hardware interrupt requested when RDRF flag is 1.
}
7..6 => tcie { //! Transmission Complete Interrupt Enable for TC
0 => E_0, //= Hardware interrupts from TC disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TC flag is 1.
}
8..7 => tie { //! Transmit Interrupt Enable for TDRE
0 => E_0, //= Hardware interrupts from TDRE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TDRE flag is 1.
}
},
0x04 => reg8 s1 { //! UART Status Register 1
1..0 => pf { //! Parity Error Flag
0 => E_0, //= No parity error.
1 => E_1, //= Parity error.
}
2..1 => fe { //! Framing Error Flag
0 => E_0, //= No framing error detected. This does not guarantee the framing is correct.
1 => E_1, //= Framing error.
}
3..2 => nf { //! Noise Flag
0 => E_0, //= No noise detected.
1 => E_1, //= Noise detected in the received character in UART _D.
}
4..3 => or { //! Receiver Overrun Flag
0 => E_0, //= No overrun.
1 => E_1, //= Receive overrun (new UART data lost).
}
5..4 => idle { //! Idle Line Flag
0 => E_0, //= No idle line detected.
1 => E_1, //= Idle line was detected.
}
6..5 => rdrf: ro { //! Receive Data Register Full Flag
0 => E_0, //= Receive data buffer empty.
1 => E_1, //= Receive data buffer full.
}
7..6 => tc: ro { //! Transmission Complete Flag
0 => E_0, //= Transmitter active (sending data, a preamble, or a break).
1 => E_1, //= Transmitter idle (transmission activity complete).
}
8..7 => tdre: ro { //! Transmit Data Register Empty Flag
0 => E_0, //= Transmit data buffer full.
1 => E_1, //= Transmit data buffer empty.
}
},
0x05 => reg8 s2 { //! UART Status Register 2
1..0 => raf: ro { //! Receiver Active Flag
0 => E_0, //= UART receiver idle waiting for a start bit.
1 => E_1, //= UART receiver active ( UART _RXD input not idle).
}
2..1 => lbkde { //! LIN Break Detection Enable
0 => E_0, //= Break character is detected at length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1).
1 => E_1, //= Break character is detected at length of 11 bit times (if M = 0, SBNS = 0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 14 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 15 (if M10 = 1, SNBS = 1).
}
3..2 => brk13 { //! Break Character Generation Length
0 => E_0, //= Break character is transmitted with length of 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1).
1 => E_1, //= Break character is transmitted with length of 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 16 (if M10 = 1, SNBS = 1).
}
4..3 => rwuid { //! Receive Wake Up Idle Detect
0 => E_0, //= During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle character.
1 => E_1, //= During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character.
}
5..4 => rxinv { //! Receive Data Inversion
0 => E_0, //= Receive data not inverted.
1 => E_1, //= Receive data inverted.
}
6..5 => msbf { //! MSB First
0 => E_0, //= LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received after the start bit is identified as bit0.
1 => E_1, //= MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted following the start bit depending on the setting of C1[M], C1[PE] and C4[M10]. Further, the first bit received after the start bit is identified as bit9, bit8, bit7 or bit6 depending on the setting of C1[M] and C1[PE].
}
7..6 => rxedgif { //! UART _RX Pin Active Edge Interrupt Flag
0 => E_0, //= No active edge on the receive pin has occurred.
1 => E_1, //= An active edge on the receive pin has occurred.
}
8..7 => lbkdif { //! LIN Break Detect Interrupt Flag
0 => E_0, //= No LIN break character has been detected.
1 => E_1, //= LIN break character has been detected.
}
},
0x06 => reg8 c3 { //! UART Control Register 3
1..0 => peie { //! Parity Error Interrupt Enable
0 => E_0, //= PF interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when PF is set.
}
2..1 => feie { //! Framing Error Interrupt Enable
0 => E_0, //= FE interrupts disabled; use polling.
1 => E_1, //= Hardware interrupt requested when FE is set.
}
3..2 => neie { //! Noise Error Interrupt Enable
0 => E_0, //= NF interrupts disabled; use polling.
1 => E_1, //= Hardware interrupt requested when NF is set.
}
4..3 => orie { //! Overrun Interrupt Enable
0 => E_0, //= OR interrupts disabled; use polling.
1 => E_1, //= Hardware interrupt requested when OR is set.
}
5..4 => txinv { //! Transmit Data Inversion
0 => E_0, //= Transmit data not inverted.
1 => E_1, //= Transmit data inverted.
}
6..5 => txdir { //! UART _TX Pin Direction in Single-Wire Mode
0 => E_0, //= UART _TXD pin is an input in single-wire mode.
1 => E_1, //= UART _TXD pin is an output in single-wire mode.
}
7..6 => r9t8, //= Receive Bit 9 / Transmit Bit 8
8..7 => r8t9, //= Receive Bit 8 / Transmit Bit 9
},
0x07 => reg8 d { //! UART Data Register
1..0 => r0t0, //= no description available
2..1 => r1t1, //= no description available
3..2 => r2t2, //= no description available
4..3 => r3t3, //= no description available
5..4 => r4t4, //= no description available
6..5 => r5t5, //= no description available
7..6 => r6t6, //= no description available
8..7 => r7t7, //= no description available
},
0x08 => reg8 ma1 { //! UART Match Address Registers 1
8..0 => ma, //= Match Address
},
0x09 => reg8 ma2 { //! UART Match Address Registers 2
8..0 => ma, //= Match Address
},
0x0a => reg8 c4 { //! UART Control Register 4
5..0 => osr, //= Over Sampling Ratio
6..5 => m10 { //! 10-bit Mode select
0 => E_0, //= Receiver and transmitter use 8-bit or 9-bit data characters.
1 => E_1, //= Receiver and transmitter use 10-bit data characters.
}
7..6 => maen2 { //! Match Address Mode Enable 2
0 => E_0, //= All data received is transferred to the data buffer if MAEN1 is cleared.
1 => E_1, //= All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA2 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer.
}
8..7 => maen1 { //! Match Address Mode Enable 1
0 => E_0, //= All data received is transferred to the data buffer if MAEN2 is cleared.
1 => E_1, //= All data received with the most significant bit cleared, is discarded. All data received with the most significant bit set, is compared with contents of MA1 register. If no match occurs, the data is discarded. If match occurs, data is transferred to the data buffer.
}
},
0x0b => reg8 c5 { //! UART Control Register 5
1..0 => resyncdis { //! Resynchronization Disable
0 => E_0, //= Resynchronization during received data word is supported
1 => E_1, //= Resynchronization during received data word is disabled
}
2..1 => bothedge { //! Both Edge Sampling
0 => E_0, //= Receiver samples input data using the rising edge of the baud rate clock.
1 => E_1, //= Receiver samples input data using the rising and falling edge of the baud rate clock.
}
6..5 => rdmae { //! Receiver Full DMA Enable
0 => E_0, //= DMA request disabled.
1 => E_1, //= DMA request enabled.
}
8..7 => tdmae { //! Transmitter DMA Enable
0 => E_0, //= DMA request disabled.
1 => E_1, //= DMA request enabled.
}
},
});
ioregs! (UART1 @ 0x4006b000 = { //! Universal Asynchronous Receiver/Transmitter (UART)
0x00 => reg8 bdh { //! UART Baud Rate Register: High
5..0 => sbr, //= Baud Rate Modulo Divisor.
6..5 => sbns { //! Stop Bit Number Select
0 => E_0, //= One stop bit.
1 => E_1, //= Two stop bit.
}
7..6 => rxedgie { //! RxD Input Active Edge Interrupt Enable (for RXEDGIF)
0 => E_0, //= Hardware interrupts from UART_S2[RXEDGIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART_S2[RXEDGIF] flag is 1.
}
8..7 => lbkdie { //! LIN Break Detect Interrupt Enable (for LBKDIF)
0 => E_0, //= Hardware interrupts from UART_S2[LBKDIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART_S2[LBKDIF] flag is 1.
}
},
0x01 => reg8 bdl { //! UART Baud Rate Register: Low
8..0 => sbr, //= Baud Rate Modulo Divisor
},
0x02 => reg8 c1 { //! UART Control Register 1
1..0 => pt { //! Parity Type
0 => E_0, //= Even parity.
1 => E_1, //= Odd parity.
}
2..1 => pe { //! Parity Enable
0 => E_0, //= No hardware parity generation or checking.
1 => E_1, //= Parity enabled.
}
3..2 => ilt { //! Idle Line Type Select
0 => E_0, //= Idle character bit count starts after start bit.
1 => E_1, //= Idle character bit count starts after stop bit.
}
4..3 => wake { //! Receiver Wakeup Method Select
0 => E_0, //= Idle-line wakeup.
1 => E_1, //= Address-mark wakeup.
}
5..4 => m { //! 9-Bit or 8-Bit Mode Select
0 => E_0, //= Normal - start + 8 data bits (lsb first) + stop.
1 => E_1, //= Receiver and transmitter use 9-bit data characters start + 8 data bits (lsb first) + 9th data bit + stop.
}
6..5 => rsrc { //! Receiver Source Select
0 => E_0, //= Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the UART does not use the RxD pins.
1 => E_1, //= Single-wire UART mode where the TxD pin is connected to the transmitter output and receiver input.
}
7..6 => uartswai { //! UART Stops in Wait Mode
0 => E_0, //= UART clocks continue to run in wait mode so the UART can be the source of an interrupt that wakes up the CPU.
1 => E_1, //= UART clocks freeze while CPU is in wait mode.
}
8..7 => loops { //! Loop Mode Select
0 => E_0, //= Normal operation - RxD and TxD use separate pins.
1 => E_1, //= Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input. (See RSRC bit.) RxD pin is not used by UART.
}
},
0x03 => reg8 c2 { //! UART Control Register 2
1..0 => sbk { //! Send Break
0 => E_0, //= Normal transmitter operation.
1 => E_1, //= Queue break character(s) to be sent.
}
2..1 => rwu { //! Receiver Wakeup Control
0 => E_0, //= Normal UART receiver operation.
1 => E_1, //= UART receiver in standby waiting for wakeup condition.
}
3..2 => re { //! Receiver Enable
0 => E_0, //= Receiver off.
1 => E_1, //= Receiver on.
}
4..3 => te { //! Transmitter Enable
0 => E_0, //= Transmitter off.
1 => E_1, //= Transmitter on.
}
5..4 => ilie { //! Idle Line Interrupt Enable for IDLE
0 => E_0, //= Hardware interrupts from IDLE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when IDLE flag is 1.
}
6..5 => rie { //! Receiver Interrupt Enable for RDRF
0 => E_0, //= Hardware interrupts from RDRF disabled; use polling.
1 => E_1, //= Hardware interrupt requested when RDRF flag is 1.
}
7..6 => tcie { //! Transmission Complete Interrupt Enable for TC
0 => E_0, //= Hardware interrupts from TC disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TC flag is 1.
}
8..7 => tie { //! Transmit Interrupt Enable for TDRE
0 => E_0, //= Hardware interrupts from TDRE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TDRE flag is 1.
}
},
0x04 => reg8 s1 { //! UART Status Register 1
1..0 => pf: ro { //! Parity Error Flag
0 => E_0, //= No parity error.
1 => E_1, //= Parity error.
}
2..1 => fe: ro { //! Framing Error Flag
0 => E_0, //= No framing error detected. This does not guarantee the framing is correct.
1 => E_1, //= Framing error.
}
3..2 => nf: ro { //! Noise Flag
0 => E_0, //= No noise detected.
1 => E_1, //= Noise detected in the received character in UART_D.
}
4..3 => or: ro { //! Receiver Overrun Flag
0 => E_0, //= No overrun.
1 => E_1, //= Receive overrun (new UART data lost).
}
5..4 => idle: ro { //! Idle Line Flag
0 => E_0, //= No idle line detected.
1 => E_1, //= Idle line was detected.
}
6..5 => rdrf: ro { //! Receive Data Register Full Flag
0 => E_0, //= Receive data register empty.
1 => E_1, //= Receive data register full.
}
7..6 => tc: ro { //! Transmission Complete Flag
0 => E_0, //= Transmitter active (sending data, a preamble, or a break).
1 => E_1, //= Transmitter idle (transmission activity complete).
}
8..7 => tdre: ro { //! Transmit Data Register Empty Flag
0 => E_0, //= Transmit data register (buffer) full.
1 => E_1, //= Transmit data register (buffer) empty.
}
},
0x05 => reg8 s2 { //! UART Status Register 2
1..0 => raf: ro { //! Receiver Active Flag
0 => E_0, //= UART receiver idle waiting for a start bit.
1 => E_1, //= UART receiver active (RxD input not idle).
}
2..1 => lbkde { //! LIN Break Detection Enable
0 => E_0, //= Break character is detected at length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1).
1 => E_1, //= Break character is detected at length of 11 bit times (if M = 0, SBNS = 0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 13 (if M = 1, SBNS = 1).
}
3..2 => brk13 { //! Break Character Generation Length
0 => E_0, //= Break character is transmitted with length of 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1).
1 => E_1, //= Break character is transmitted with length of 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1).
}
4..3 => rwuid { //! Receive Wake Up Idle Detect
0 => E_0, //= During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle character.
1 => E_1, //= During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character.
}
5..4 => rxinv { //! Receive Data Inversion
0 => E_0, //= Receive data not inverted.
1 => E_1, //= Receive data inverted.
}
7..6 => rxedgif { //! RxD Pin Active Edge Interrupt Flag
0 => E_0, //= No active edge on the receive pin has occurred.
1 => E_1, //= An active edge on the receive pin has occurred.
}
8..7 => lbkdif { //! LIN Break Detect Interrupt Flag
0 => E_0, //= No LIN break character has been detected.
1 => E_1, //= LIN break character has been detected.
}
},
0x06 => reg8 c3 { //! UART Control Register 3
1..0 => peie { //! Parity Error Interrupt Enable
0 => E_0, //= PF interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when PF is set.
}
2..1 => feie { //! Framing Error Interrupt Enable
0 => E_0, //= FE interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when FE is set.
}
3..2 => neie { //! Noise Error Interrupt Enable
0 => E_0, //= NF interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when NF is set.
}
4..3 => orie { //! Overrun Interrupt Enable
0 => E_0, //= OR interrupts disabled; use polling.
1 => E_1, //= Hardware interrupt requested when OR is set.
}
5..4 => txinv { //! Transmit Data Inversion
0 => E_0, //= Transmit data not inverted.
1 => E_1, //= Transmit data inverted.
}
6..5 => txdir { //! TxD Pin Direction in Single-Wire Mode
0 => E_0, //= TxD pin is an input in single-wire mode.
1 => E_1, //= TxD pin is an output in single-wire mode.
}
7..6 => t8, //= Ninth Data Bit for Transmitter
8..7 => r8: ro, //= Ninth Data Bit for Receiver
},
0x07 => reg8 d { //! UART Data Register
1..0 => r0t0, //= no description available
2..1 => r1t1, //= no description available
3..2 => r2t2, //= no description available
4..3 => r3t3, //= no description available
5..4 => r4t4, //= no description available
6..5 => r5t5, //= no description available
7..6 => r6t6, //= no description available
8..7 => r7t7, //= no description available
},
0x08 => reg8 c4 { //! UART Control Register 4
6..5 => rdmas { //! Receiver Full DMA Select
0 => E_0, //= If RIE is set and the RDRF flag is set, the RDRF interrupt request signal is asserted to request interrupt service.
1 => E_1, //= If RIE is set and the RDRF flag is set, the RDRF DMA request signal is asserted to request a DMA transfer.
}
8..7 => tdmas { //! Transmitter DMA Select
0 => E_0, //= If TIE is set and the TDRE flag is set, the TDRE interrupt request signal is asserted to request interrupt service.
1 => E_1, //= If TIE is set and the TDRE flag is set, the TDRE DMA request signal is asserted to request a DMA transfer.
}
},
});
ioregs! (UART2 @ 0x4006c000 = { //! Universal Asynchronous Receiver/Transmitter (UART)
0x00 => reg8 bdh { //! UART Baud Rate Register: High
5..0 => sbr, //= Baud Rate Modulo Divisor.
6..5 => sbns { //! Stop Bit Number Select
0 => E_0, //= One stop bit.
1 => E_1, //= Two stop bit.
}
7..6 => rxedgie { //! RxD Input Active Edge Interrupt Enable (for RXEDGIF)
0 => E_0, //= Hardware interrupts from UART_S2[RXEDGIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART_S2[RXEDGIF] flag is 1.
}
8..7 => lbkdie { //! LIN Break Detect Interrupt Enable (for LBKDIF)
0 => E_0, //= Hardware interrupts from UART_S2[LBKDIF] disabled (use polling).
1 => E_1, //= Hardware interrupt requested when UART_S2[LBKDIF] flag is 1.
}
},
0x01 => reg8 bdl { //! UART Baud Rate Register: Low
8..0 => sbr, //= Baud Rate Modulo Divisor
},
0x02 => reg8 c1 { //! UART Control Register 1
1..0 => pt { //! Parity Type
0 => E_0, //= Even parity.
1 => E_1, //= Odd parity.
}
2..1 => pe { //! Parity Enable
0 => E_0, //= No hardware parity generation or checking.
1 => E_1, //= Parity enabled.
}
3..2 => ilt { //! Idle Line Type Select
0 => E_0, //= Idle character bit count starts after start bit.
1 => E_1, //= Idle character bit count starts after stop bit.
}
4..3 => wake { //! Receiver Wakeup Method Select
0 => E_0, //= Idle-line wakeup.
1 => E_1, //= Address-mark wakeup.
}
5..4 => m { //! 9-Bit or 8-Bit Mode Select
0 => E_0, //= Normal - start + 8 data bits (lsb first) + stop.
1 => E_1, //= Receiver and transmitter use 9-bit data characters start + 8 data bits (lsb first) + 9th data bit + stop.
}
6..5 => rsrc { //! Receiver Source Select
0 => E_0, //= Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the UART does not use the RxD pins.
1 => E_1, //= Single-wire UART mode where the TxD pin is connected to the transmitter output and receiver input.
}
7..6 => uartswai { //! UART Stops in Wait Mode
0 => E_0, //= UART clocks continue to run in wait mode so the UART can be the source of an interrupt that wakes up the CPU.
1 => E_1, //= UART clocks freeze while CPU is in wait mode.
}
8..7 => loops { //! Loop Mode Select
0 => E_0, //= Normal operation - RxD and TxD use separate pins.
1 => E_1, //= Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input. (See RSRC bit.) RxD pin is not used by UART.
}
},
0x03 => reg8 c2 { //! UART Control Register 2
1..0 => sbk { //! Send Break
0 => E_0, //= Normal transmitter operation.
1 => E_1, //= Queue break character(s) to be sent.
}
2..1 => rwu { //! Receiver Wakeup Control
0 => E_0, //= Normal UART receiver operation.
1 => E_1, //= UART receiver in standby waiting for wakeup condition.
}
3..2 => re { //! Receiver Enable
0 => E_0, //= Receiver off.
1 => E_1, //= Receiver on.
}
4..3 => te { //! Transmitter Enable
0 => E_0, //= Transmitter off.
1 => E_1, //= Transmitter on.
}
5..4 => ilie { //! Idle Line Interrupt Enable for IDLE
0 => E_0, //= Hardware interrupts from IDLE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when IDLE flag is 1.
}
6..5 => rie { //! Receiver Interrupt Enable for RDRF
0 => E_0, //= Hardware interrupts from RDRF disabled; use polling.
1 => E_1, //= Hardware interrupt requested when RDRF flag is 1.
}
7..6 => tcie { //! Transmission Complete Interrupt Enable for TC
0 => E_0, //= Hardware interrupts from TC disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TC flag is 1.
}
8..7 => tie { //! Transmit Interrupt Enable for TDRE
0 => E_0, //= Hardware interrupts from TDRE disabled; use polling.
1 => E_1, //= Hardware interrupt requested when TDRE flag is 1.
}
},
0x04 => reg8 s1 { //! UART Status Register 1
1..0 => pf: ro { //! Parity Error Flag
0 => E_0, //= No parity error.
1 => E_1, //= Parity error.
}
2..1 => fe: ro { //! Framing Error Flag
0 => E_0, //= No framing error detected. This does not guarantee the framing is correct.
1 => E_1, //= Framing error.
}
3..2 => nf: ro { //! Noise Flag
0 => E_0, //= No noise detected.
1 => E_1, //= Noise detected in the received character in UART_D.
}
4..3 => or: ro { //! Receiver Overrun Flag
0 => E_0, //= No overrun.
1 => E_1, //= Receive overrun (new UART data lost).
}
5..4 => idle: ro { //! Idle Line Flag
0 => E_0, //= No idle line detected.
1 => E_1, //= Idle line was detected.
}
6..5 => rdrf: ro { //! Receive Data Register Full Flag
0 => E_0, //= Receive data register empty.
1 => E_1, //= Receive data register full.
}
7..6 => tc: ro { //! Transmission Complete Flag
0 => E_0, //= Transmitter active (sending data, a preamble, or a break).
1 => E_1, //= Transmitter idle (transmission activity complete).
}
8..7 => tdre: ro { //! Transmit Data Register Empty Flag
0 => E_0, //= Transmit data register (buffer) full.
1 => E_1, //= Transmit data register (buffer) empty.
}
},
0x05 => reg8 s2 { //! UART Status Register 2
1..0 => raf: ro { //! Receiver Active Flag
0 => E_0, //= UART receiver idle waiting for a start bit.
1 => E_1, //= UART receiver active (RxD input not idle).
}
2..1 => lbkde { //! LIN Break Detection Enable
0 => E_0, //= Break character is detected at length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1).
1 => E_1, //= Break character is detected at length of 11 bit times (if M = 0, SBNS = 0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 13 (if M = 1, SBNS = 1).
}
3..2 => brk13 { //! Break Character Generation Length
0 => E_0, //= Break character is transmitted with length of 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1).
1 => E_1, //= Break character is transmitted with length of 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1).
}
4..3 => rwuid { //! Receive Wake Up Idle Detect
0 => E_0, //= During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle character.
1 => E_1, //= During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character.
}
5..4 => rxinv { //! Receive Data Inversion
0 => E_0, //= Receive data not inverted.
1 => E_1, //= Receive data inverted.
}
7..6 => rxedgif { //! RxD Pin Active Edge Interrupt Flag
0 => E_0, //= No active edge on the receive pin has occurred.
1 => E_1, //= An active edge on the receive pin has occurred.
}
8..7 => lbkdif { //! LIN Break Detect Interrupt Flag
0 => E_0, //= No LIN break character has been detected.
1 => E_1, //= LIN break character has been detected.
}
},
0x06 => reg8 c3 { //! UART Control Register 3
1..0 => peie { //! Parity Error Interrupt Enable
0 => E_0, //= PF interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when PF is set.
}
2..1 => feie { //! Framing Error Interrupt Enable
0 => E_0, //= FE interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when FE is set.
}
3..2 => neie { //! Noise Error Interrupt Enable
0 => E_0, //= NF interrupts disabled; use polling).
1 => E_1, //= Hardware interrupt requested when NF is set.
}
4..3 => orie { //! Overrun Interrupt Enable
0 => E_0, //= OR interrupts disabled; use polling.
1 => E_1, //= Hardware interrupt requested when OR is set.
}
5..4 => txinv { //! Transmit Data Inversion
0 => E_0, //= Transmit data not inverted.
1 => E_1, //= Transmit data inverted.
}
6..5 => txdir { //! TxD Pin Direction in Single-Wire Mode
0 => E_0, //= TxD pin is an input in single-wire mode.
1 => E_1, //= TxD pin is an output in single-wire mode.
}
7..6 => t8, //= Ninth Data Bit for Transmitter
8..7 => r8: ro, //= Ninth Data Bit for Receiver
},
0x07 => reg8 d { //! UART Data Register
1..0 => r0t0, //= no description available
2..1 => r1t1, //= no description available
3..2 => r2t2, //= no description available
4..3 => r3t3, //= no description available
5..4 => r4t4, //= no description available
6..5 => r5t5, //= no description available
7..6 => r6t6, //= no description available
8..7 => r7t7, //= no description available
},
0x08 => reg8 c4 { //! UART Control Register 4
6..5 => rdmas { //! Receiver Full DMA Select
0 => E_0, //= If RIE is set and the RDRF flag is set, the RDRF interrupt request signal is asserted to request interrupt service.
1 => E_1, //= If RIE is set and the RDRF flag is set, the RDRF DMA request signal is asserted to request a DMA transfer.
}
8..7 => tdmas { //! Transmitter DMA Select
0 => E_0, //= If TIE is set and the TDRE flag is set, the TDRE interrupt request signal is asserted to request interrupt service.
1 => E_1, //= If TIE is set and the TDRE flag is set, the TDRE DMA request signal is asserted to request a DMA transfer.
}
},
});
ioregs! (USB0 @ 0x40072000 = { //! Universal Serial Bus, OTG Capable Controller
0x00 => reg8 perid { //! Peripheral ID register
6..0 => id: ro, //= Peripheral Identification
},
0x04 => reg8 idcomp { //! Peripheral ID Complement register
6..0 => nid: ro, //= no description available
},
0x08 => reg8 rev { //! Peripheral Revision register
8..0 => rev: ro, //= Revision
},
0x0c => reg8 addinfo { //! Peripheral Additional Info register
1..0 => iehost: ro, //= no description available
8..3 => irqnum: ro, //= Assigned Interrupt Request Number
},
0x10 => reg8 otgistat { //! OTG Interrupt Status register
1..0 => avbuschg, //= no description available
3..2 => b_sess_chg, //= no description available
4..3 => sessvldchg, //= no description available
6..5 => line_state_chg, //= no description available
7..6 => onemsec, //= no description available
8..7 => idchg, //= no description available
},
0x14 => reg8 otgicr { //! OTG Interrupt Control Register
1..0 => avbusen { //! A VBUS Valid Interrupt Enable
0 => E_0, //= Disables the AVBUSCHG interrupt.
1 => E_1, //= Enables the AVBUSCHG interrupt.
}
3..2 => bsessen { //! B Session END Interrupt Enable
0 => E_0, //= Disables the B_SESS_CHG interrupt.
1 => E_1, //= Enables the B_SESS_CHG interrupt.
}
4..3 => sessvlden { //! Session Valid Interrupt Enable
0 => E_0, //= Disables the SESSVLDCHG interrupt.
1 => E_1, //= Enables the SESSVLDCHG interrupt.
}
6..5 => linestateen { //! Line State Change Interrupt Enable
0 => E_0, //= Disables the LINE_STAT_CHG interrupt.
1 => E_1, //= Enables the LINE_STAT_CHG interrupt.
}
7..6 => onemsecen { //! One Millisecond Interrupt Enable
0 => E_0, //= Diables the 1ms timer interrupt.
1 => E_1, //= Enables the 1ms timer interrupt.
}
8..7 => iden { //! ID Interrupt Enable
0 => E_0, //= The ID interrupt is disabled
1 => E_1, //= The ID interrupt is enabled
}
},
0x18 => reg8 otgstat { //! OTG Status register
1..0 => avbusvld { //! A VBUS Valid
0 => E_0, //= The VBUS voltage is below the A VBUS Valid threshold.
1 => E_1, //= The VBUS voltage is above the A VBUS Valid threshold.
}
3..2 => bsessend { //! B Session End
0 => E_0, //= The VBUS voltage is above the B session end threshold.
1 => E_1, //= The VBUS voltage is below the B session end threshold.
}
4..3 => sess_vld { //! Session Valid
0 => E_0, //= The VBUS voltage is below the B session valid threshold
1 => E_1, //= The VBUS voltage is above the B session valid threshold.
}
6..5 => linestatestable { //! no description available
0 => E_0, //= The LINE_STAT_CHG bit is not yet stable.
1 => E_1, //= The LINE_STAT_CHG bit has been debounced and is stable.
}
7..6 => onemsecen, //= no description available
8..7 => id { //! no description available
0 => E_0, //= Indicates a Type A cable is plugged into the USB connector.
1 => E_1, //= Indicates no cable is attached or a Type B cable is plugged into the USB connector.
}
},
0x1c => reg8 otgctl { //! OTG Control register
3..2 => otgen { //! On-The-Go pullup/pulldown resistor enable
0 => E_0, //= If USB_EN is 1 and HOST_MODE is 0 in the Control Register (CTL), then the D+ Data Line pull-up resistors are enabled. If HOST_MODE is 1 the D+ and D- Data Line pull-down resistors are engaged.
1 => E_1, //= The pull-up and pull-down controls in this register are used.
}
5..4 => dmlow { //! D- Data Line pull-down resistor enable
0 => E_0, //= D- pulldown resistor is not enabled.
1 => E_1, //= D- pulldown resistor is enabled.
}
6..5 => dplow { //! D+ Data Line pull-down resistor enable
0 => E_0, //= D+ pulldown resistor is not enabled.
1 => E_1, //= D+ pulldown resistor is enabled.
}
8..7 => dphigh { //! D+ Data Line pullup resistor enable
0 => E_0, //= D+ pullup resistor is not enabled
1 => E_1, //= D+ pullup resistor is enabled
}
},
0x80 => reg8 istat { //! Interrupt Status register
1..0 => usbrst, //= no description available
2..1 => error, //= no description available
3..2 => softok, //= no description available
4..3 => tokdne, //= no description available
5..4 => sleep, //= no description available
6..5 => resume, //= no description available
7..6 => attach, //= Attach Interrupt
8..7 => stall, //= Stall Interrupt
},
0x84 => reg8 inten { //! Interrupt Enable register
1..0 => usbrsten { //! USBRST Interrupt Enable
0 => E_0, //= Disables the USBRST interrupt.
1 => E_1, //= Enables the USBRST interrupt.
}
2..1 => erroren { //! ERROR Interrupt Enable
0 => E_0, //= Disables the ERROR interrupt.
1 => E_1, //= Enables the ERROR interrupt.
}
3..2 => softoken { //! SOFTOK Interrupt Enable
0 => E_0, //= Disbles the SOFTOK interrupt.
1 => E_1, //= Enables the SOFTOK interrupt.
}
4..3 => tokdneen { //! TOKDNE Interrupt Enable
0 => E_0, //= Disables the TOKDNE interrupt.
1 => E_1, //= Enables the TOKDNE interrupt.
}
5..4 => sleepen { //! SLEEP Interrupt Enable
0 => E_0, //= Disables the SLEEP interrupt.
1 => E_1, //= Enables the SLEEP interrupt.
}
6..5 => resumeen { //! RESUME Interrupt Enable
0 => E_0, //= Disables the RESUME interrupt.
1 => E_1, //= Enables the RESUME interrupt.
}
7..6 => attachen { //! ATTACH Interrupt Enable
0 => E_0, //= Disables the ATTACH interrupt.
1 => E_1, //= Enables the ATTACH interrupt.
}
8..7 => stallen { //! STALL Interrupt Enable
0 => E_0, //= Diasbles the STALL interrupt.
1 => E_1, //= Enables the STALL interrupt.
}
},
0x88 => reg8 errstat { //! Error Interrupt Status register
1..0 => piderr, //= no description available
2..1 => crc5eof, //= no description available
3..2 => crc16, //= no description available
4..3 => dfn8, //= no description available
5..4 => btoerr, //= no description available
6..5 => dmaerr, //= no description available
8..7 => btserr, //= no description available
},
0x8c => reg8 erren { //! Error Interrupt Enable register
1..0 => piderren { //! PIDERR Interrupt Enable
0 => E_0, //= Disables the PIDERR interrupt.
1 => E_1, //= Enters the PIDERR interrupt.
}
2..1 => crc5eofen { //! CRC5/EOF Interrupt Enable
0 => E_0, //= Disables the CRC5/EOF interrupt.
1 => E_1, //= Enables the CRC5/EOF interrupt.
}
3..2 => crc16en { //! CRC16 Interrupt Enable
0 => E_0, //= Disables the CRC16 interrupt.
1 => E_1, //= Enables the CRC16 interrupt.
}
4..3 => dfn8en { //! DFN8 Interrupt Enable
0 => E_0, //= Disables the DFN8 interrupt.
1 => E_1, //= Enables the DFN8 interrupt.
}
5..4 => btoerren { //! BTOERR Interrupt Enable
0 => E_0, //= Disables the BTOERR interrupt.
1 => E_1, //= Enables the BTOERR interrupt.
}
6..5 => dmaerren { //! DMAERR Interrupt Enable
0 => E_0, //= Disables the DMAERR interrupt.
1 => E_1, //= Enables the DMAERR interrupt.
}
8..7 => btserren { //! BTSERR Interrupt Enable
0 => E_0, //= Disables the BTSERR interrupt.
1 => E_1, //= Enables the BTSERR interrupt.
}
},
0x90 => reg8 stat { //! Status register
3..2 => odd: ro, //= no description available
4..3 => tx: ro { //! Transmit Indicator
0 => E_0, //= The most recent transaction was a receive operation.
1 => E_1, //= The most recent transaction was a transmit operation.
}
8..4 => endp: ro, //= no description available
},
0x94 => reg8 ctl { //! Control register
1..0 => usbensofen { //! USB Enable
0 => E_0, //= Disables the USB Module.
1 => E_1, //= Enables the USB Module.
}
2..1 => oddrst, //= no description available
3..2 => resume, //= no description available
4..3 => hostmodeen, //= no description available
5..4 => reset, //= no description available
6..5 => txsuspendtokenbusy, //= no description available
7..6 => se0, //= Live USB Single Ended Zero signal
8..7 => jstate, //= Live USB differential receiver JSTATE signal
},
0x98 => reg8 addr { //! Address register
7..0 => addr, //= USB Address
8..7 => lsen, //= Low Speed Enable bit
},
0x9c => reg8 bdtpage1 { //! BDT Page Register 1
8..1 => bdtba, //= no description available
},
0xa0 => reg8 frmnuml { //! Frame Number Register Low
8..0 => frm, //= no description available
},
0xa4 => reg8 frmnumh { //! Frame Number Register High
3..0 => frm, //= no description available
},
0xa8 => reg8 token { //! Token register
4..0 => tokenendpt, //= no description available
8..4 => tokenpid { //! no description available
8 => E_0001, //= OUT Token. USB Module performs an OUT (TX) transaction.
9 => E_1001, //= IN Token. USB Module performs an In (RX) transaction.
11 => E_1101, //= SETUP Token. USB Module performs a SETUP (TX) transaction
}
},
0xac => reg8 softhld { //! SOF Threshold Register
8..0 => cnt, //= no description available
},
0xb0 => reg8 bdtpage2 { //! BDT Page Register 2
8..0 => bdtba, //= no description available
},
0xb4 => reg8 bdtpage3 { //! BDT Page Register 3
8..0 => bdtba, //= no description available
},
0xc0 => reg8 endpt0 { //! Endpoint Control register
1..0 => ephshk, //= no description available
2..1 => epstall, //= no description available
3..2 => eptxen, //= no description available
4..3 => eprxen, //= no description available
5..4 => epctldis, //= no description available
7..6 => retrydis, //= no description available
8..7 => hostwohub, //= no description available
},
0x100 => reg8 usbctrl { //! USB Control register
7..6 => pde { //! no description available
0 => E_0, //= Weak pulldowns are disabled on D+ and D-.
1 => E_1, //= Weak pulldowns are enabled on D+ and D-.
}
8..7 => susp { //! no description available
0 => E_0, //= USB transceiver is not in suspend state.
1 => E_1, //= USB transceiver is in suspend state.
}
},
0x104 => reg8 observe { //! USB OTG Observe register
5..4 => dmpd: ro { //! no description available
0 => E_0, //= D- pulldown disabled.
1 => E_1, //= D- pulldown enabled.
}
7..6 => dppd: ro { //! no description available
0 => E_0, //= D+ pulldown disabled.
1 => E_1, //= D+ pulldown enabled.
}
8..7 => dppu: ro { //! no description available
0 => E_0, //= D+ pullup disabled.
1 => E_1, //= D+ pullup enabled.
}
},
0x108 => reg8 control { //! USB OTG Control register
5..4 => dppullupnonotg { //! no description available
0 => E_0, //= DP Pullup in non-OTG device mode is not enabled.
1 => E_1, //= DP Pullup in non-OTG device mode is enabled.
}
},
0x10c => reg8 usbtrc0 { //! USB Transceiver Control Register 0
1..0 => usb_resume_int: ro { //! USB Asynchronous Interrupt
0 => E_0, //= No interrupt was generated.
1 => E_1, //= Interrupt was generated because of the USB asynchronous interrupt.
}
2..1 => sync_det: ro { //! Synchronous USB Interrupt Detect
0 => E_0, //= Synchronous interrupt has not been detected.
1 => E_1, //= Synchronous interrupt has been detected.
}
6..5 => usbresmen { //! Asynchronous Resume Interrupt Enable
0 => E_0, //= USB asynchronous wakeup from suspend mode disabled.
1 => E_1, //= USB asynchronous wakeup from suspend mode enabled. The asynchronous resume interrupt differs from the synchronous resume interrupt in that it asynchronously detects K-state using the unfiltered state of the D+ and D- pins. This interupt should only be enabled when the Transceiver is suspended.
}
8..7 => usbreset: wo { //! USB Reset
0 => E_0, //= Normal USB module operation.
1 => E_1, //= Returns the USB module to its reset state.
}
},
0x114 => reg8 usbfrmadjust { //! Frame Adjust Register
8..0 => adj, //= Frame Adjustment
},
});
ioregs! (CMP0 @ 0x40073000 = { //! High-Speed Comparator (CMP), Voltage Reference (VREF) Digital-to-Analog Converter (DAC), and Analog Mux (ANMUX)
0x00 => reg8 cr0 { //! CMP Control Register 0
2..0 => hystctr { //! Comparator hard block hysteresis control
0 => E_00, //= Level 0
2 => E_01, //= Level 1
1 => E_10, //= Level 2
3 => E_11, //= Level 3
}
7..4 => filter_cnt { //! Filter Sample Count
0 => E_000, //= Filter is disabled. If SE = 1, then COUT is a logic 0. This is not a legal state, and is not recommended. If SE = 0, COUT = COUTA.
4 => E_001, //= One sample must agree. The comparator output is simply sampled.
2 => E_010, //= 2 consecutive samples must agree.
6 => E_011, //= 3 consecutive samples must agree.
1 => E_100, //= 4 consecutive samples must agree.
5 => E_101, //= 5 consecutive samples must agree.
3 => E_110, //= 6 consecutive samples must agree.
7 => E_111, //= 7 consecutive samples must agree.
}
},
0x01 => reg8 cr1 { //! CMP Control Register 1
1..0 => en { //! Comparator Module Enable
0 => E_0, //= Analog Comparator is disabled.
1 => E_1, //= Analog Comparator is enabled.
}
2..1 => ope { //! Comparator Output Pin Enable
0 => E_0, //= CMPO is not available on the associated CMPO output pin. If the comparator does not own the pin, this field has no effect.
1 => E_1, //= CMPO is available on the associated CMPO output pin. The comparator output (CMPO) is driven out on the associated CMPO output pin if the comparator owns the pin. If the comparator does not own the field, this bit has no effect.
}
3..2 => cos { //! Comparator Output Select
0 => E_0, //= Set the filtered comparator output (CMPO) to equal COUT.
1 => E_1, //= Set the unfiltered comparator output (CMPO) to equal COUTA.
}
4..3 => inv { //! Comparator INVERT
0 => E_0, //= Does not invert the comparator output.
1 => E_1, //= Inverts the comparator output.
}
5..4 => pmode { //! Power Mode Select
0 => E_0, //= Low-Speed (LS) Comparison mode selected. In this mode, CMP has slower output propagation delay and lower current consumption.
1 => E_1, //= High-Speed (HS) Comparison mode selected. In this mode, CMP has faster output propagation delay and higher current consumption.
}
6..5 => trigm { //! Trigger Mode Enable
0 => E_0, //= Trigger mode is disabled.
1 => E_1, //= Trigger mode is enabled.
}
7..6 => we { //! Windowing Enable
0 => E_0, //= Windowing mode is not selected.
1 => E_1, //= Windowing mode is selected.
}
8..7 => se { //! Sample Enable
0 => E_0, //= Sampling mode is not selected.
1 => E_1, //= Sampling mode is selected.
}
},
0x02 => reg8 fpr { //! CMP Filter Period Register
8..0 => filt_per, //= Filter Sample Period
},
0x03 => reg8 scr { //! CMP Status and Control Register
1..0 => cout: ro, //= Analog Comparator Output
2..1 => cff { //! Analog Comparator Flag Falling
0 => E_0, //= Falling-edge on COUT has not been detected.
1 => E_1, //= Falling-edge on COUT has occurred.
}
3..2 => cfr { //! Analog Comparator Flag Rising
0 => E_0, //= Rising-edge on COUT has not been detected.
1 => E_1, //= Rising-edge on COUT has occurred.
}
4..3 => ief { //! Comparator Interrupt Enable Falling
0 => E_0, //= Interrupt is disabled.
1 => E_1, //= Interrupt is enabled.
}
5..4 => ier { //! Comparator Interrupt Enable Rising
0 => E_0, //= Interrupt is disabled.
1 => E_1, //= Interrupt is enabled.
}
7..6 => dmaen { //! DMA Enable Control
0 => E_0, //= DMA is disabled.
1 => E_1, //= DMA is enabled.
}
},
0x04 => reg8 daccr { //! DAC Control Register
6..0 => vosel, //= DAC Output Voltage Select
7..6 => vrsel { //! Supply Voltage Reference Source Select
0 => E_0, //= V is selected as resistor ladder network supply reference V. in1 in
1 => E_1, //= V is selected as resistor ladder network supply reference V. in2 in
}
8..7 => dacen { //! DAC Enable
0 => E_0, //= DAC is disabled.
1 => E_1, //= DAC is enabled.
}
},
0x05 => reg8 muxcr { //! MUX Control Register
3..0 => msel { //! Minus Input Mux Control
0 => E_000, //= IN0
4 => E_001, //= IN1
2 => E_010, //= IN2
6 => E_011, //= IN3
1 => E_100, //= IN4
5 => E_101, //= IN5
3 => E_110, //= IN6
7 => E_111, //= IN7
}
6..3 => psel { //! Plus Input Mux Control
0 => E_000, //= IN0
4 => E_001, //= IN1
2 => E_010, //= IN2
6 => E_011, //= IN3
1 => E_100, //= IN4
5 => E_101, //= IN5
3 => E_110, //= IN6
7 => E_111, //= IN7
}
8..7 => pstm { //! Pass Through Mode Enable
0 => E_0, //= Pass Through Mode is disabled.
1 => E_1, //= Pass Through Mode is enabled.
}
},
});
ioregs! (SPI0 @ 0x40076000 = { //! Serial Peripheral Interface
0x00 => reg8 c1 { //! SPI control register 1
1..0 => lsbfe { //! LSB first (shifter direction)
0 => E_0, //= SPI serial data transfers start with most significant bit
1 => E_1, //= SPI serial data transfers start with least significant bit
}
2..1 => ssoe { //! Slave select output enable
0 => E_0, //= When MODFEN is 0: In master mode, SS pin function is general-purpose I/O (not SPI). In slave mode, SS pin function is slave select input. When MODFEN is 1: In master mode, SS pin function is SS input for mode fault. In slave mode, SS pin function is slave select input.
1 => E_1, //= When MODFEN is 0: In master mode, SS pin function is general-purpose I/O (not SPI). In slave mode, SS pin function is slave select input. When MODFEN is 1: In master mode, SS pin function is automatic SS output. In slave mode: SS pin function is slave select input.
}
3..2 => cpha { //! Clock phase
0 => E_0, //= First edge on SPSCK occurs at the middle of the first cycle of a data transfer
1 => E_1, //= First edge on SPSCK occurs at the start of the first cycle of a data transfer
}
4..3 => cpol { //! Clock polarity
0 => E_0, //= Active-high SPI clock (idles low)
1 => E_1, //= Active-low SPI clock (idles high)
}
5..4 => mstr { //! Master/slave mode select
0 => E_0, //= SPI module configured as a slave SPI device
1 => E_1, //= SPI module configured as a master SPI device
}
6..5 => sptie { //! SPI transmit interrupt enable
0 => E_0, //= Interrupts from SPTEF inhibited (use polling)
1 => E_1, //= When SPTEF is 1, hardware interrupt requested
}
7..6 => spe { //! SPI system enable
0 => E_0, //= SPI system inactive
1 => E_1, //= SPI system enabled
}
8..7 => spie { //! SPI interrupt enable: for SPRF and MODF
0 => E_0, //= Interrupts from SPRF and MODF are inhibited-use polling
1 => E_1, //= Request a hardware interrupt when SPRF or MODF is 1
}
},
0x01 => reg8 c2 { //! SPI control register 2
1..0 => spc0 { //! SPI pin control 0
0 => E_0, //= SPI uses separate pins for data input and data output (pin mode is normal). In master mode of operation: MISO is master in and MOSI is master out. In slave mode of operation: MISO is slave out and MOSI is slave in.
1 => E_1, //= SPI configured for single-wire bidirectional operation (pin mode is bidirectional). In master mode of operation: MISO is not used by SPI; MOSI is master in when BIDIROE is 0 or master I/O when BIDIROE is 1. In slave mode of operation: MISO is slave in when BIDIROE is 0 or slave I/O when BIDIROE is 1; MOSI is not used by SPI.
}
2..1 => spiswai { //! SPI stop in wait mode
0 => E_0, //= SPI clocks continue to operate in wait mode
1 => E_1, //= SPI clocks stop when the MCU enters wait mode
}
3..2 => rxdmae { //! Receive DMA enable
0 => E_0, //= DMA request for receive is disabled and interrupt from SPRF is allowed
1 => E_1, //= DMA request for receive is enabled and interrupt from SPRF is disabled
}
4..3 => bidiroe { //! Bidirectional mode output enable
0 => E_0, //= Output driver disabled so SPI data I/O pin acts as an input
1 => E_1, //= SPI I/O pin enabled as an output
}
5..4 => modfen { //! Master mode-fault function enable
0 => E_0, //= Mode fault function disabled, master SS pin reverts to general-purpose I/O not controlled by SPI
1 => E_1, //= Mode fault function enabled, master SS pin acts as the mode fault input or the slave select output
}
6..5 => txdmae { //! Transmit DMA enable
0 => E_0, //= DMA request for transmit is disabled and interrupt from SPTEF is allowed
1 => E_1, //= DMA request for transmit is enabled and interrupt from SPTEF is disabled
}
8..7 => spmie { //! SPI match interrupt enable
0 => E_0, //= Interrupts from SPMF inhibited (use polling)
1 => E_1, //= When SPMF is 1, requests a hardware interrupt
}
},
0x02 => reg8 br { //! SPI baud rate register
4..0 => spr { //! SPI baud rate divisor
0 => E_0000, //= Baud rate divisor is 2
8 => E_0001, //= Baud rate divisor is 4
4 => E_0010, //= Baud rate divisor is 8
12 => E_0011, //= Baud rate divisor is 16
2 => E_0100, //= Baud rate divisor is 32
10 => E_0101, //= Baud rate divisor is 64
6 => E_0110, //= Baud rate divisor is 128
14 => E_0111, //= Baud rate divisor is 256
1 => E_1000, //= Baud rate divisor is 512
}
7..4 => sppr { //! SPI baud rate prescale divisor
0 => E_000, //= Baud rate prescaler divisor is 1
4 => E_001, //= Baud rate prescaler divisor is 2
2 => E_010, //= Baud rate prescaler divisor is 3
6 => E_011, //= Baud rate prescaler divisor is 4
1 => E_100, //= Baud rate prescaler divisor is 5
5 => E_101, //= Baud rate prescaler divisor is 6
3 => E_110, //= Baud rate prescaler divisor is 7
7 => E_111, //= Baud rate prescaler divisor is 8
}
},
0x03 => reg8 s { //! SPI status register
5..4 => modf: ro { //! Master mode fault flag
0 => E_0, //= No mode fault error
1 => E_1, //= Mode fault error detected
}
6..5 => sptef: ro { //! SPI transmit buffer empty flag
0 => E_0, //= SPI transmit buffer not empty
1 => E_1, //= SPI transmit buffer empty
}
7..6 => spmf: ro { //! SPI match flag
0 => E_0, //= Value in the receive data buffer does not match the value in the M register
1 => E_1, //= Value in the receive data buffer matches the value in the M register
}
8..7 => sprf: ro { //! SPI read buffer full flag
0 => E_0, //= No data available in the receive data buffer
1 => E_1, //= Data available in the receive data buffer
}
},
0x05 => reg8 d { //! SPI data register
8..0 => bits, //= Data (low byte)
},
0x07 => reg8 m { //! SPI match register
8..0 => bits, //= Hardware compare value (low byte)
},
});
ioregs! (SPI1 @ 0x40077000 = { //! Serial Peripheral Interface
0x00 => reg8 c1 { //! SPI control register 1
1..0 => lsbfe { //! LSB first (shifter direction)
0 => E_0, //= SPI serial data transfers start with most significant bit
1 => E_1, //= SPI serial data transfers start with least significant bit
}
2..1 => ssoe { //! Slave select output enable
0 => E_0, //= When MODFEN is 0: In master mode, SS pin function is general-purpose I/O (not SPI). In slave mode, SS pin function is slave select input. When MODFEN is 1: In master mode, SS pin function is SS input for mode fault. In slave mode, SS pin function is slave select input.
1 => E_1, //= When MODFEN is 0: In master mode, SS pin function is general-purpose I/O (not SPI). In slave mode, SS pin function is slave select input. When MODFEN is 1: In master mode, SS pin function is automatic SS output. In slave mode: SS pin function is slave select input.
}
3..2 => cpha { //! Clock phase
0 => E_0, //= First edge on SPSCK occurs at the middle of the first cycle of a data transfer
1 => E_1, //= First edge on SPSCK occurs at the start of the first cycle of a data transfer
}
4..3 => cpol { //! Clock polarity
0 => E_0, //= Active-high SPI clock (idles low)
1 => E_1, //= Active-low SPI clock (idles high)
}
5..4 => mstr { //! Master/slave mode select
0 => E_0, //= SPI module configured as a slave SPI device
1 => E_1, //= SPI module configured as a master SPI device
}
6..5 => sptie { //! SPI transmit interrupt enable
0 => E_0, //= Interrupts from SPTEF inhibited (use polling)
1 => E_1, //= When SPTEF is 1, hardware interrupt requested
}
7..6 => spe { //! SPI system enable
0 => E_0, //= SPI system inactive
1 => E_1, //= SPI system enabled
}
8..7 => spie { //! SPI interrupt enable: for SPRF and MODF
0 => E_0, //= Interrupts from SPRF and MODF are inhibited-use polling
1 => E_1, //= Request a hardware interrupt when SPRF or MODF is 1
}
},
0x01 => reg8 c2 { //! SPI control register 2
1..0 => spc0 { //! SPI pin control 0
0 => E_0, //= SPI uses separate pins for data input and data output (pin mode is normal). In master mode of operation: MISO is master in and MOSI is master out. In slave mode of operation: MISO is slave out and MOSI is slave in.
1 => E_1, //= SPI configured for single-wire bidirectional operation (pin mode is bidirectional). In master mode of operation: MISO is not used by SPI; MOSI is master in when BIDIROE is 0 or master I/O when BIDIROE is 1. In slave mode of operation: MISO is slave in when BIDIROE is 0 or slave I/O when BIDIROE is 1; MOSI is not used by SPI.
}
2..1 => spiswai { //! SPI stop in wait mode
0 => E_0, //= SPI clocks continue to operate in wait mode
1 => E_1, //= SPI clocks stop when the MCU enters wait mode
}
3..2 => rxdmae { //! Receive DMA enable
0 => E_0, //= DMA request for receive is disabled and interrupt from SPRF is allowed
1 => E_1, //= DMA request for receive is enabled and interrupt from SPRF is disabled
}
4..3 => bidiroe { //! Bidirectional mode output enable
0 => E_0, //= Output driver disabled so SPI data I/O pin acts as an input
1 => E_1, //= SPI I/O pin enabled as an output
}
5..4 => modfen { //! Master mode-fault function enable
0 => E_0, //= Mode fault function disabled, master SS pin reverts to general-purpose I/O not controlled by SPI
1 => E_1, //= Mode fault function enabled, master SS pin acts as the mode fault input or the slave select output
}
6..5 => txdmae { //! Transmit DMA enable
0 => E_0, //= DMA request for transmit is disabled and interrupt from SPTEF is allowed
1 => E_1, //= DMA request for transmit is enabled and interrupt from SPTEF is disabled
}
8..7 => spmie { //! SPI match interrupt enable
0 => E_0, //= Interrupts from SPMF inhibited (use polling)
1 => E_1, //= When SPMF is 1, requests a hardware interrupt
}
},
0x02 => reg8 br { //! SPI baud rate register
4..0 => spr { //! SPI baud rate divisor
0 => E_0000, //= Baud rate divisor is 2
8 => E_0001, //= Baud rate divisor is 4
4 => E_0010, //= Baud rate divisor is 8
12 => E_0011, //= Baud rate divisor is 16
2 => E_0100, //= Baud rate divisor is 32
10 => E_0101, //= Baud rate divisor is 64
6 => E_0110, //= Baud rate divisor is 128
14 => E_0111, //= Baud rate divisor is 256
1 => E_1000, //= Baud rate divisor is 512
}
7..4 => sppr { //! SPI baud rate prescale divisor
0 => E_000, //= Baud rate prescaler divisor is 1
4 => E_001, //= Baud rate prescaler divisor is 2
2 => E_010, //= Baud rate prescaler divisor is 3
6 => E_011, //= Baud rate prescaler divisor is 4
1 => E_100, //= Baud rate prescaler divisor is 5
5 => E_101, //= Baud rate prescaler divisor is 6
3 => E_110, //= Baud rate prescaler divisor is 7
7 => E_111, //= Baud rate prescaler divisor is 8
}
},
0x03 => reg8 s { //! SPI status register
5..4 => modf: ro { //! Master mode fault flag
0 => E_0, //= No mode fault error
1 => E_1, //= Mode fault error detected
}
6..5 => sptef: ro { //! SPI transmit buffer empty flag
0 => E_0, //= SPI transmit buffer not empty
1 => E_1, //= SPI transmit buffer empty
}
7..6 => spmf: ro { //! SPI match flag
0 => E_0, //= Value in the receive data buffer does not match the value in the M register
1 => E_1, //= Value in the receive data buffer matches the value in the M register
}
8..7 => sprf: ro { //! SPI read buffer full flag
0 => E_0, //= No data available in the receive data buffer
1 => E_1, //= Data available in the receive data buffer
}
},
0x05 => reg8 d { //! SPI data register
8..0 => bits, //= Data (low byte)
},
0x07 => reg8 m { //! SPI match register
8..0 => bits, //= Hardware compare value (low byte)
},
});
ioregs! (LLWU @ 0x4007c000 = { //! Low leakage wakeup unit
0x00 => reg8 pe1 { //! LLWU Pin Enable 1 register
2..0 => wupe0 { //! Wakeup Pin Enable For LLWU_P0
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
4..2 => wupe1 { //! Wakeup Pin Enable For LLWU_P1
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
6..4 => wupe2 { //! Wakeup Pin Enable For LLWU_P2
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
8..6 => wupe3 { //! Wakeup Pin Enable For LLWU_P3
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
},
0x01 => reg8 pe2 { //! LLWU Pin Enable 2 register
2..0 => wupe4 { //! Wakeup Pin Enable For LLWU_P4
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
4..2 => wupe5 { //! Wakeup Pin Enable For LLWU_P5
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
6..4 => wupe6 { //! Wakeup Pin Enable For LLWU_P6
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
8..6 => wupe7 { //! Wakeup Pin Enable For LLWU_P7
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
},
0x02 => reg8 pe3 { //! LLWU Pin Enable 3 register
2..0 => wupe8 { //! Wakeup Pin Enable For LLWU_P8
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
4..2 => wupe9 { //! Wakeup Pin Enable For LLWU_P9
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
6..4 => wupe10 { //! Wakeup Pin Enable For LLWU_P10
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
8..6 => wupe11 { //! Wakeup Pin Enable For LLWU_P11
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
},
0x03 => reg8 pe4 { //! LLWU Pin Enable 4 register
2..0 => wupe12 { //! Wakeup Pin Enable For LLWU_P12
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
4..2 => wupe13 { //! Wakeup Pin Enable For LLWU_P13
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
6..4 => wupe14 { //! Wakeup Pin Enable For LLWU_P14
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
8..6 => wupe15 { //! Wakeup Pin Enable For LLWU_P15
0 => E_00, //= External input pin disabled as wakeup input
2 => E_01, //= External input pin enabled with rising edge detection
1 => E_10, //= External input pin enabled with falling edge detection
3 => E_11, //= External input pin enabled with any change detection
}
},
0x04 => reg8 me { //! LLWU Module Enable register
1..0 => wume0 { //! Wakeup Module Enable For Module 0
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
2..1 => wume1 { //! Wakeup Module Enable for Module 1
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
3..2 => wume2 { //! Wakeup Module Enable For Module 2
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
4..3 => wume3 { //! Wakeup Module Enable For Module 3
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
5..4 => wume4 { //! Wakeup Module Enable For Module 4
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
6..5 => wume5 { //! Wakeup Module Enable For Module 5
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
7..6 => wume6 { //! Wakeup Module Enable For Module 6
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
8..7 => wume7 { //! Wakeup Module Enable For Module 7
0 => E_0, //= Internal module flag not used as wakeup source
1 => E_1, //= Internal module flag used as wakeup source
}
},
0x05 => reg8 f1 { //! LLWU Flag 1 register
1..0 => wuf0 { //! Wakeup Flag For LLWU_P0
0 => E_0, //= LLWU_P0 input was not a wakeup source
1 => E_1, //= LLWU_P0 input was a wakeup source
}
2..1 => wuf1 { //! Wakeup Flag For LLWU_P1
0 => E_0, //= LLWU_P1 input was not a wakeup source
1 => E_1, //= LLWU_P1 input was a wakeup source
}
3..2 => wuf2 { //! Wakeup Flag For LLWU_P2
0 => E_0, //= LLWU_P2 input was not a wakeup source
1 => E_1, //= LLWU_P2 input was a wakeup source
}
4..3 => wuf3 { //! Wakeup Flag For LLWU_P3
0 => E_0, //= LLWU_P3 input was not a wakeup source
1 => E_1, //= LLWU_P3 input was a wakeup source
}
5..4 => wuf4 { //! Wakeup Flag For LLWU_P4
0 => E_0, //= LLWU_P4 input was not a wakeup source
1 => E_1, //= LLWU_P4 input was a wakeup source
}
6..5 => wuf5 { //! Wakeup Flag For LLWU_P5
0 => E_0, //= LLWU_P5 input was not a wakeup source
1 => E_1, //= LLWU_P5 input was a wakeup source
}
7..6 => wuf6 { //! Wakeup Flag For LLWU_P6
0 => E_0, //= LLWU_P6 input was not a wakeup source
1 => E_1, //= LLWU_P6 input was a wakeup source
}
8..7 => wuf7 { //! Wakeup Flag For LLWU_P7
0 => E_0, //= LLWU_P7 input was not a wakeup source
1 => E_1, //= LLWU_P7 input was a wakeup source
}
},
0x06 => reg8 f2 { //! LLWU Flag 2 register
1..0 => wuf8 { //! Wakeup Flag For LLWU_P8
0 => E_0, //= LLWU_P8 input was not a wakeup source
1 => E_1, //= LLWU_P8 input was a wakeup source
}
2..1 => wuf9 { //! Wakeup Flag For LLWU_P9
0 => E_0, //= LLWU_P9 input was not a wakeup source
1 => E_1, //= LLWU_P9 input was a wakeup source
}
3..2 => wuf10 { //! Wakeup Flag For LLWU_P10
0 => E_0, //= LLWU_P10 input was not a wakeup source
1 => E_1, //= LLWU_P10 input was a wakeup source
}
4..3 => wuf11 { //! Wakeup Flag For LLWU_P11
0 => E_0, //= LLWU_P11 input was not a wakeup source
1 => E_1, //= LLWU_P11 input was a wakeup source
}
5..4 => wuf12 { //! Wakeup Flag For LLWU_P12
0 => E_0, //= LLWU_P12 input was not a wakeup source
1 => E_1, //= LLWU_P12 input was a wakeup source
}
6..5 => wuf13 { //! Wakeup Flag For LLWU_P13
0 => E_0, //= LLWU_P13 input was not a wakeup source
1 => E_1, //= LLWU_P13 input was a wakeup source
}
7..6 => wuf14 { //! Wakeup Flag For LLWU_P14
0 => E_0, //= LLWU_P14 input was not a wakeup source
1 => E_1, //= LLWU_P14 input was a wakeup source
}
8..7 => wuf15 { //! Wakeup Flag For LLWU_P15
0 => E_0, //= LLWU_P15 input was not a wakeup source
1 => E_1, //= LLWU_P15 input was a wakeup source
}
},
0x07 => reg8 f3 { //! LLWU Flag 3 register
1..0 => mwuf0: ro { //! Wakeup flag For module 0
0 => E_0, //= Module 0 input was not a wakeup source
1 => E_1, //= Module 0 input was a wakeup source
}
2..1 => mwuf1: ro { //! Wakeup flag For module 1
0 => E_0, //= Module 1 input was not a wakeup source
1 => E_1, //= Module 1 input was a wakeup source
}
3..2 => mwuf2: ro { //! Wakeup flag For module 2
0 => E_0, //= Module 2 input was not a wakeup source
1 => E_1, //= Module 2 input was a wakeup source
}
4..3 => mwuf3: ro { //! Wakeup flag For module 3
0 => E_0, //= Module 3 input was not a wakeup source
1 => E_1, //= Module 3 input was a wakeup source
}
5..4 => mwuf4: ro { //! Wakeup flag For module 4
0 => E_0, //= Module 4 input was not a wakeup source
1 => E_1, //= Module 4 input was a wakeup source
}
6..5 => mwuf5: ro { //! Wakeup flag For module 5
0 => E_0, //= Module 5 input was not a wakeup source
1 => E_1, //= Module 5 input was a wakeup source
}
7..6 => mwuf6: ro { //! Wakeup flag For module 6
0 => E_0, //= Module 6 input was not a wakeup source
1 => E_1, //= Module 6 input was a wakeup source
}
8..7 => mwuf7: ro { //! Wakeup flag For module 7
0 => E_0, //= Module 7 input was not a wakeup source
1 => E_1, //= Module 7 input was a wakeup source
}
},
0x08 => reg8 filt1 { //! LLWU Pin Filter 1 register
4..0 => filtsel { //! Filter Pin Select
0 => E_0000, //= Select LLWU_P0 for filter
15 => E_1111, //= Select LLWU_P15 for filter
}
7..5 => filte { //! Digital Filter On External Pin
0 => E_00, //= Filter disabled
2 => E_01, //= Filter posedge detect enabled
1 => E_10, //= Filter negedge detect enabled
3 => E_11, //= Filter any edge detect enabled
}
8..7 => filtf { //! Filter Detect Flag
0 => E_0, //= Pin Filter 1 was not a wakeup source
1 => E_1, //= Pin Filter 1 was a wakeup source
}
},
0x09 => reg8 filt2 { //! LLWU Pin Filter 2 register
4..0 => filtsel { //! Filter Pin Select
0 => E_0000, //= Select LLWU_P0 for filter
15 => E_1111, //= Select LLWU_P15 for filter
}
7..5 => filte { //! Digital Filter On External Pin
0 => E_00, //= Filter disabled
2 => E_01, //= Filter posedge detect enabled
1 => E_10, //= Filter negedge detect enabled
3 => E_11, //= Filter any edge detect enabled
}
8..7 => filtf { //! Filter Detect Flag
0 => E_0, //= Pin Filter 2 was not a wakeup source
1 => E_1, //= Pin Filter 2 was a wakeup source
}
},
});
ioregs! (PMC @ 0x4007d000 = { //! Power Management Controller
0x00 => reg8 lvdsc1 { //! Low Voltage Detect Status And Control 1 register
2..0 => lvdv { //! Low-Voltage Detect Voltage Select
0 => E_00, //= Low trip point selected (V LVD = V LVDL )
2 => E_01, //= High trip point selected (V LVD = V LVDH )
1 => E_10, //= Reserved
3 => E_11, //= Reserved
}
5..4 => lvdre { //! Low-Voltage Detect Reset Enable
0 => E_0, //= LVDF does not generate hardware resets
1 => E_1, //= Force an MCU reset when LVDF = 1
}
6..5 => lvdie { //! Low-Voltage Detect Interrupt Enable
0 => E_0, //= Hardware interrupt disabled (use polling)
1 => E_1, //= Request a hardware interrupt when LVDF = 1
}
7..6 => lvdack: wo, //= Low-Voltage Detect Acknowledge
8..7 => lvdf: ro { //! Low-Voltage Detect Flag
0 => E_0, //= Low-voltage event not detected
1 => E_1, //= Low-voltage event detected
}
},
0x01 => reg8 lvdsc2 { //! Low Voltage Detect Status And Control 2 register
2..0 => lvwv { //! Low-Voltage Warning Voltage Select
0 => E_00, //= Low trip point selected (VLVW = VLVW1)
2 => E_01, //= Mid 1 trip point selected (VLVW = VLVW2)
1 => E_10, //= Mid 2 trip point selected (VLVW = VLVW3)
3 => E_11, //= High trip point selected (VLVW = VLVW4)
}
6..5 => lvwie { //! Low-Voltage Warning Interrupt Enable
0 => E_0, //= Hardware interrupt disabled (use polling)
1 => E_1, //= Request a hardware interrupt when LVWF = 1
}
7..6 => lvwack: wo, //= Low-Voltage Warning Acknowledge
8..7 => lvwf: ro { //! Low-Voltage Warning Flag
0 => E_0, //= Low-voltage warning event not detected
1 => E_1, //= Low-voltage warning event detected
}
},
0x02 => reg8 regsc { //! Regulator Status And Control register
1..0 => bgbe { //! Bandgap Buffer Enable
0 => E_0, //= Bandgap buffer not enabled
1 => E_1, //= Bandgap buffer enabled
}
3..2 => regons: ro { //! Regulator In Run Regulation Status
0 => E_0, //= Regulator is in stop regulation or in transition to/from it
1 => E_1, //= Regulator is in run regulation
}
4..3 => ackiso { //! Acknowledge Isolation
0 => E_0, //= Peripherals and I/O pads are in normal run state
1 => E_1, //= Certain peripherals and I/O pads are in an isolated and latched state
}
5..4 => bgen { //! Bandgap Enable In VLPx Operation
0 => E_0, //= Bandgap voltage reference is disabled in VLPx , LLS , and VLLSx modes
1 => E_1, //= Bandgap voltage reference is enabled in VLPx , LLS , and VLLSx modes
}
},
});
ioregs! (SMC @ 0x4007e000 = { //! System Mode Controller
0x00 => reg8 pmprot { //! Power Mode Protection register
2..1 => avlls { //! Allow Very-Low-Leakage Stop Mode
0 => E_0, //= Any VLLSx mode is not allowed
1 => E_1, //= Any VLLSx mode is allowed
}
4..3 => alls { //! Allow Low-Leakage Stop Mode
0 => E_0, //= LLS is not allowed
1 => E_1, //= LLS is allowed
}
6..5 => avlp { //! Allow Very-Low-Power Modes
0 => E_0, //= VLPR, VLPW and VLPS are not allowed
1 => E_1, //= VLPR, VLPW and VLPS are allowed
}
},
0x01 => reg8 pmctrl { //! Power Mode Control register
3..0 => stopm { //! Stop Mode Control
0 => E_000, //= Normal Stop (STOP)
4 => E_001, //= Reserved
2 => E_010, //= Very-Low-Power Stop (VLPS)
6 => E_011, //= Low-Leakage Stop (LLS)
1 => E_100, //= Very-Low-Leakage Stop (VLLSx)
5 => E_101, //= Reserved
3 => E_110, //= Reseved
7 => E_111, //= Reserved
}
4..3 => stopa: ro { //! Stop Aborted
0 => E_0, //= The previous stop mode entry was successsful.
1 => E_1, //= The previous stop mode entry was aborted.
}
7..5 => runm { //! Run Mode Control
0 => E_00, //= Normal Run mode (RUN)
2 => E_01, //= Reserved
1 => E_10, //= Very-Low-Power Run mode (VLPR)
3 => E_11, //= Reserved
}
},
0x02 => reg8 stopctrl { //! Stop Control Register
3..0 => vllsm { //! VLLS Mode Control.
0 => E_000, //= VLLS0
4 => E_001, //= VLLS1
2 => E_010, //= Reserved
6 => E_011, //= VLLS3
1 => E_100, //= Reserved
5 => E_101, //= Reserved
3 => E_110, //= Reserved
7 => E_111, //= Reserved
}
6..5 => porpo { //! POR Power Option
0 => E_0, //= POR detect circuit is enabled in VLLS0
1 => E_1, //= POR detect circuit is disabled in VLLS0
}
8..6 => pstopo { //! Partial Stop Option
0 => E_00, //= STOP - Normal Stop mode
2 => E_01, //= PSTOP1 - Partial Stop with both system and bus clocks disabled
1 => E_10, //= PSTOP2 - Partial Stop with system clock disabled and bus clock enabled
3 => E_11, //= Reserved
}
},
0x03 => reg8 pmstat { //! Power Mode Status register
7..0 => pmstat: ro, //= no description available
},
});
ioregs! (RCM @ 0x4007f000 = { //! Reset Control Module
0x00 => reg8 srs0 { //! System Reset Status Register 0
1..0 => wakeup: ro { //! Low Leakage Wakeup Reset
0 => E_0, //= Reset not caused by LLWU module wakeup source
1 => E_1, //= Reset caused by LLWU module wakeup source
}
2..1 => lvd: ro { //! Low-Voltage Detect Reset
0 => E_0, //= Reset not caused by LVD trip or POR
1 => E_1, //= Reset caused by LVD trip or POR
}
3..2 => loc: ro { //! Loss-of-Clock Reset
0 => E_0, //= Reset not caused by a loss of external clock.
1 => E_1, //= Reset caused by a loss of external clock.
}
4..3 => lol: ro { //! Loss-of-Lock Reset
0 => E_0, //= Reset not caused by a loss of lock in the PLL
1 => E_1, //= Reset caused by a loss of lock in the PLL
}
6..5 => wdog: ro { //! Watchdog
0 => E_0, //= Reset not caused by watchdog timeout
1 => E_1, //= Reset caused by watchdog timeout
}
7..6 => pin: ro { //! External Reset Pin
0 => E_0, //= Reset not caused by external reset pin
1 => E_1, //= Reset caused by external reset pin
}
8..7 => por: ro { //! Power-On Reset
0 => E_0, //= Reset not caused by POR
1 => E_1, //= Reset caused by POR
}
},
0x01 => reg8 srs1 { //! System Reset Status Register 1
2..1 => lockup: ro { //! Core Lockup
0 => E_0, //= Reset not caused by core LOCKUP event
1 => E_1, //= Reset caused by core LOCKUP event
}
3..2 => sw: ro { //! Software
0 => E_0, //= Reset not caused by software setting of SYSRESETREQ bit
1 => E_1, //= Reset caused by software setting of SYSRESETREQ bit
}
4..3 => mdm_ap: ro { //! MDM-AP System Reset Request
0 => E_0, //= Reset not caused by host debugger system setting of the System Reset Request bit
1 => E_1, //= Reset caused by host debugger system setting of the System Reset Request bit
}
6..5 => sackerr: ro { //! Stop Mode Acknowledge Error Reset
0 => E_0, //= Reset not caused by peripheral failure to acknowledge attempt to enter stop mode
1 => E_1, //= Reset caused by peripheral failure to acknowledge attempt to enter stop mode
}
},
0x04 => reg8 rpfc { //! Reset Pin Filter Control register
2..0 => rstfltsrw { //! Reset Pin Filter Select in Run and Wait Modes
0 => E_00, //= All filtering disabled
2 => E_01, //= Bus clock filter enabled for normal operation
1 => E_10, //= LPO clock filter enabled for normal operation
3 => E_11, //= Reserved
}
3..2 => rstfltss { //! Reset Pin Filter Select in Stop Mode
0 => E_0, //= All filtering disabled
1 => E_1, //= LPO clock filter enabled
}
},
0x05 => reg8 rpfw { //! Reset Pin Filter Width register
5..0 => rstfltsel { //! Reset Pin Filter Bus Clock Select
0 => E_00000, //= Bus clock filter count is 1
16 => E_00001, //= Bus clock filter count is 2
8 => E_00010, //= Bus clock filter count is 3
24 => E_00011, //= Bus clock filter count is 4
4 => E_00100, //= Bus clock filter count is 5
20 => E_00101, //= Bus clock filter count is 6
12 => E_00110, //= Bus clock filter count is 7
28 => E_00111, //= Bus clock filter count is 8
2 => E_01000, //= Bus clock filter count is 9
18 => E_01001, //= Bus clock filter count is 10
10 => E_01010, //= Bus clock filter count is 11
26 => E_01011, //= Bus clock filter count is 12
6 => E_01100, //= Bus clock filter count is 13
22 => E_01101, //= Bus clock filter count is 14
14 => E_01110, //= Bus clock filter count is 15
30 => E_01111, //= Bus clock filter count is 16
1 => E_10000, //= Bus clock filter count is 17
17 => E_10001, //= Bus clock filter count is 18
9 => E_10010, //= Bus clock filter count is 19
25 => E_10011, //= Bus clock filter count is 20
5 => E_10100, //= Bus clock filter count is 21
21 => E_10101, //= Bus clock filter count is 22
13 => E_10110, //= Bus clock filter count is 23
29 => E_10111, //= Bus clock filter count is 24
3 => E_11000, //= Bus clock filter count is 25
19 => E_11001, //= Bus clock filter count is 26
11 => E_11010, //= Bus clock filter count is 27
27 => E_11011, //= Bus clock filter count is 28
7 => E_11100, //= Bus clock filter count is 29
23 => E_11101, //= Bus clock filter count is 30
15 => E_11110, //= Bus clock filter count is 31
31 => E_11111, //= Bus clock filter count is 32
}
},
});
ioregs! (PTA @ 0x400ff000 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (PTB @ 0x400ff040 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (PTC @ 0x400ff080 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (PTD @ 0x400ff0c0 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (PTE @ 0x400ff100 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (MTB @ 0xf0000000 = { //! Micro Trace Buffer
0x00 => reg32 position { //! MTB Position Register
3..2 => wrap, //= no description available
32..3 => pointer, //= Trace Packet Address Pointer
},
0x04 => reg32 master { //! MTB Master Register
5..0 => mask, //= Mask
6..5 => tstarten, //= Trace start input enable
7..6 => tstopen, //= Trace stop input enable
8..7 => sfrwpriv, //= Special Function Register Write Privilege bit
9..8 => rampriv, //= RAM privilege bit
10..9 => haltreq, //= Halt request bit
32..31 => en, //= Main trace enable bit
},
0x08 => reg32 flow { //! MTB Flow Register
1..0 => autostop, //= no description available
2..1 => autohalt, //= no description available
32..3 => watermark, //= WATERMARK value
},
0x0c => reg32 base { //! MTB Base Register
32..0 => baseaddr: ro, //= no description available
},
0xf00 => reg32 modectrl { //! Integration Mode Control Register
32..0 => modectrl: ro, //= no description available
},
0xfa0 => reg32 tagset { //! Claim TAG Set Register
32..0 => tagset: ro, //= no description available
},
0xfa4 => reg32 tagclear { //! Claim TAG Clear Register
32..0 => tagclear: ro, //= no description available
},
0xfb0 => reg32 lockaccess { //! Lock Access Register
32..0 => lockaccess: ro, //= no description available
},
0xfb4 => reg32 lockstat { //! Lock Status Register
32..0 => lockstat: ro, //= no description available
},
0xfb8 => reg32 authstat { //! Authentication Status Register
1..0 => bit0: ro, //= no description available
2..1 => bit1: ro, //= no description available
3..2 => bit2: ro, //= no description available
4..3 => bit3: ro, //= no description available
},
0xfbc => reg32 devicearch { //! Device Architecture Register
32..0 => devicearch: ro, //= no description available
},
0xfc8 => reg32 devicecfg { //! Device Configuration Register
32..0 => devicecfg: ro, //= no description available
},
0xfcc => reg32 devicetypid { //! Device Type Identifier Register
32..0 => devicetypid: ro, //= no description available
},
0xfd0 => reg32 periphid4 { //! Peripheral ID Register
32..0 => periphid: ro, //= no description available
},
0xff0 => reg32 compid0 { //! Component ID Register
32..0 => compid: ro, //= Component ID
},
});
ioregs! (MTBDWT @ 0xf0001000 = { //! MTB data watchpoint and trace
0x00 => reg32 ctrl { //! MTB DWT Control Register
28..0 => dwtcfgctrl: ro, //= DWT configuration controls
32..28 => numcmp: ro, //= Number of comparators
},
0x20 => reg32 comp0 { //! MTB_DWT Comparator Register
32..0 => comp, //= Reference value for comparison
},
0x24 => reg32 mask0 { //! MTB_DWT Comparator Mask Register
5..0 => mask, //= MASK
},
0x28 => reg32 fct0 { //! MTB_DWT Comparator Function Register 0
4..0 => function { //! Function
0 => E_0000, //= Disabled.
2 => E_0100, //= Instruction fetch.
10 => E_0101, //= Data operand read.
6 => E_0110, //= Data operand write.
14 => E_0111, //= Data operand (read + write).
}
9..8 => datavmatch { //! Data Value Match
0 => E_0, //= Perform address comparison.
1 => E_1, //= Perform data value comparison.
}
12..10 => datavsize { //! Data Value Size
0 => E_00, //= Byte.
2 => E_01, //= Halfword.
1 => E_10, //= Word.
3 => E_11, //= Reserved. Any attempts to use this value results in UNPREDICTABLE behavior.
}
16..12 => datavaddr0, //= Data Value Address 0
25..24 => matched: ro { //! Comparator match
0 => E_0, //= No match.
1 => E_1, //= Match occurred.
}
},
0x38 => reg32 fct1 { //! MTB_DWT Comparator Function Register 1
4..0 => function { //! Function
0 => E_0000, //= Disabled.
2 => E_0100, //= Instruction fetch.
10 => E_0101, //= Data operand read.
6 => E_0110, //= Data operand write.
14 => E_0111, //= Data operand (read + write).
}
25..24 => matched: ro { //! Comparator match
0 => E_0, //= No match.
1 => E_1, //= Match occurred.
}
},
0x200 => reg32 tbctrl { //! MTB_DWT Trace Buffer Control Register
1..0 => acomp0 { //! Action based on Comparator 0 match
0 => E_0, //= Trigger TSTOP based on the assertion of MTBDWT_FCT0[MATCHED].
1 => E_1, //= Trigger TSTART based on the assertion of MTBDWT_FCT0[MATCHED].
}
2..1 => acomp1 { //! Action based on Comparator 1 match
0 => E_0, //= Trigger TSTOP based on the assertion of MTBDWT_FCT1[MATCHED].
1 => E_1, //= Trigger TSTART based on the assertion of MTBDWT_FCT1[MATCHED].
}
32..28 => numcomp: ro, //= Number of Comparators
},
0xfc8 => reg32 devicecfg { //! Device Configuration Register
32..0 => devicecfg: ro, //= no description available
},
0xfcc => reg32 devicetypid { //! Device Type Identifier Register
32..0 => devicetypid: ro, //= no description available
},
0xfd0 => reg32 periphid4 { //! Peripheral ID Register
32..0 => periphid: ro, //= no description available
},
0xff0 => reg32 compid0 { //! Component ID Register
32..0 => compid: ro, //= Component ID
},
});
ioregs! (ROM @ 0xf0002000 = { //! System ROM
0x00 => reg32 entry0 { //! Entry
32..0 => entry: ro, //= ENTRY
},
0x0c => reg32 tablemark { //! End of Table Marker Register
32..0 => mark: ro, //= no description available
},
0xfcc => reg32 sysaccess { //! System Access Register
32..0 => sysaccess: ro, //= no description available
},
0xfd0 => reg32 periphid4 { //! Peripheral ID Register
32..0 => periphid: ro, //= no description available
},
0xff0 => reg32 compid0 { //! Component ID Register
32..0 => compid: ro, //= Component ID
},
});
ioregs! (MCM @ 0xf0003000 = { //! Core Platform Miscellaneous Control Module
0x08 => reg16 plasc { //! Crossbar Switch (AXBS) Slave Configuration
8..0 => asc: ro { //! Each bit in the ASC field indicates whether there is a corresponding connection to the crossbar switch's slave input port.
0 => E_0, //= A bus slave connection to AXBS input port n is absent
1 => E_1, //= A bus slave connection to AXBS input port n is present
}
},
0x0a => reg16 plamc { //! Crossbar Switch (AXBS) Master Configuration
8..0 => amc: ro { //! Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port.
0 => E_0, //= A bus master connection to AXBS input port n is absent
1 => E_1, //= A bus master connection to AXBS input port n is present
}
},
0x0c => reg32 placr { //! Platform Control Register
10..9 => arb { //! Arbitration select
0 => E_0, //= Fixed-priority arbitration for the crossbar masters
1 => E_1, //= Round-robin arbitration for the crossbar masters
}
11..10 => cfcc: wo, //= Clear Flash Controller Cache
12..11 => dfcda { //! Disable Flash Controller Data Caching
0 => E_0, //= Enable flash controller data caching
1 => E_1, //= Disable flash controller data caching.
}
13..12 => dfcic { //! Disable Flash Controller Instruction Caching
0 => E_0, //= Enable flash controller instruction caching.
1 => E_1, //= Disable flash controller instruction caching.
}
14..13 => dfcc { //! Disable Flash Controller Cache
0 => E_0, //= Enable flash controller cache.
1 => E_1, //= Disable flash controller cache.
}
15..14 => efds { //! Enable Flash Data Speculation
0 => E_0, //= Disable flash data speculation.
1 => E_1, //= Enable flash data speculation.
}
16..15 => dfcs { //! Disable Flash Controller Speculation
0 => E_0, //= Enable flash controller speculation.
1 => E_1, //= Disable flash controller speculation.
}
17..16 => esfc { //! Enable Stalling Flash Controller
0 => E_0, //= Disable stalling flash controller when flash is busy.
1 => E_1, //= Enable stalling flash controller when flash is busy.
}
},
0x40 => reg32 cpo { //! Compute Operation Control Register
1..0 => cporeq { //! Compute Operation request
0 => E_0, //= Request is cleared.
1 => E_1, //= Request Compute Operation.
}
2..1 => cpoack: ro { //! Compute Operation acknowledge
0 => E_0, //= Compute operation entry has not completed or compute operation exit has completed.
1 => E_1, //= Compute operation entry has completed or compute operation exit has not completed.
}
3..2 => cpowoi { //! Compute Operation wakeup on interrupt
0 => E_0, //= No effect.
1 => E_1, //= When set, the CPOREQ is cleared on any interrupt or exception vector fetch.
}
},
});
ioregs! (FPTA @ 0xf80ff000 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (FPTB @ 0xf80ff040 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (FPTC @ 0xf80ff080 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (FPTD @ 0xf80ff0c0 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
ioregs! (FPTE @ 0xf80ff100 = { //! General Purpose Input/Output
0x00 => reg32 pdor { //! Port Data Output Register
32..0 => pdo { //! Port Data Output
0 => E_0, //= Logic level 0 is driven on pin, provided pin is configured for general-purpose output.
1 => E_1, //= Logic level 1 is driven on pin, provided pin is configured for general-purpose output.
}
},
0x04 => reg32 psor { //! Port Set Output Register
32..0 => ptso: wo { //! Port Set Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to logic 1.
}
},
0x08 => reg32 pcor { //! Port Clear Output Register
32..0 => ptco: wo { //! Port Clear Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is cleared to logic 0.
}
},
0x0c => reg32 ptor { //! Port Toggle Output Register
32..0 => ptto: wo { //! Port Toggle Output
0 => E_0, //= Corresponding bit in PDORn does not change.
1 => E_1, //= Corresponding bit in PDORn is set to the inverse of its existing logic state.
}
},
0x10 => reg32 pdir { //! Port Data Input Register
32..0 => pdi: ro { //! Port Data Input
0 => E_0, //= Pin logic level is logic 0, or is not configured for use by digital function.
1 => E_1, //= Pin logic level is logic 1.
}
},
0x14 => reg32 pddr { //! Port Data Direction Register
32..0 => pdd { //! Port Data Direction
0 => E_0, //= Pin is configured as general-purpose input, for the GPIO function.
1 => E_1, //= Pin is configured as general-purpose output, for the GPIO function.
}
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment