Académique Documents
Professionnel Documents
Culture Documents
GPIO_PORTF_DIR_R
GPIO_PORTA_PUR_R
GPIOabc
GPIO_PORTX_abc_R
En el primer ejemplo abc era DIR, y X era F. En el segundo ejemplo abc era PUR y X era A.
31
16
R
15
6
R
Valor inicial:
Dir. Base:
R0: puerto A
R1: Puerto B
...
R5: Puerto F
0x0000.0000
0x400F.E000
Offset
5
R5
R/W
0
4
R4
R/W
0
3
R3
R/W
0
2
R2
R/W
0
1
R1
R/W
0
0
R0
R/W
0
0x608
-1-
24/08/2016
31
16
R
15
6
R
Valor inicial:
Dir. Base:
0x0000.0000
0x400F.E000
Offset
5
R5
R/W
0
4
R4
R/W
0
3
R3
R/W
0
2
R2
R/W
0
1
R1
R/W
0
0
R0
R/W
0
0xA08
R0: puerto A
R1: Puerto B
...
R5: Puerto F
bit x = 1 Ya est activa la seal de reloj del mdulo GPIO y se podr configurar y utilizar.
bit x = 0 No est activa an la seal de reloj del mdulo GPIO. Puede ser porque no se activ con RCGCGPIO o
porque an no ha culminado su activacin. En ambos casos la escritura en cualquier registro de E/S del
mdulo generar una falla del bus (bus fault)
Ejemplo: Si bit 4 se puso a 1, significa que est activa la seal de reloj del puerto E del microcontrolador, y se podr
configurar y usar.
Importante: Este registro no forma parte de los registros GPIO, sino a los registros del sistema.
Pines
PA[1:0]
PA[5:2]
PB[3:2]
PC[3:0]
PD[7]
PF[0]
a
Configuracin
predeterminada
UART0
SSI0
I2C0
JTAG/SWD
GPIOa
GPIOa
GPIOAFSEL
GPIODEN
GPIOPDR
GPIOPUR
GPIOPCTL
GPIOCR
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0x1
0x2
0x3
0x1
0x0
0x0
1
1
1
0
0
0
El pin est configurado como GPIO pero est protegido y slo puede reconfigurarse desprotegiendo el pin con el registro
GPIOLOCK y confirmndolo con el registro GPIOCR (poniendo a 1 el bit correspondiente).
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-2-
24/08/2016
bit
GPIODATA
0x3FC
31
8
RESERVADO
R
R/W
0
R/W
0
R/W
0
4
3
DATA
R/W R/W
0
0
R/W
0
R/W
0
R/W
0
31
8
RESERVADO
R
R/W
0
R/W
0
R/W
0
3
DIR
R/W R/W
0
0
R/W
0
R/W
0
R/W
0
R/W
-
R/W
-
R/W
-
31
8
RESERVADO
R
4
3
AFSEL
R/W R/W
-
31
bit
GPIODR4R
0x504
31
bit
GPIODR8R
0x508
31
R/W
0
R/W
0
R/W
0
Tabla 1.
4
3
2
1
0
DRV 2mA
R/W R/W R/W R/W R/W R/W R/W R/W
1
1
1
1
1
1
1
1
bit x = 0: Driver de corriente para Pin x configurado por registro GPIODR4R o GPIODR8R
bit x = 1: Driver de 2mA activado en Pin x. Pin, si es configurado como salida, ser capaz de entregar hasta 2mA de
corriente
valor inicial: 0x0000.00FF
RESERVADO
R
4
3
2
1
0
DRV 4mA
R/W R/W R/W R/W R/W R/W R/W R/W
0
0
0
0
0
0
0
0
bit x = 0: Driver de corriente para Pin x configurado por registro GPIODR2R o GPIODR8R
bit x = 1: Driver de 4mA activado en Pin x. Pin, si es configurado como salida, ser capaz de entregar hasta 4mA de
corriente
valor inicial: 0x0000.0000
RESERVADO
R
RESERVADO
R
4
3
DRV 8mA
R/W R/W
0
0
R/W
0
R/W
0
R/W
0
bit x = 0: Driver de corriente para Pin x configurado por registro GPIODR2R o GPIODR4R
bit x = 1: Driver de 8mA activado en Pin x. Pin, si es configurado como salida, ser capaz de entregar hasta 8mA de
corriente
valor inicial: 0x0000.0000
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-3-
24/08/2016
31
RESERVADO
R
R/W
1
R/W
1
R/W
1
3
ODE
R/W R/W
1
1
R/W
1
R/W
1
R/W
1
R/W
-
R/W
-
R/W
-
31
8
RESERVADO
R
R/W
-
R/W
-
R/W
-
3
PUE
R/W R/W
-
bit
GPIOPDR
0x514
31
8
RESERVADO
R
R/W
-
R/W
-
R/W
-
3
PDE
R/W R/W
-
R/W
-
R/W
-
R/W
-
bit
GPIODEN
0x51C
31
8
RESERVADO
R
R/W
-
R/W
-
R/W
-
3
DEN
R/W R/W
-
R/W
-
R/W
-
R/W
-
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-4-
24/08/2016
bit
GPIOAMSEL
0x528
valor inicial
31
30
29
28
27
26
25
24
R
0
R
0
R
0
R
0
R
0
R
0
R
0
R
0
15
14
23
22
21
RESERVADO
R
R
R
0
0
0
20
19
18
17
16
R
0
R
0
R
0
R
0
R
0
13 12 11 10 9
8
7
6
5
4
3
2
1
0
RESERVADO
GPIOAMSEL
R R R R R R R R R/W R/W R/W R/W R/W R/W R/W R/W
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
bit x = 0: Funciones analgicas de Pin x desactivadas. Pin x puede tener funciones digitales.
bit x = 1: Funciones analgicas de Pin x activadas. Pin x no podr tener funciones digitales.
Este registro slo existe para puertos B, C, D y E, pues son los nicos con funciones analgicas. En lenguaje C
GPIO_PORTB_AMSEL _R, GPIO_PORTC_AMSEL _R, GPIO_PORTD_AMSEL _R y
GPIO_PORTE_AMSEL_R
bit
GPIOPCTL
0x52C
valor inicial
31
30
29
PMC7
28
27
26
25
PMC6
24
23
22
21
PMC5
20
19
18
17
PMC4
16
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
15
14
13
PMC3
12
11
10
9
PMC2
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
RW
-
6
5
PMC1
RW
-
RW
-
RW
-
1
PMC0
RW
-
bit
GPIOLOCK
0x520
31
R/W
R/W R/W R/W R/W R/W R/W R/W R/W
0
0
0
0
0
0
0
0
1
Lectura: 0x0000.0000 Candado abierto, puede escribirse en registro GPIOCR
0x0000.0001 Candado cerrado. No puede escribirse en registro GPIOCR
Escritura: Al escribir 0x4C4F.434B se abre el candado que protege registro GPIOCR.
Al escribir cualquier otro valor se cierra el candado nuevamente. Al escribir en GPIOCR tambin se cierra.
valor inicial: 0x0000.0001
bit
GPIOCR
0x524
31
3
2
1
0
CR
R/W R/W R/W R/W R/W R/W R/W R/W
bit x = 0: No puede modificarse bit x de registros GPIOAFSEL, GPIOPUR, GPIOPDR, GPIODEN.
bit x = 1: Bit x de registro GPIOAFSEL, GPIOPUR, GPIOPDR, GPIODEN puede modificarse. Funciones digitales de
Pin x se activan. Puertos A, B, D nunca estn protegidos ni pueden protegerse. Pines PC0...PC3, PD7, PF0
estn protegidos (bit=1). Los dems pines de estos puertos no estn protegidos.
RESERVADO
R
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-5-
24/08/2016
0
RW
-
Configuracin de pines que tienen proteccin (PC0, PC1, PC2, PC3, PD7, PF0)
1.
2.
3.
4.
5.
6.
7.
8.
9.
Direccin base
(bus APB)
0x4000.4000
0x4000.5000
0x4000.6000
0x4000.7000
0x4002.4000
0x4002.5000
Direccin base
(bus AHB)
0x4005.8000
0x4005.9000
0x4005.A000
0x4005.B000
0x4005.C000
0x4005.D000
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-6-
24/08/2016
Registros_GPIO_TM4C123G_unicamente_Rev4.doc
-7-
24/08/2016