• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 NXP Semiconductors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 /**
19 * \file nfc_custom_config.h
20 * \brief HAL Custom Configurations
21 *
22 *
23 * \note This is the configuration header file of the HAL 4.0. custom configurable
24 *       parameters of the HAL 4.0 are provided in this file
25 *
26 * Project: NFC-FRI-1.1 / HAL4.0
27 *
28 * $Date: Fri Jun 11 16:44:31 2010 $
29 * $Author: ing04880 $
30 * $Revision: 1.11 $
31 * $Aliases: NFC_FRI1.1_WK1023_R35_1 $
32 *
33 */
34 
35 
36 /*@{*/
37 #ifndef NFC_CUSTOM_CONFIG_H
38 #define NFC_CUSTOM_CONFIG_H
39 /*@}*/
40 
41 
42 /**
43 *  \name Hal
44 *
45 * File: \ref nfc_custom_config.h
46 *
47 */
48 
49 
50 /*
51  *****************************************************************
52  **********************  CUSTOM MACROS **************************
53  *****************************************************************
54  */
55 
56 /**< Max number of remote devices supported*/
57 #define MAX_REMOTE_DEVICES        0x10
58 
59 
60 /**< Default Session ID for Initialisation */
61 #define DEFAULT_SESSION "NXP-NFC2"
62 
63 /** Resolution value for the timer, here the
64     timer resolution is 100 milliseconds */
65 #define TIMER_RESOLUTION                100U
66 
67 /**< Defines connection time out value for LLC timer,
68     500 is in milliseconds */
69 #define LINK_CONNECTION_TIMEOUT         500U
70 
71 /**< Defines guard time out value for LLC timer,
72     250 is in milliseconds */
73 #define LINK_GUARD_TIMEOUT              250U
74 
75 /**< Macro to Enable SMX Feature During
76  * Initialisation */
77 
78 
79 /* PLEASE NOTE: This Macro should be only enabled if there is a SMART_MX
80  * Chip attached to the PN544.
81  */
82 /* #define NXP_HAL_ENABLE_SMX */
83 
84 
85 
86 /* PLEASE NOTE: Kindly change the DEFAULT_SESSION Macro for each of the
87  * configuration change done for the below Macros
88  */
89 
90 /**<  External Clock Request Configuration for the NFC Device,
91       0x00U -> No Clock Request,
92       0x01U -> Clock Request through CLKREQ pin (GPIO pin 2),
93       0x02U -> Clock Request through NXP_EVT_CLK_REQUEST Event,
94       */
95 #define NXP_DEFAULT_CLK_REQUEST         0x00U
96 
97 /**<  External Input Clock Setting for the NFC Device,
98       0x00U -> No Input Clock Required (Use the Xtal),
99       0x01U -> 13 MHZ,
100       0x02U -> 19.2 MHZ,
101       0x03U -> 26 MHZ,
102       0x04U -> 38.4 MHZ,
103       0x05U -> Custom (Set the Custome Clock Registry),
104       */
105 #define NXP_DEFAULT_INPUT_CLK           0x00U
106 
107 
108 
109 #define NFC_DEV_HWCONF_DEFAULT          0xBCU
110 
111 /**<  TX LDO Configuration
112        0x00 -> 00b     3.0 V,
113        0x01 -> 01b     3.0 V,
114        0x02 -> 10b     2.7 V,
115        0x03 -> 11b     3.3 V,
116 
117       */
118 #define NXP_DEFAULT_TX_LDO              0x00U
119 
120 
121 /**<  External Clock Request Configuration for the NFC Device,
122       0x00U -> No Power Request,
123       0x01U -> Power Request through CLKREQ pin (GPIO pin 2),
124       0x02U -> Power Request through PWR_REQUEST (GPIO Pin 3),
125       */
126 #define NXP_UICC_PWR_REQUEST            0x00U
127 
128 /**<  UICC Bit Rate Configuration
129        0x02U -> 212Kbits/Sec
130        0x04U -> 424Kbits/Sec
131        0x08U -> 828Kbits/Sec
132  */
133 
134 #define NXP_UICC_BIT_RATE               0x08U
135 
136 /**<  Indicates PN544 Power Modes Configuration for the NFC Device,
137       0x00U -> PN544 stays in active bat mode
138                (except when generating RF field)
139       0x01U -> PN544 goes in standby when possible otherwise
140                stays in active bat mode
141       0x02U -> PN544 goes in idle mode as soon as it can
142                (otherwise it is in active bat except when generating RF field)
143       0x03U -> PN544 goes in standby when possible otherwise goes in idle mode
144                as soon as it can (otherwise it is in active bat except when
145                generating RF field)
146       */
147 
148 #define NXP_SYSTEM_PWR_STATUS           0x01U
149 
150 
151 /**<  System Event Notification
152        0x01     Overcurrent
153        0x02     PMUVCC Switch
154        0x04     External RF Field
155        0x08     Memory Violation
156        0x10     Temperature Overheat
157  */
158 
159 #define NXP_SYSTEM_EVT_INFO             0x10U
160 
161 /**<  NFCIP Active Mode Configuration
162        0x01     106 kbps
163        0x02     212 kbps
164        0x04     424 kbps
165  */
166 
167 #define NXP_NFCIP_ACTIVE_DEFAULT        0x01U
168 
169 
170 
171 /* Reset the Default values of Host Link Timers */
172 /* Macro to Enable the Host Side Link Timeout Configuration
173  * 0x00 ----> Default Pre-defined Configuration;
174  * 0x01 ----> Update only the Host Link Guard Timeout Configuration;
175  * 0x03 ----> Update Both the Host Link Guard Timeout
176               and ACK Timeout Configuration;
177  */
178 #define HOST_LINK_TIMEOUT              0x00U
179 
180 
181 #define NXP_NFC_LINK_GRD_CFG_DEFAULT   0x0032U
182 
183 
184 #define NXP_NFC_LINK_ACK_CFG_DEFAULT   0x0005U
185 
186 
187 /* Macro to Enable the Interface Character Timeout Configuration
188  * 0x00 ----> Default Pre-defined Configuration;
189  * 0x01 ----> Update the IFC Timeout Default Configuration;
190  */
191 #define NXP_NFC_IFC_TIMEOUT            0x00
192 
193 
194 #define NXP_NFC_IFC_CONFIG_DEFAULT     0x203AU
195 
196 
197 #define NXP_NFCIP_PSL_BRS_DEFAULT       0x00U
198 
199 
200 #endif /* NFC_CUSTOM_CONFIG_H */
201 
202