Supplem
Supplem
Port A: 0x40004000
Port B: 0x40005000
Port C: 0x40006000
Port D: 0x40007000
Port E: 0x40024000
Port F: 0x40025000
SysTick
Base addresses of six 16/32 bit Timers and six 32/64 bit Timers:
■ 16/32-bit Timer 0: 0x4003.0000
■ 16/32-bit Timer 1: 0x4003.1000
■ 16/32-bit Timer 2: 0x4003.2000
■ 16/32-bit Timer 3: 0x4003.3000
■ 16/32-bit Timer 4: 0x4003.4000
■ 16/32-bit Timer 5: 0x4003.5000
■ 32/64-bit Wide Timer 0: 0x4003.6000
■ 32/64-bit Wide Timer 1: 0x4003.7000
■ 32/64-bit Wide Timer 2: 0x4004.C000
■ 32/64-bit Wide Timer 3: 0x4004.D000
■ 32/64-bit Wide Timer 4: 0x4004.E000
■ 32/64-bit Wide Timer 5: 0x4004.F000
0x0 For a 16/32-bit timer, this value selects the 32-bit timer configuration.
For a 32/64-bit wide timer, this value selects the 64-bit timer configuration.
For a 16/32-bit timer, this value selects the 32-bit real-time clock (RTC) counter
0x1 configuration.
For a 32/64-bit wide timer, this value selects the 64-bit real-time clock (RTC)
counter configuration.
0x4 For a 16/32-bit timer, this value selects the 16-bit timer configuration.
For a 32/64-bit wide timer, this value selects the 32-bit timer configuration.
bit function
16 32/64-Bit Wide Write Update (WUE) Error Interrupt Mask
11 Timer B Match (TBM) Interrupt Mask
10 Timer B Capture Mode Event (CBE) Interrupt Mask
9 Timer B Capture Mode Match (CBM) Interrupt Mask
8 Timer B Time-Out (TBTO) Interrupt Mask
4 Timer A Match (TAM) Interrupt Mask
3 RTC Interrupt Mask
2 Timer A Capture Mode Event (CAE) Interrupt Mask
1 Timer A Capture Mode Match (CAM) Interrupt Mask
0 Timer A Time-Out (TATO) Interrupt Mask
0: Interrupt is disabled, 1: Interrupt is enabled
Timer Raw Interrupt Status : RIS, offset 0x01C
Writing a 1 to this a bit clears the respective bit in RIS and MRIS registers.
TAPSRH: GPTM Timer A Prescale High Byte. For the 16/32-bit GPTM, this field is reserved. For the
32/64-bit Wide GPTM, this field contains the upper 8-bits of the 16-bit prescaler.
TAPSRL: GPTM Timer A Prescale Low Byte. For the 16/32-bit GPTM, this field contains the entire 8-
bit prescaler. For the 32/64-bit Wide GPTM, this field contains the lower 8-bits of the 16-bit prescaler.
TAPSRH: GPTM Timer A Match Prescale High Byte. For the 16/32-bit GPTM, this field is reserved.
For the 32/64-bit Wide GPTM, this field contains the upper 8-bits of the 16-bit match prescaler.
TAPSRL: GPTM Timer A Match Prescale Low Byte. For the 16/32-bit GPTM, this field contains the
entire 8-bit match prescaler. For the 32/64-bit Wide GPTM, this field contains the lower 8-bits of the
16-bit match prescaler.
PB4: Timer1:
rcgc -> orr 0x02: timer1
rcgc -> orr 0x02 ctl -> bic 0x01: disable clock
dır -> bic 0x10 : input cfg -> mov 0x04: 16 bit
afsel -> orr 0x10 tamr -> mov 0x07 : capture/edge time
pctl -> orr 0x70000: timer1 tailr -> 0xffffffff
amsel -> 0 imr -> orr 0x04: capture event interrupt
den -> orr 0x10 : digital enable ctl -> orr 0x0f : both edges/enable/stall
Check RIS:
loop ldr r1, =RIS
ldr r2, [r1]
cmp r2, #0x04 ; wait for captue
bne loop ; if no capture, loop
ldr r1, =TAR
r2, [r1]
ldr r1, =ICR
mov r0, #0x04 ; clear caeris
str r0, [r1]
SSn=0 No effect.
SSn=1 Begin sampling on Sample Sequencer n, if the sequencer is enabled in the ADCACTSS
register.
HPTR / TPTR: the current "head" / "tail" pointer index for the FIFO, that is, the next entry to be written.
ADC Underflow Status (ADCUSTAT), offset 0x018
SSn: This field contains a binary-encoded value that specifies the priority encoding of Sample
Sequencer n. A priority encoding of 0x0 is highest and 0x3 is lowest.
ADC Sample Phase Control: ADCSPC
DCONSSn=0 The status of the digital comparators does not affect the SSn interrupt status.
DCONSSn=1 The raw interrupt signal from the digital comparators (INRDC bit in the ADCRIS register)
is sent to the interrupt controller on the SSn interrupt line.
MASKn=0 The status of Sample Sequencer n does not affect the SSn interrupt status.
MASKn=1 The raw interrupt signal from Sample Sequencer 3 (ADCRIS register INRn bit) is sent to the
interrupt controller.
ADC Interrupt Status and Clear (ADCISC), offset 0x00C
DCINSSn=0 No interrupt has occurred or the interrupt is masked. Both the INRDC bit in the ADCRIS
register and the DCONSSn bit in the ADCIM register are set, providing a level-based interrupt to the
interrupt controller.
DCINSSn=1 This bit is cleared by writing a 1 to it. Clearing this bit also clears the INRDC bit in the
ADCRIS register.
INn=0 No interrupt has occurred or the interrupt is masked.
INn=1 Both the INRn bit in the ADCRIS register and the MASKn bit in the ADCIM register are set,
providing a level-based interrupt to the interrupt controller.
This bit is cleared by writing a 1. Clearing this bit also clears the INRn bit in the ADCRIS register.
This bit is cleared by writing a 1 to the INn bit in the ADCISC register.
Run Clock Gate Control Register for UART (RCGCUART) (address is 0x400FE618)
PA1: uart:
rcgc -> orr 0x01 ctl -> bic 0x01:disable
den -> orr 0x02 ibrd -> #104
amsel -> bic 0x02: disable fbrd -> #11
afsel -> orr 0x02: lcrh -> #0x74: 8bit/fifo/one start
pctl -> orr 0x10 : tx one stop/ even
ctl -> 0x00000101 : enable tx
UART Interrupt FIFO Level Select (UARTIFLS), offset 0x034
pa0: uart0:
rcgc-> orr 0x01 rcgc-> orr 0x01
den -> orr 0x01 ctl -> bic 0x01
amsel -> bic 0x01 ibrd -> #104
afsel -> orr 0x01 fbrd -> #11
pctl -> orr 0x01: rx10 lcrh ->#74
ctl -> #201: receiver enable
receiver:
r4, =dr
check
r1, =fr
r0, [r1]
ands r0, #0x10: rxfe=0 check
bne check: if no char. check
r5, [r4]: receive
bx lr
UART Raw Interrupt Status (UARTRIS), offset 0x03C