ARM Cortex M0 - GPIO
W7500x.h
CS – CMOS/Schmitt trigger input buffer select
P - PAD
YA – Analog Input (connect to ADC input)
Y – Digital Input
IE – Input buffer enable
인터럽트가 아니고, 입력버퍼.
1일때, 루프백신호 Y가 활성화 된다.(출력신호가 다시 들어옴. 어디다 쓰지?)
CS – CMOS/Schmitt trigger input buffer select
PU – Pull-up enable
A – Digital Output
DS – Driving strength select
L일때, 속도가 더 빠르다.
GPIO관련 레지스터는 3가지.
#define GPIOA ((GPIO_TypeDef *) (GPIOA_BASE) )
#define GPIOB ((GPIO_TypeDef *) (GPIOB_BASE) )
#define GPIOC ((GPIO_TypeDef *) (GPIOC_BASE) )
#define PA_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000000UL)) /* PA_XX Pad Alternate Function Select Register */
#define PB_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000040UL)) /* PB_XX Pad Alternate Function Select Register */
#define PC_AFSR ((P_Port_Def *) (P_AFSR_BASE + 0x00000080UL)) /* PC_XX Pad Alternate Function Select Register */
#define PA_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000000UL)) /* PA_XX Pad Control Register */
#define PB_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000040UL)) /* PB_XX Pad Control Register */
#define PC_PCR ((P_Port_Def *) (P_PCR_BASE + 0x00000080UL)) /* PC_XX Pad Control Register */
8비트 CPU보다 훨씬 복잡해보인다..
'C언어,ARM' 카테고리의 다른 글
ARM Cortex M0 - W7500 인터럽트 (0) | 2016.03.07 |
---|---|
CMSIS-DAP (0) | 2016.03.07 |
Tightly Coupled Memory (0) | 2016.02.29 |
mini_file_system (0) | 2016.02.01 |
C언어 함수 (1) | 2016.01.31 |