nf_512B.h

Go to the documentation of this file.
00001 /*This file is prepared for Doxygen automatic documentation generation.*/
00013 
00014 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
00015  *
00016  * Redistribution and use in source and binary forms, with or without
00017  * modification, are permitted provided that the following conditions are met:
00018  *
00019  * 1. Redistributions of source code must retain the above copyright notice,
00020  * this list of conditions and the following disclaimer.
00021  *
00022  * 2. Redistributions in binary form must reproduce the above copyright notice,
00023  * this list of conditions and the following disclaimer in the documentation
00024  * and/or other materials provided with the distribution.
00025  *
00026  * 3. The name of Atmel may not be used to endorse or promote products derived
00027  * from this software without specific prior written permission.
00028  *
00029  * 4. This software may only be redistributed and used in connection with an Atmel
00030  * AVR product.
00031  *
00032  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
00033  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00034  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
00035  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00036  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00037  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00038  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00039  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00040  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00041  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00042  */
00043 
00044 #ifndef _NF_512B_H_
00045 #define _NF_512B_H_
00046 
00047 #define  NF_TYPE_512B_KNOWN   FALSE // No static mode define by default
00048 
00051 #define  CONF_512B_F1_1    0
00052 #define  CONF_512B_F1_2    1
00053 #define  CONF_512B_F1_3    2
00054 #define  CONF_512B_F2_1    3
00055 #define  CONF_512B_F2_2    4
00056 #define  CONF_512B_F2_3    5
00057 #define  CONF_512B_F3_1    6
00058 #define  CONF_512B_F3_2    7
00059 #define  CONF_512B_F3_3    8
00060 #define  CONF_512B_F3_4    9
00061 #define  CONF_512B_F3_5    10
00062 #define  CONF_512B_F3_6    11
00063 #define  CONF_512B_F3_7    12
00064 #define  CONF_512B_F3_8    13
00065 #define  CONF_512B_F3_9    14
00066 #define  CONF_512B_F3_10   15
00067 #define  CONF_512B_F4_1    16
00068 #define  CONF_512B_F4_2    17
00069 #define  CONF_512B_F4_3    18
00070 #define  CONF_512B_F4_4    19
00071 
00072 
00073 #if (NF_AUTO_DETECT_512B==TRUE)
00074 
00075 //**********  LIST USED FOR GENERIC 512B DRIVER ************
00076 
00079 #  if (!defined _nfc_drv_c_)
00080 extern _CONST_TYPE_   St_nf_conf  nf_list_conf[];
00081 #  else
00082 _CONST_TYPE_   St_nf_conf  nf_list_conf[]=
00083 {
00084   { 1,1,0,1}  // CONF_512B_F1_1
00085 , { 1,1,0,0}  // CONF_512B_F1_2
00086 , { 1,1,0,0}  // CONF_512B_F1_3
00087 , { 2,1,0,0}  // CONF_512B_F2_1
00088 , { 2,1,0,0}  // CONF_512B_F2_2
00089 , { 2,1,0,0}  // CONF_512B_F2_3
00090 , { 2,2,0,1}  // CONF_512B_F3_1
00091 , { 2,2,0,1}  // CONF_512B_F3_2
00092 , { 2,4,0,1}  // CONF_512B_F3_3
00093 , { 2,4,0,1}  // CONF_512B_F3_4
00094 , { 2,4,0,1}  // CONF_512B_F3_5
00095 , { 1,2,0,1}  // CONF_512B_F3_6
00096 , { 1,2,0,1}  // CONF_512B_F3_7
00097 , { 1,2,0,1}  // CONF_512B_F3_8
00098 , { 1,4,0,1}  // CONF_512B_F3_9
00099 , { 1,4,0,1}  // CONF_512B_F3_10
00100 , { 0,0,0,1}  // CONF_512B_F4_1
00101 , { 0,0,0,0}  // CONF_512B_F4_2
00102 , { 0,0,0,1}  // CONF_512B_F4_3
00103 , { 0,0,0,1}  // CONF_512B_F4_4
00104 };
00105 #endif
00106 
00107 
00110 #  if (!defined _nfc_drv_c_)
00111 extern _CONST_TYPE_   St_nf_id    nf_list_id[];
00112 #  else
00113 _CONST_TYPE_   St_nf_id    nf_list_id[]=
00114 {
00115 //  Maker         ,ID    ,Conf               // References
00116   { M_ID_HYNIX    ,0x35  ,CONF_512B_F2_2 }   // HY27SS08561M
00117 , { M_ID_HYNIX    ,0x36  ,CONF_512B_F2_3 }   // HY27SS08121M
00118 , { M_ID_HYNIX    ,0x75  ,CONF_512B_F2_1 }   // HY27US08561M
00119 , { M_ID_HYNIX    ,0x76  ,CONF_512B_F2_1 }   // HY27US08121M
00120                                             
00121 , { M_ID_INFINEON ,0x66  ,CONF_512B_F1_1 }   // HYF31DS51280[4/5]BT[C/I]
00122                                             
00123 , { M_ID_SAMSUNG  ,0x33  ,CONF_512B_F4_4 }   // K9F2808Q0B
00124 //{ M_ID_SAMSUNG  ,0x35  ,CONF_512B_F3_6 }   // K9F5608Q0B, K9F5608R0D
00125 , { M_ID_SAMSUNG  ,0x35  ,CONF_512B_F3_8 }   // K9F5608Q0C
00126 //{ M_ID_SAMSUNG  ,0x36  ,CONF_512B_F3_9 }   // K9F1208Q0A, K9F1208Q0B
00127 , { M_ID_SAMSUNG  ,0x36  ,CONF_512B_F3_2 }   // K9K1208Q0C
00128                                             
00129 , { M_ID_SAMSUNG  ,0x73  ,CONF_512B_F4_1 }   // K9F2808U0B, K9F2808U0C
00130 //{ M_ID_SAMSUNG  ,0x75  ,CONF_512B_F3_6 }   // K9F5608D0C, K9F5608U0B, K9F5608U0C, K9F5608U0D
00131 , { M_ID_SAMSUNG  ,0x75  ,CONF_512B_F3_7 }   // K9F5608U0A
00132 , { M_ID_SAMSUNG  ,0x76  ,CONF_512B_F4_2 }   // K9F1208R0C, K9F1208U0C
00133 //{ M_ID_SAMSUNG  ,0x76  ,CONF_512B_F3_9 }   // K9F1208D0A, K9F1208D0B, K9F1208U0A, K9F1208U0B
00134 //{ M_ID_SAMSUNG  ,0x76  ,CONF_512B_F3_10}   // K9F1208U0M
00135 //{ M_ID_SAMSUNG  ,0x76  ,CONF_512B_F3_1 }   // K9K1208D0C, K9K1208U0C
00136 , { M_ID_SAMSUNG  ,0x78  ,CONF_512B_F3_5 }   // K9K1G08Q0A
00137 //{ M_ID_SAMSUNG  ,0x79  ,CONF_512B_F3_3 }   // K9K1G08U0A
00138 , { M_ID_SAMSUNG  ,0x79  ,CONF_512B_F3_4 }   // K9K1G08U0M
00139                                             
00140 , { M_ID_ST       ,0x33  ,CONF_512B_F1_3 }   // NAND128R3A
00141 , { M_ID_ST       ,0x35  ,CONF_512B_F1_3 }   // NAND256R3A
00142 , { M_ID_ST       ,0x36  ,CONF_512B_F1_3 }   // NAND512R3A
00143 , { M_ID_ST       ,0x39  ,CONF_512B_F1_3 }   // NAND01GR3A
00144 , { M_ID_ST       ,0x73  ,CONF_512B_F4_2 }   // NAND128W3A
00145 , { M_ID_ST       ,0x75  ,CONF_512B_F1_2 }   // NAND256W3A
00146 , { M_ID_ST       ,0x76  ,CONF_512B_F1_2 }   // NAND512W3A
00147 , { M_ID_ST       ,0x79  ,CONF_512B_F1_2 }   // NAND01GW3A
00148                                             
00149 , { M_ID_TOSHIBA  ,0x73  ,CONF_512B_F4_2 }   // TC58128AFT, TC58128AFTI
00150 //{ M_ID_TOSHIBA  ,0x73  ,CONF_512B_F4_3 }   // TC58DAM72A1FT00, TC58DVM72A1FT00, TC58DVM72A1FTI0
00151 , { M_ID_TOSHIBA  ,0x75  ,CONF_512B_F4_2 }   // TC58256AFT, TC58256AFTI
00152 //{ M_ID_TOSHIBA  ,0x75  ,CONF_512B_F4_3 }   // TC582562AXB, TC58DAM82A1FT00, TC58DVM82A1FT00, TC58DVM82A1FTI0, TC58DVM82A1XBJ1
00153 , { M_ID_TOSHIBA  ,0x76  ,CONF_512B_F4_2 }   // TC58512FT, TC58512FTI
00154 //{ M_ID_TOSHIBA  ,0x76  ,CONF_512B_F4_3 }   // TC58DVM92A1FT00, TC58DWM92A2XGJ5, TC58DWM92A2XGJX, TC58DVM92A1FTI0
00155 , { M_ID_TOSHIBA  ,0x79  ,CONF_512B_F4_2 }   // TH58100FT, TH58100FTI
00156 //{ M_ID_TOSHIBA  ,0x79  ,CONF_512B_F4_3 }   // TC58DVG02A1FT00, TC58DVG02A1FTI0
00157 
00158 // !! Nand FLash 512B 16 pages not supported by generic driver 512B
00159 //{ M_ID_SAMSUNG  ,0x39  ,CONF_512B_F4_1 }   // K9F6408U0C
00160 //{ M_ID_SAMSUNG  ,0xE6  ,CONF_512B_F4_1 }   // K9F6408Q0C
00161 //{ M_ID_SAMSUNG  ,0xE6  ,CONF_512B_F4_3 }   // K9F6408U0B
00162 //{ M_ID_TOSHIBA  ,0xE6  ,CONF_512B_F4_2 }   // TC58V64BFT, TC58V64BFTI
00163 };
00164 #  endif // (!defined _nfc_drv_c_)
00165 
00166 
00169 #  if (!defined _nfc_drv_c_)
00170 extern _CONST_TYPE_   St_nf_link_id_block  nf_list_link_id_block[];
00171 #  else
00172 _CONST_TYPE_   St_nf_link_id_block  nf_list_link_id_block[]=
00173 {
00174 // !! Nand FLash 512B 32 pages
00175   { 0x33   ,1 }
00176 , { 0x35   ,2 }
00177 , { 0x36   ,4 }
00178 , { 0x39   ,8 }  // Specific ST
00179 , { 0x66   ,4 }
00180 , { 0x73   ,1 }
00181 , { 0x75   ,2 }
00182 , { 0x76   ,4 }
00183 , { 0x78 ,8 }
00184 , { 0x79   ,8 }
00185 // !! Nand FLash 512B 16 pages not supported by generic driver 512B
00186 //{ 0x39 ,1 }  // Specific Samsung
00187 //{ 0xE6 ,1 }
00188 };
00189 #  endif // (!defined _nfc_drv_c_)
00190 
00191 
00192 #else    // (NF_AUTO_DETECT_512B==TRUE)
00193 
00194 
00195 //**********  LIST USED FOR SINGLE 512B DRIVER ************
00196 #  undef  NF_DEV_CONF   // In case of define by other listing (e.g. 2KB)
00197 
00198 // LIST USED FOR SINGLE 512B DRIVER with 16 pages per block                       
00199 
00200 #if    (defined NF_TYPE_K9F6408U0C)
00201 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00202 #  define NF_DEV_ID     0x39
00203 #  define NF_DEV_CONF   CONF_512B_F4_1
00204 #  define NF_N_ZONES    1
00205 #  define NF_SHIFT_BLOCK_PAGE          4  // (1<<n) size of block (16p), unit in pages
00206                         
00207 #elif  (defined NF_TYPE_K9F6408Q0C)
00208 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00209 #  define NF_DEV_ID     0xE6
00210 #  define NF_DEV_CONF   CONF_512B_F4_1
00211 #  define NF_N_ZONES    1
00212 #  define NF_SHIFT_BLOCK_PAGE          4  // (1<<n) size of block (16p), unit in pages
00213                         
00214 #elif  (defined NF_TYPE_K9F6408U0B)
00215 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00216 #  define NF_DEV_ID     0xE6
00217 #  define NF_DEV_CONF   CONF_512B_F4_3
00218 #  define NF_N_ZONES    1
00219 #  define NF_SHIFT_BLOCK_PAGE          4  // (1<<n) size of block (16p), unit in pages
00220                         
00221 #elif  (defined NF_TYPE_TC58V64BFT) || (defined NF_TYPE_TC58V64BFTI)
00222 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00223 #  define NF_DEV_ID     0xE6
00224 #  define NF_DEV_CONF   CONF_512B_F4_2
00225 #  define NF_N_ZONES    1
00226 #  define NF_SHIFT_BLOCK_PAGE          4  // (1<<n) size of block (16p), unit in pages
00227 
00228 
00229 // LIST USED FOR SINGLE 512B DRIVER with 32 pages per block
00230                       
00231 #elif  (defined NF_TYPE_HY27SS08561M)
00232 #  define NF_DEV_MAKER  M_ID_HYNIX
00233 #  define NF_DEV_ID     0x35
00234 #  define NF_DEV_CONF   CONF_512B_F2_2
00235                         
00236 #elif  (defined NF_TYPE_HY27SS08121M)
00237 #  define NF_DEV_MAKER  M_ID_HYNIX
00238 #  define NF_DEV_ID     0x36
00239 #  define NF_DEV_CONF   CONF_512B_F2_3
00240  
00241 #elif  (defined NF_TYPE_HY27US08561M)
00242 #  define NF_DEV_MAKER  M_ID_HYNIX
00243 #  define NF_DEV_ID     0x75
00244 #  define NF_DEV_CONF   CONF_512B_F2_1
00245                         
00246 #elif  (defined NF_TYPE_HY27US08121M)
00247 #  define NF_DEV_MAKER  M_ID_HYNIX
00248 #  define NF_DEV_ID     0x76
00249 #  define NF_DEV_CONF   CONF_512B_F2_1
00250                                                
00251 #elif  (defined NF_TYPE_HYF31DS51280XBT)
00252 #  define NF_DEV_MAKER  M_ID_INFINEON
00253 #  define NF_DEV_ID     0x66
00254 #  define NF_DEV_CONF   CONF_512B_F1_1
00255 
00256 #elif  (defined NF_TYPE_K9F2808Q0B)
00257 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00258 #  define NF_DEV_ID     0x33
00259 #  define NF_DEV_CONF   CONF_512B_F4_4
00260                         
00261 #elif  (defined NF_TYPE_K9F5608Q0B) || (defined NF_TYPE_K9F5608R0D)
00262 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00263 #  define NF_DEV_ID     0x35
00264 #  define NF_DEV_CONF   CONF_512B_F3_6
00265                   
00266 #elif  (defined NF_TYPE_K9F5608Q0C)
00267 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00268 #  define NF_DEV_ID     0x35
00269 #  define NF_DEV_CONF   CONF_512B_F3_8
00270                         
00271 #elif  (defined NF_TYPE_K9F1208Q0A) || (defined NF_TYPE_K9F1208Q0B)
00272 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00273 #  define NF_DEV_ID     0x36
00274 #  define NF_DEV_CONF   CONF_512B_F3_9
00275                                                
00276 #elif  (defined NF_TYPE_K9K1208Q0C)
00277 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00278 #  define NF_DEV_ID     0x36
00279 #  define NF_DEV_CONF   CONF_512B_F3_2
00280         
00281 #elif  (defined NF_TYPE_K9F2808U0B) || (defined NF_TYPE_K9F2808U0C)
00282 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00283 #  define NF_DEV_ID     0x73
00284 #  define NF_DEV_CONF   CONF_512B_F4_1
00285                       
00286 #elif  (defined NF_TYPE_K9F5608D0C) || (defined NF_TYPE_K9F5608U0B) || (defined NF_TYPE_K9F5608U0C) || (defined NF_TYPE_K9F5608U0D)
00287 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00288 #  define NF_DEV_ID     0x75
00289 #  define NF_DEV_CONF   CONF_512B_F3_6
00290                         
00291 #elif  (defined NF_TYPE_K9F5608U0A)
00292 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00293 #  define NF_DEV_ID     0x75
00294 #  define NF_DEV_CONF   CONF_512B_F3_7
00295                                                      
00296 #elif  (defined NF_TYPE_K9F1208R0C) || (defined NF_TYPE_K9F1208U0C)
00297 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00298 #  define NF_DEV_ID     0x76
00299 #  define NF_DEV_CONF   CONF_512B_F4_2
00300                    
00301 #elif  (defined NF_TYPE_K9F1208D0A) || (defined NF_TYPE_K9F1208D0B) || (defined NF_TYPE_K9F1208U0A) || (defined NF_TYPE_K9F1208U0B)
00302 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00303 #  define NF_DEV_ID     0x76
00304 #  define NF_DEV_CONF   CONF_512B_F3_9
00305                                                
00306 #elif  (defined NF_TYPE_K9F1208U0M)
00307 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00308 #  define NF_DEV_ID     0x76
00309 #  define NF_DEV_CONF   CONF_512B_F3_10
00310                         
00311 #elif  (defined NF_TYPE_K9K1208D0C) || (defined NF_TYPE_K9K1208U0C)
00312 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00313 #  define NF_DEV_ID     0x76
00314 #  define NF_DEV_CONF   CONF_512B_F3_1
00315                        
00316 #elif  (defined NF_TYPE_K9K1G08Q0A)
00317 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00318 #  define NF_DEV_ID     0x78
00319 #  define NF_DEV_CONF   CONF_512B_F3_5
00320                         
00321 #elif  (defined NF_TYPE_K9K1G08U0A)
00322 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00323 #  define NF_DEV_ID     0x79
00324 #  define NF_DEV_CONF   CONF_512B_F3_3
00325                         
00326 #elif  (defined NF_TYPE_K9K1G08U0M)
00327 #  define NF_DEV_MAKER  M_ID_SAMSUNG
00328 #  define NF_DEV_ID     0x79
00329 #  define NF_DEV_CONF   CONF_512B_F3_4
00330 
00331 #elif  (defined NF_TYPE_NAND128R3A)
00332 #  define NF_DEV_MAKER  M_ID_ST
00333 #  define NF_DEV_ID     0x33
00334 #  define NF_DEV_CONF   CONF_512B_F1_3
00335                         
00336 #elif  (defined NF_TYPE_NAND256R3A)
00337 #  define NF_DEV_MAKER  M_ID_ST
00338 #  define NF_DEV_ID     0x35
00339 #  define NF_DEV_CONF   CONF_512B_F1_3
00340                         
00341 #elif  (defined NF_TYPE_NAND512R3A)
00342 #  define NF_DEV_MAKER  M_ID_ST
00343 #  define NF_DEV_ID     0x36
00344 #  define NF_DEV_CONF   CONF_512B_F1_3
00345                         
00346 #elif  (defined NF_TYPE_NAND01GR3A)
00347 #  define NF_DEV_MAKER  M_ID_ST
00348 #  define NF_DEV_ID     0x39
00349 #  define NF_DEV_CONF   CONF_512B_F1_3
00350                         
00351 #elif  (defined NF_TYPE_NAND128W3A)
00352 #  define NF_DEV_MAKER  M_ID_ST
00353 #  define NF_DEV_ID     0x73
00354 #  define NF_DEV_CONF   CONF_512B_F4_2
00355                         
00356 #elif  (defined NF_TYPE_NAND256W3A)
00357 #  define NF_DEV_MAKER  M_ID_ST
00358 #  define NF_DEV_ID     0x75
00359 #  define NF_DEV_CONF   CONF_512B_F1_2
00360                         
00361 #elif  (defined NF_TYPE_NAND512W3A)
00362 #  define NF_DEV_MAKER  M_ID_ST
00363 #  define NF_DEV_ID     0x76
00364 #  define NF_DEV_CONF   CONF_512B_F1_2
00365                         
00366 #elif  (defined NF_TYPE_NAND512W3A2C)
00367 #  define NF_DEV_MAKER  M_ID_ST
00368 #  define NF_DEV_ID     0x76
00369 #  define NF_DEV_CONF   CONF_512B_F2_1
00370                         
00371 #elif  (defined NF_TYPE_NAND01GW3A)
00372 #  define NF_DEV_MAKER  M_ID_ST
00373 #  define NF_DEV_ID     0x79
00374 #  define NF_DEV_CONF   CONF_512B_F1_2
00375                          
00376 #elif  (defined NF_TYPE_TC58128AFT) || (defined NF_TYPE_TC58128AFTI)
00377 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00378 #  define NF_DEV_ID     0x73
00379 #  define NF_DEV_CONF   CONF_512B_F4_2
00380                         
00381 #elif  (defined NF_TYPE_TC58DAM72A1FT00) || (defined NF_TYPE_TC58DVM72A1FT00) || (defined NF_TYPE_TC58DVM72A1FTI0)
00382 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00383 #  define NF_DEV_ID     0x73
00384 #  define NF_DEV_CONF   CONF_512B_F4_3
00385                                                   
00386 #elif  (defined NF_TYPE_TC58256AFT) || (defined NF_TYPE_TC58256AFTI)
00387 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00388 #  define NF_DEV_ID     0x75
00389 #  define NF_DEV_CONF   CONF_512B_F4_2
00390                      
00391 #elif  (defined NF_TYPE_TC582562AXB) || (defined NF_TYPE_TC58DAM82A1FT00) || (defined NF_TYPE_TC58DVM82A1FT00) || (defined NF_TYPE_TC58DVM82A1FTI0) || (defined NF_TYPE_TC58DVM82A1XBJ1)
00392 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00393 #  define NF_DEV_ID     0x75
00394 #  define NF_DEV_CONF   CONF_512B_F4_3
00395                                                   
00396 #elif  (defined NF_TYPE_TC58512FT) || (defined NF_TYPE_TC58512FTI)
00397 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00398 #  define NF_DEV_ID     0x76
00399 #  define NF_DEV_CONF   CONF_512B_F4_2
00400                                     
00401 #elif  (defined NF_TYPE_TC58DVM92A1FT00) || (defined NF_TYPE_TC58DVM92A1FTI0) || (defined NF_TYPE_TC58DWM92A2XGJ5) || (defined NF_TYPE_TC58DWM92A2XGJX)
00402 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00403 #  define NF_DEV_ID     0x76
00404 #  define NF_DEV_CONF   CONF_512B_F4_3
00405                                                   
00406 #elif  (defined NF_TYPE_TH58100FT) || (defined NF_TYPE_TH58100FTI)
00407 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00408 #  define NF_DEV_ID     0x79
00409 #  define NF_DEV_CONF   CONF_512B_F4_2
00410                      
00411 #elif  (defined NF_TYPE_TC58DVG02A1FT00) || (defined NF_TYPE_TC58DVG02A1FTI0)
00412 #  define NF_DEV_MAKER  M_ID_TOSHIBA
00413 #  define NF_DEV_ID     0x79
00414 #  define NF_DEV_CONF   CONF_512B_F4_3
00415 
00416 #endif
00417 
00418 
00419 #if (defined NF_DEV_CONF)
00420 
00421 #  undef  NF_TYPE_512B_KNOWN
00422 #  define NF_TYPE_512B_KNOWN  TRUE     // A static mode define
00423 
00424    // Determination of number of block
00425 #  if (!defined  NF_N_ZONES)
00426 #  if   (NF_DEV_ID == 0x33)
00427 #     define   NF_N_ZONES       1
00428 #  elif (NF_DEV_ID == 0x73)
00429 #     define   NF_N_ZONES       1
00430 #  elif (NF_DEV_ID == 0x35)
00431 #     define   NF_N_ZONES       2
00432 #  elif (NF_DEV_ID == 0x75)
00433 #     define   NF_N_ZONES       2
00434 #  elif (NF_DEV_ID == 0x36)
00435 #     define   NF_N_ZONES       4
00436 #  elif (NF_DEV_ID == 0x66)
00437 #     define   NF_N_ZONES       4
00438 #  elif (NF_DEV_ID == 0x76)
00439 #     define   NF_N_ZONES       4
00440 #  elif (NF_DEV_ID == 0x39)   // Specific ST
00441 #     define   NF_N_ZONES       8
00442 #  elif (NF_DEV_ID == 0x78)
00443 #     define   NF_N_ZONES       8
00444 #  elif (NF_DEV_ID == 0x79)
00445 #     define   NF_N_ZONES       8
00446 #  else
00447 #     error    BAD DEVICE ID of reference in nf_512B.h
00448 #  endif
00449 #  endif // (!defined  NF_N_ZONES)
00450 
00451 #  define   NF_N_BLOCKS          (NF_N_ZONES*1024L)
00452 
00453    // Determination of number of row cycles
00454 #  if   (NF_N_ZONES <= 2)
00455 #     define   NF_N_ROW_CYCLES   2
00456 #  else
00457 #     define   NF_N_ROW_CYCLES   3
00458 #  endif
00459 
00460    // Select configuration
00461 /*
00462 #  define NF_COPYBACK_CONT       // 0 = copy back not supported, N = number of    CONTINUE subdivision contraint on copyback
00463 #  define NF_COPYBACK_DISCONT    // 0 = copy back not supported, N = number of DISCONTINUE subdivision contraint on copyback
00464 #  define NF_CACHE_PROGRAM       // 1 = cache program supported, 0 = not supported
00465 #  define NF_CE_TOGGLE           // 1 = CE toggle supported, 0 = not supported - CE must be always LOW
00466 #  define NF_TIMING_READ         // mode 1: 1 cycle high, 1 cycle low for read cycle
00467                                  // mode 0: 1.5 cycle high, 0.5 cycle low for read cycle
00468 #  define CLK_DFC_NFC            // Freq max supported,  CLK_DFC_NFC_xxMHz
00469 */
00470 #  if    (NF_DEV_CONF == CONF_512B_F4_1)
00471 #     define NF_COPYBACK_CONT    0
00472 #     define NF_COPYBACK_DISCONT 0
00473 #     define NF_CACHE_PROGRAM    0
00474 #     define NF_CE_TOGGLE        1
00475 #     define NF_TIMING_READ      1
00476 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00477 #  elif  (NF_DEV_CONF == CONF_512B_F4_2)
00478 #     define NF_COPYBACK_CONT    0
00479 #     define NF_COPYBACK_DISCONT 0
00480 #     define NF_CACHE_PROGRAM    0
00481 #     define NF_CE_TOGGLE        0
00482 #     define NF_TIMING_READ      0
00483 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00484 #  elif  (NF_DEV_CONF == CONF_512B_F4_3)
00485 #     define NF_COPYBACK_CONT    0
00486 #     define NF_COPYBACK_DISCONT 0
00487 #     define NF_CACHE_PROGRAM    0
00488 #     define NF_CE_TOGGLE        1
00489 #     define NF_TIMING_READ      0
00490 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00491 #  elif  (NF_DEV_CONF == CONF_512B_F4_4)
00492 #     define NF_COPYBACK_CONT    0
00493 #     define NF_COPYBACK_DISCONT 0
00494 #     define NF_CACHE_PROGRAM    0
00495 #     define NF_CE_TOGGLE        1
00496 #     define NF_TIMING_READ      0
00497 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00498 #  elif  (NF_DEV_CONF == CONF_512B_F1_1)
00499 #     define NF_COPYBACK_CONT    1
00500 #     define NF_COPYBACK_DISCONT 1
00501 #     define NF_CACHE_PROGRAM    0
00502 #     define NF_CE_TOGGLE        1
00503 #     define NF_TIMING_READ      1
00504 #     define CLK_DFC_NFC         CLK_DFC_NFC_40MHz
00505 #  elif  (NF_DEV_CONF == CONF_512B_F1_2)
00506 #     define NF_COPYBACK_CONT    1
00507 #     define NF_COPYBACK_DISCONT 1
00508 #     define NF_CACHE_PROGRAM    0
00509 #     define NF_CE_TOGGLE        0
00510 #     define NF_TIMING_READ      0
00511 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00512 #  elif  (NF_DEV_CONF == CONF_512B_F1_3)
00513 #     define NF_COPYBACK_CONT    1
00514 #     define NF_COPYBACK_DISCONT 1
00515 #     define NF_CACHE_PROGRAM    0
00516 #     define NF_CE_TOGGLE        0
00517 #     define NF_TIMING_READ      0
00518 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00519 #  elif  (NF_DEV_CONF == CONF_512B_F3_6)
00520 #     define NF_COPYBACK_CONT    1
00521 #     define NF_COPYBACK_DISCONT 2
00522 #     define NF_CACHE_PROGRAM    0
00523 #     define NF_CE_TOGGLE        1
00524 #     define NF_TIMING_READ      1
00525 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00526 #  elif  (NF_DEV_CONF == CONF_512B_F3_7)
00527 #     define NF_COPYBACK_CONT    1
00528 #     define NF_COPYBACK_DISCONT 2
00529 #     define NF_CACHE_PROGRAM    0
00530 #     define NF_CE_TOGGLE        1
00531 #     define NF_TIMING_READ      0
00532 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00533 #  elif  (NF_DEV_CONF == CONF_512B_F3_8)
00534 #     define NF_COPYBACK_CONT    1
00535 #     define NF_COPYBACK_DISCONT 2
00536 #     define NF_CACHE_PROGRAM    0
00537 #     define NF_CE_TOGGLE        1
00538 #     define NF_TIMING_READ      0
00539 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00540 #  elif  (NF_DEV_CONF == CONF_512B_F3_9)
00541 #     define NF_COPYBACK_CONT    1
00542 #     define NF_COPYBACK_DISCONT 4
00543 #     define NF_CACHE_PROGRAM    0
00544 #     define NF_CE_TOGGLE        1
00545 #     define NF_TIMING_READ      1
00546 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00547 #  elif  (NF_DEV_CONF == CONF_512B_F3_10)
00548 #     define NF_COPYBACK_CONT    1
00549 #     define NF_COPYBACK_DISCONT 4
00550 #     define NF_CACHE_PROGRAM    0
00551 #     define NF_CE_TOGGLE        1
00552 #     define NF_TIMING_READ      0
00553 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00554 #  elif  (NF_DEV_CONF == CONF_512B_F2_1)
00555 #     define NF_COPYBACK_CONT    2
00556 #     define NF_COPYBACK_DISCONT 1
00557 #     define NF_CACHE_PROGRAM    0
00558 #     define NF_CE_TOGGLE        0
00559 #     define NF_TIMING_READ      0
00560 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00561 #  elif  (NF_DEV_CONF == CONF_512B_F2_2)
00562 #     define NF_COPYBACK_CONT    2
00563 #     define NF_COPYBACK_DISCONT 1
00564 #     define NF_CACHE_PROGRAM    0
00565 #     define NF_CE_TOGGLE        0
00566 #     define NF_TIMING_READ      0
00567 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00568 #  elif  (NF_DEV_CONF == CONF_512B_F2_3)
00569 #     define NF_COPYBACK_CONT    2
00570 #     define NF_COPYBACK_DISCONT 1
00571 #     define NF_CACHE_PROGRAM    0
00572 #     define NF_CE_TOGGLE        0
00573 #     define NF_TIMING_READ      0
00574 #     define CLK_DFC_NFC         CLK_DFC_NFC_16MHz
00575 #  elif  (NF_DEV_CONF == CONF_512B_F3_1)
00576 #     define NF_COPYBACK_CONT    2
00577 #     define NF_COPYBACK_DISCONT 2
00578 #     define NF_CACHE_PROGRAM    0
00579 #     define NF_CE_TOGGLE        1
00580 #     define NF_TIMING_READ      1
00581 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00582 #  elif  (NF_DEV_CONF == CONF_512B_F3_2)
00583 #     define NF_COPYBACK_CONT    2
00584 #     define NF_COPYBACK_DISCONT 2
00585 #     define NF_CACHE_PROGRAM    0
00586 #     define NF_CE_TOGGLE        1
00587 #     define NF_TIMING_READ      0
00588 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00589 #  elif  (NF_DEV_CONF == CONF_512B_F3_3)
00590 #     define NF_COPYBACK_CONT    2
00591 #     define NF_COPYBACK_DISCONT 4
00592 #     define NF_CACHE_PROGRAM    0
00593 #     define NF_CE_TOGGLE        1
00594 #     define NF_TIMING_READ      1
00595 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00596 #  elif  (NF_DEV_CONF == CONF_512B_F3_4)
00597 #     define NF_COPYBACK_CONT    2
00598 #     define NF_COPYBACK_DISCONT 4
00599 #     define NF_CACHE_PROGRAM    0
00600 #     define NF_CE_TOGGLE        1
00601 #     define NF_TIMING_READ      0
00602 #     define CLK_DFC_NFC         CLK_DFC_NFC_30MHz
00603 #  elif  (NF_DEV_CONF == CONF_512B_F3_5)
00604 #     define NF_COPYBACK_CONT    2
00605 #     define NF_COPYBACK_DISCONT 4
00606 #     define NF_CACHE_PROGRAM    0
00607 #     define NF_CE_TOGGLE        1
00608 #     define NF_TIMING_READ      0
00609 #     define CLK_DFC_NFC         CLK_DFC_NFC_24MHz
00610 #  endif   // (defined CONF_512B_X)
00611 
00612 #endif   // (defined NF_DEV_CONF) = static mode
00613 
00614 #endif   // (NF_AUTO_DETECT_512B==TRUE)
00615 
00616 
00617 #if ((NF_AUTO_DETECT_512B == TRUE) || (NF_TYPE_512B_KNOWN == TRUE))
00618 //**** HERE A 512B driver with 32 or 16 pages by block is used in generic or single mode ****
00619 #  define NF_SHIFT_PAGE_BYTE           9  // (1<<n) size of page  (512B), unit in bytes
00620 #  if (!defined NF_SHIFT_BLOCK_PAGE)
00621 #  define NF_SHIFT_BLOCK_PAGE          5  // (1<<n) size of block (32p), unit in pages
00622 #  endif // else is define at 16p
00623 #endif
00624 
00625 #endif   // _NF_512B_H_

Generated on Wed Sep 23 09:17:02 2009 for ATMEL by  doxygen 1.5.3