ISSDK  1.7
IoT Sensing Software Development Kit
frdm_ke15z.h
Go to the documentation of this file.
1 /*
2  * The Clear BSD License
3  * Copyright (c) 2017, Freescale Semiconductor, Inc.
4  * Copyright 2017 NXP
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,
8  * are permitted (subject to the limitations in the disclaimer below) provided
9  * that the following conditions are met:
10  *
11  * o Redistributions of source code must retain the above copyright notice, this list
12  * of conditions and the following disclaimer.
13  *
14  * o Redistributions in binary form must reproduce the above copyright notice, this
15  * list of conditions and the following disclaimer in the documentation and/or
16  * other materials provided with the distribution.
17  *
18  * o Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 /**
36  * @file frdm_ke15z.h
37  * @brief The frdm_ke15z.h file defines GPIO pin mappings for FRDM-KE15Z board
38 */
39 
40 #ifndef FRDM_KE15Z_H_
41 #define FRDM_KE15Z_H_
42 
43 #include "pin_mux.h"
44 #include "fsl_smc.h"
45 #include "MKE15Z7.h"
46 #include "RTE_Device.h"
47 #include "gpio_driver.h"
48 
49 // I2C1 Pin Handles
50 extern gpioHandleKSDK_t D15;
51 extern gpioHandleKSDK_t D14;
52 
53 // I2C0 Handle
54 extern gpioHandleKSDK_t A5;
55 extern gpioHandleKSDK_t A4;
56 
57 // SPI0 Handle
58 extern gpioHandleKSDK_t D13;
59 extern gpioHandleKSDK_t D11;
60 extern gpioHandleKSDK_t D12;
61 
62 // UART0 Handle
63 extern gpioHandleKSDK_t D0;
64 extern gpioHandleKSDK_t D1;
65 
66 // FRDM-KE15Z Arduino Connector Pin Defintion
67 extern gpioHandleKSDK_t A0;
68 extern gpioHandleKSDK_t A1;
69 extern gpioHandleKSDK_t A2;
70 extern gpioHandleKSDK_t A3;
71 extern gpioHandleKSDK_t D2;
72 extern gpioHandleKSDK_t D3;
73 extern gpioHandleKSDK_t D4;
74 extern gpioHandleKSDK_t D5;
75 extern gpioHandleKSDK_t D6;
76 extern gpioHandleKSDK_t D7;
77 extern gpioHandleKSDK_t D8;
78 extern gpioHandleKSDK_t D9;
79 extern gpioHandleKSDK_t D10;
80 
81 // FRDM-KE15Z Internal Peripheral Pin Definitions
85 extern gpioHandleKSDK_t INT1;
86 extern gpioHandleKSDK_t RST_A;
87 
88 // I2C_S1: Pin mapping and driver information for default I2C brought to shield
89 #define I2C_S1_SCL_PIN A5
90 #define I2C_S1_SDA_PIN A4
91 #define I2C_S1_DRIVER Driver_I2C0
92 #define I2C_S1_DEVICE_INDEX I2C0_INDEX
93 #define I2C_S1_SIGNAL_EVENT I2C0_SignalEvent_t
94 
95 // I2C_S2: Pin mapping and driver information for alternate I2C bus on shield
96 #define I2C_S2_SCL_PIN D15
97 #define I2C_S2_SDA_PIN D14
98 #define I2C_S2_DRIVER Driver_I2C1
99 #define I2C_S2_DEVICE_INDEX I2C1_INDEX
100 #define I2C_S2_SIGNAL_EVENT I2C1_SignalEvent_t
101 
102 // I2C_B: Pin mapping and driver information for I2C routed on KE15Z base board
103 #define I2C_BB_SCL_PIN A5
104 #define I2C_BB_SDA_PIN A4
105 #define I2C_BB_DRIVER Driver_I2C0
106 #define I2C_BB_DEVICE_INDEX I2C0_INDEX
107 #define I2C_BB_SIGNAL_EVENT I2C0_SignalEvent_t
108 
109 // SPIS: Pin mapping and driver information default SPI brought to shield
110 #define SPI_S_SCLK D13
111 #define SPI_S_MOSI D11
112 #define SPI_S_MISO D12
113 #define SPI_S_DRIVER Driver_SPI0
114 #define SPI_S_BAUDRATE 500000U ///< Transfer baudrate - 500k
115 #define SPI_S_DEVICE_INDEX SPI0_INDEX
116 #define SPI_S_SIGNAL_EVENT SPI0_SignalEvent_t
117 
118 // UART: Driver information for default UART to communicate with HOST PC.
119 #define HOST_S_DRIVER Driver_USART1
120 #define HOST_S_SIGNAL_EVENT HOST_SignalEvent_t
121 
122 // Bluetooth: Driver information for default UART to communicate with HOST PC.
123 #define HOST_B_DRIVER Driver_USART1
124 #define HOST_B_SIGNAL_EVENT HOST_SignalEvent_t
125 
126 // On-Board FXOS8700 Sensor Information
127 #define FXOS8700_BB_I2C_ADDR 0x1C
128 #define FXOS8700_BB_INT1 INT1
129 #define FXOS8700_BB_RST RST_A
130 
131 /* @brief Ask use input to resume after specified samples have been processed. */
132 #define ASK_USER_TO_RESUME(x) \
133  static volatile bool askResume = true; \
134  static uint16_t samplesToProcess = x - 1; \
135  if (askResume && !samplesToProcess--) \
136  { \
137  PRINTF("\r\n Specified samples processed, press any key to continue... \r\n"); \
138  GETCHAR(); \
139  askResume = false; \
140  }
141 
142 // Miscellaneous Hardware Configuration Parameters
143 #define ADS_NVM_ADDR 0x0003F000 ///< start of the next to last 2K (sector size) of the 256K flash
144 #define FLASH_SECTOR_SIZE_PROPERTY kFLASH_PropertyPflashSectorSize
145 
146 // Set GPIO pin for handling the gpio interrupt using PORTB_PORTC_PORTD_PORTE_IRQHandler
147 // By default, GPIO Pin set to GPIOB
148 #define GPIO_TYPE GPIOC
149 #define GPIO_PORT_NUM PORTC_NUM
150 
151 /* Compatability definitions for KE15Z */
152 #define I2C0 LPI2C0
153 #define I2C1 LPI2C1
154 #define SPI0 LPSPI0
155 #define SPI1 LPSPI1
156 #define I2C_Type LPI2C_Type
157 #define SPI_Type LPSPI_Type
158 #define I2C_BASE_PTRS LPI2C_BASE_PTRS
159 #define SPI_BASE_PTRS LPSPI_BASE_PTRS
160 
161 /* Reset the onboard FXOS8700 */
162 void BOARD_ACCEL_Reset(void);
163 
164 #endif /* FRDM_KE15Z_H_ */
gpioHandleKSDK_t D0
Definition: frdm_k64f.c:98
void BOARD_ACCEL_Reset(void)
Reset the onboard FXOS8700.
Definition: frdm_ke15z.c:346
gpioHandleKSDK_t D9
Definition: frdm_k64f.c:191
gpioHandleKSDK_t D1
Definition: frdm_k64f.c:105
gpioHandleKSDK_t D13
Definition: frdm_k64f.c:75
gpioHandleKSDK_t D14
Definition: frdm_k64f.c:50
gpioHandleKSDK_t RED_LED
Definition: frdm_k64f.c:207
The GPIO pin handle for KSDK.
Definition: gpio_driver.h:75
gpioHandleKSDK_t A4
Definition: frdm_k64f.c:66
gpioHandleKSDK_t D7
Definition: frdm_k64f.c:177
gpioHandleKSDK_t D6
Definition: frdm_k64f.c:170
gpioHandleKSDK_t RST_A
Definition: frdm_ke15z.c:240
gpioHandleKSDK_t INT1
Definition: frdm_k64f.c:230
gpioHandleKSDK_t D5
Definition: frdm_k64f.c:163
gpioHandleKSDK_t D12
Definition: frdm_k64f.c:89
gpioHandleKSDK_t A5
Definition: frdm_k64f.c:59
gpioHandleKSDK_t A0
Definition: frdm_k64f.c:114
gpioHandleKSDK_t A1
Definition: frdm_k64f.c:121
gpioHandleKSDK_t D15
Definition: frdm_k64f.c:43
gpioHandleKSDK_t D10
Definition: frdm_k64f.c:198
gpioHandleKSDK_t D4
Definition: frdm_k64f.c:156
gpioHandleKSDK_t D3
Definition: frdm_k64f.c:149
gpioHandleKSDK_t BLUE_LED
Definition: frdm_k64f.c:221
gpioHandleKSDK_t A3
Definition: frdm_k64f.c:135
gpioHandleKSDK_t D2
Definition: frdm_k64f.c:142
gpioHandleKSDK_t D8
Definition: frdm_k64f.c:184
gpioHandleKSDK_t GREEN_LED
Definition: frdm_k64f.c:214
gpioHandleKSDK_t A2
Definition: frdm_k64f.c:128
gpioHandleKSDK_t D11
Definition: frdm_k64f.c:82