Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IO_Config.h Source File

IO_Config.h

00001 /**
00002  * @file    IO_Config.h
00003  * @brief   
00004  *
00005  * DAPLink Interface Firmware
00006  * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
00007  * SPDX-License-Identifier: Apache-2.0
00008  *
00009  * Licensed under the Apache License, Version 2.0 (the "License"); you may
00010  * not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  *
00013  * http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing, software
00016  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00017  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  * See the License for the specific language governing permissions and
00019  * limitations under the License.
00020  */
00021 
00022 // Override all defines if IO_CONFIG_OVERRIDE is defined
00023 #ifdef IO_CONFIG_OVERRIDE
00024 #include "IO_Config_Override.h"
00025 #ifndef __IO_CONFIG_H__
00026 #define __IO_CONFIG_H__
00027 #endif
00028 #endif
00029 
00030 #ifndef __IO_CONFIG_H__
00031 #define __IO_CONFIG_H__
00032 
00033 #include "MKL26Z4.h"
00034 #include "compiler.h"
00035 #include "daplink.h"
00036 
00037 // This GPIO configuration is only valid for the KL26 HIC
00038 COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_KL26);
00039 
00040 
00041 // Debug Port I/O Pins
00042 
00043 // SWCLK Pin                    PTC5(C5)
00044 #define PIN_SWCLK_PORT          PORTC
00045 #define PIN_SWCLK_GPIO          PTC
00046 #define PIN_SWCLK_BIT           (5)
00047 #define PIN_SWCLK               (1<<PIN_SWCLK_BIT)
00048 
00049 // SWDIO Pin                    PTC6(C6)
00050 #define PIN_SWDIO_PORT          PORTC
00051 #define PIN_SWDIO_GPIO          PTC
00052 #define PIN_SWDIO_BIT           (6)
00053 #define PIN_SWDIO               (1<<PIN_SWDIO_BIT)
00054 
00055 // nRESET Pin                   PTC8(C8)
00056 #define PIN_nRESET_PORT         PORTC
00057 #define PIN_nRESET_GPIO         PTC
00058 #define PIN_nRESET_BIT          (8)
00059 #define PIN_nRESET              (1<<PIN_nRESET_BIT)
00060 
00061 // PWR_REG_EN PTD2 - Not connected
00062 #define PIN_POWER_EN_PORT       PORTD
00063 #define PIN_POWER_EN_GPIO       PTD
00064 #define PIN_POWER_EN_BIT        (2)
00065 #define PIN_POWER_EN            (1<<PIN_POWER_EN_BIT)
00066 
00067 // VTRG_FAULT_B PTD3 - Not connected
00068 #define PIN_VTRG_FAULT_B_PORT   PORTD
00069 #define PIN_VTRG_FAULT_B_GPIO   PTD
00070 #define PIN_VTRG_FAULT_B_BIT    (7)
00071 #define PIN_VTRG_FAULT_B_EN     (1<<PIN_VTRG_FAULT_B_BIT)
00072 
00073 // Debug Unit LEDs
00074 
00075 // HID_LED PTD4
00076 #define PIN_HID_LED_PORT        PORTD
00077 #define PIN_HID_LED_GPIO        PTD
00078 #define PIN_HID_LED_BIT         (4)
00079 #define PIN_HID_LED             (1<<PIN_HID_LED_BIT)
00080 
00081 // MSC_LED PTD5
00082 #define PIN_MSC_LED_PORT        PORTD
00083 #define PIN_MSC_LED_GPIO        PTD
00084 #define PIN_MSC_LED_BIT         (4)
00085 #define PIN_MSC_LED             (1<<PIN_MSC_LED_BIT)
00086 
00087 // CDC_LED PTD6
00088 #define PIN_CDC_LED_PORT        PORTD
00089 #define PIN_CDC_LED_GPIO        PTD
00090 #define PIN_CDC_LED_BIT         (4)
00091 #define PIN_CDC_LED             (1<<PIN_CDC_LED_BIT)
00092 
00093 // SW RESET BUTTON PTB1
00094 #define PIN_SW_RESET_PORT       PORTB
00095 #define PIN_SW_RESET_GPIO       PTB
00096 #define PIN_SW_RESET_BIT        (1)
00097 #define PIN_SW_RESET            (1<<PIN_SW_RESET_BIT)
00098 
00099 // BOARD TYPE
00100 #define PIN_BOARD_TYPE_PORT     PORTB
00101 #define PIN_BOARD_TYPE_GPIO     PTB
00102 #define PIN_BOARD_TYPE_BIT      (0)
00103 #define PIN_BOARD_TYPE          (1<<PIN_BOARD_TYPE_BIT)
00104 
00105 // Connected LED                Not available
00106 
00107 // Target Running LED           Not available
00108 
00109 // UART
00110 #define UART_PORT               PORTC
00111 #define UART_NUM                (1)
00112 // RX PTC3
00113 #define PIN_UART_RX_GPIO        PTC
00114 #define PIN_UART_RX_BIT         (3)
00115 #define PIN_UART_RX             (1<<PIN_UART_RX_BIT)
00116 #define PIN_UART_RX_MUX_ALT     (3)
00117 // TX PTC4
00118 #define PIN_UART_TX_GPIO        PTC
00119 #define PIN_UART_TX_BIT         (4)
00120 #define PIN_UART_TX             (1<<PIN_UART_TX_BIT)
00121 #define PIN_UART_TX_MUX_ALT     (3)
00122 
00123 #define UART                    UART1
00124 #define UART_RX_TX_IRQn         UART1_IRQn
00125 #define UART_RX_TX_IRQHandler   UART1_IRQHandler
00126 
00127 #endif