1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
16 /** @addtogroup Fls Flash Driver
\r
20 * Definitions of configuration parameters for Flash Driver.
\r
28 #define USE_FLS_INFO STD_ON
\r
31 /* STD container : Fls
\r
34 * FlsPublishedInformation 1
\r
37 #include "MemIf_Types.h"
\r
39 /* FlsGeneral, 3.0 OK */
\r
40 #define FLS_VARIANT_PB STD_OFF
\r
41 #define FLS_AC_LOAD_ON_JOB_START STD_OFF /* NO SUPPORT */
\r
42 #define FLS_BASE_ADDRESS 0x00000000
\r
43 #define FLS_CANCEL_API STD_OFF /* NO SUPPORT */
\r
44 #define FLS_COMPARE_API STD_ON
\r
45 #define FLS_DEV_ERROR_DETECT STD_ON
\r
46 #define FLS_DRIVER_INDEX 0 /* NO SUPPORT */
\r
47 #define FLS_GET_JOB_RESULT_API STD_ON
\r
48 #define FLS_GET_STATUS_API STD_ON
\r
49 #define FLS_SET_MODE_API STD_OFF /* NO SUPPORT */
\r
50 //#define FLS_TOTAL_SIZE
\r
51 #define FLS_USE_INTERRUPTS STD_OFF /* NO SUPPORT */
\r
52 #define FLS_VERSION_INFO_API STD_ON
\r
54 /* FlsPublishedInformation, 3.0 OK */
\r
55 #define FLS_AC_LOCATION_ERASE 0 /* NO SUPPORT */
\r
56 #define FLS_AC_LOCATION_WRITE 0 /* NO SUPPORT */
\r
57 #define FLS_AC_SIZE_ERASE 0 /* NO SUPPORT */
\r
58 #define FLS_AC_SIZE_WRITE 0 /* NO SUPPORT */
\r
59 #define FLS_ERASE_TIME 0 /* NO SUPPORT */
\r
60 #define FLS_ERASED_VALUE 0xff /* NO SUPPORT */
\r
61 #define FLS_EXPECTED_HW_ID 0 /* NO SUPPORT */
\r
62 #define FLS_SPECIFIED_ERASE_CYCLES 0 /* NO SUPPORT */
\r
63 #define FLS_WRITE_TIME 0 /* NO SUPPORT */
\r
66 #if defined(CFG_MPC5668)
\r
68 #define FLASH_BANK_CNT 1
\r
69 #define FLASH_PAGE_SIZE 8
\r
70 #define FLASH_MAX_SECTORS 18
\r
71 #define FLS_TOTAL_SIZE ((16*8+64*2+128*2+256*6)*1024)
\r
74 #error CPU not supported
\r
77 #if (USE_FLS_INFO==STD_ON)
\r
79 typedef struct Flash {
\r
84 uint32_t sectAddr[FLASH_MAX_SECTORS+1];
\r
85 uint16_t addrSpace[FLASH_MAX_SECTORS+1];
\r
91 Fls_LengthType FlsNumberOfSectors;
\r
92 Fls_LengthType FlsPageSize;
\r
93 Fls_LengthType FlsSectorSize;
\r
94 Fls_AddressType FlsSectorStartaddress;
\r
102 void (*FlsAcErase)(); /* NO SUPPORT */
\r
103 void (*FlsAcWrite)(); /* NO SUPPORT */
\r
104 // FlsCallCycle N/A in core.
\r
105 void (*FlsJobEndNotification)();
\r
106 void (*FlsJobErrorNotification)();
\r
107 uint32_t FlsMaxReadFastMode; /* NO SUPPORT */
\r
108 uint32_t FlsMaxReadNormalMode; /* NO SUPPORT */
\r
109 uint32_t FlsMaxWriteFastMode; /* NO SUPPORT */
\r
110 uint32_t FlsMaxWriteNormalMode; /* NO SUPPORT */
\r
111 uint32_t FlsProtection; /* NO SUPPORT */
\r
112 #if (USE_FLS_INFO==STD_ON)
\r
113 const struct Flash *FlsInfo;
\r
115 const Fls_SectorType *FlsSectorList;
\r
117 // const uint32 FlsSectorListSize; /* NO SUPPORT */
\r
118 } Fls_ConfigSetType;
\r
120 typedef Fls_ConfigSetType Fls_ConfigType;
\r
122 extern const Fls_ConfigSetType FlsConfigSet[];
\r
124 #endif /*FLS_CFG_H_*/
\r