ARM Cortex M0 - W7500 인터럽트
C언어,ARM / 2016. 3. 7. 17:15
ARM Cortex M0 - W7500 인터럽트
- 26개의 인터럽트.
- 장치별로 1개의 통합 인터럽트 제공.
예) UART0 rx, tx는 1개의 인터럽트에서 구분하여 처리해야함.
- 인터럽트 클리어 시켜주어야 함.
샘플코드(W7500x_it.c)
void UART0_Handler(void)
{
if(UART_GetITStatus(UART0,UART_IT_FLAG_RXI))
{
UART_ClearITPendingBit(UART0,UART_IT_FLAG_RXI);
uart0_rx_cnt++;
}
else if(UART_GetITStatus(UART0,UART_IT_FLAG_TXI))
{
UART_ClearITPendingBit(UART0,UART_IT_FLAG_TXI);
uart0_tx_cnt++;
}
}
Table1 W7500P interrupt assignments | |||
IRQ/NMI | Device | Description | Address |
NMI | Watchdog | Watchdog interrupt | 0x0000_0008 |
IRQ[0] | SSP0 | SSP0 global interrupt | 0x0000_0040 |
IRQ[1] | SSP1 | SSP1 global interrupt | 0x0000_0044 |
IRQ[2] | UART0 | UART0 global interrupt | 0x0000_0048 |
IRQ[3] | UART1 | UART1 global interrupt | 0x0000_004C |
IRQ[4] | UART2 | UART2 global interrupt | 0x0000_0050 |
IRQ[5] | I2C0 | I2C0 global interrupt | 0x0000_0054 |
IRQ[6] | I2C1 | I2C1 global interrupt | 0x0000_0058 |
IRQ[7] | GPIO0 | GPIOA global interrupt | 0x0000_005C |
IRQ[8] | GPIO1 | GPIOB global interrupt | 0x0000_0060 |
IRQ[9] | GPIO2 | GPIOC global interrupt | 0x0000_0064 |
IRQ[10] | GPIO3 | GPIOD global interrupt | 0x0000_0068 |
IRQ[11] | DMA | DMA channel 1 ~ channel 5 interrupt | 0x0000_006C |
IRQ[12] | Dualtimer0 | Dualtimer0 global interrupt | 0x0000_0070 |
IRQ[13] | Dualtimer1 | Dualtimer1 global interrupt | 0x0000_0074 |
IRQ[14] | PWM0 | PWM0 global interrupt | 0x0000_0078 |
IRQ[15] | PWM1 | PWM1 global interrupt | 0x0000_007C |
IRQ[16] | PWM2 | PWM2 global interrupt | 0x0000_0080 |
IRQ[17] | PWM3 | PWM3 global interrupt | 0x0000_0084 |
IRQ[18] | PWM4 | PWM4 global interrupt | 0x0000_0088 |
IRQ[19] | PWM5 | PWM5 global interrupt | 0x0000_008C |
IRQ[20] | PWM6 | PWM6 global interrupt | 0x0000_0090 |
IRQ[21] | PWM7 | PWM7 global interrupt | 0x0000_0094 |
IRQ[22] | reserved | 0x0000_0098 | |
IRQ[23] | ADC | ADC acquisition end interrupt | 0x0000_009C |
IRQ[24] | TCPIP | TCPIP global interrupt | 0x0000_00A0 |
IRQ[25] | EXT_INT | External pin interrupt | 0x0000_00A4 |
IRQ[26] | reserved | 0x0000_00A8 | |
IRQ[27] | reserved | 0x0000_00AC | |
IRQ[28] | reserved | 0x0000_00B0 | |
IRQ[29] | reserved | 0x0000_00B4 | |
IRQ[30] | reserved | 0x0000_00B8 | |
IRQ[31] | reserved | 0x0000_00BC |
'C언어,ARM' 카테고리의 다른 글
VC++ 6.0을 쓰지 말아야하는 이유 (4) | 2016.05.03 |
---|---|
한국형 CPU 코어 사업 첫 성과물 나온다 (0) | 2016.04.05 |
CMSIS-DAP (0) | 2016.03.07 |
ARM Cortex M0 - GPIO (0) | 2016.03.07 |
Tightly Coupled Memory (0) | 2016.02.29 |