source: trunk/firmware/SES/Drivers/EEPROM/eeprom_emul_conf.h@ 2

Last change on this file since 2 was 1, checked in by f.jahn, 3 years ago
File size: 4.6 KB
Line 
1/**
2 ******************************************************************************
3 * @file eeprom_emul_conf.h
4 * @author MCD Application Team
5 * @brief EEPROM emulation configuration file.
6 * This file should be copied to the application folder and renamed
7 * to eeprom_emul_conf.h.
8 ******************************************************************************
9 * @attention
10 *
11 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics International N.V.
12 * All rights reserved.</center></h2>
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted, provided that the following conditions are met:
16 *
17 * 1. Redistribution of source code must retain the above copyright notice,
18 * this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright notice,
20 * this list of conditions and the following disclaimer in the documentation
21 * and/or other materials provided with the distribution.
22 * 3. Neither the name of STMicroelectronics nor the names of other
23 * contributors to this software may be used to endorse or promote products
24 * derived from this software without specific written permission.
25 * 4. This software, including modifications and/or derivative works of this
26 * software, must execute solely and exclusively on microcontroller or
27 * microprocessor devices manufactured by or for STMicroelectronics.
28 * 5. Redistribution and use of this software other than as permitted under
29 * this license is void and will automatically terminate your rights under
30 * this license.
31 *
32 * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
33 * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35 * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
36 * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
37 * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
38 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
40 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
42 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
43 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 ******************************************************************************
46 */
47
48/** @addtogroup EEPROM_Emulation
49 * @{
50 */
51
52/* Define to prevent recursive inclusion -------------------------------------*/
53#ifndef __EEPROM_EMUL_CONF_H
54#define __EEPROM_EMUL_CONF_H
55
56#ifdef __cplusplus
57 extern "C" {
58#endif
59
60/* Private constants ---------------------------------------------------------*/
61/** @addtogroup EEPROM_Private_Constants
62 * @{
63 */
64
65/** @defgroup Private_Configuration_Constants Private Configuration Constants
66 * @{
67 */
68
69/* Configuration of eeprom emulation in flash, can be custom */
70#define START_PAGE_ADDRESS 0x0801E000U /*!< Start address of the 1st page in flash, for EEPROM emulation */
71#define CYCLES_NUMBER 1U /*!< Number of 10Kcycles requested, minimum 1 for 10Kcycles (default),
72 for instance 10 to reach 100Kcycles. This factor will increase
73 pages number */
74#define GUARD_PAGES_NUMBER 2U /*!< Number of guard pages avoiding frequent transfers (must be multiple of 2): 0,2,4.. */
75
76/* Configuration of crc calculation for eeprom emulation in flash */
77#define CRC_POLYNOMIAL_LENGTH LL_CRC_POLYLENGTH_16B /* CRC polynomial lenght 16 bits */
78#define CRC_POLYNOMIAL_VALUE 0x8005U /* Polynomial to use for CRC calculation */
79
80/**
81 * @}
82 */
83
84/**
85 * @}
86 */
87
88/* Exported types ------------------------------------------------------------*/
89/* Exported constants --------------------------------------------------------*/
90/** @defgroup EEPROM_Exported_Constants EEPROM Exported Constants
91 * @{
92 */
93
94/** @defgroup Exported_Configuration_Constants Exported Configuration Constants
95 * @{
96 */
97#define NB_OF_VARIABLES 1000U /*!< Number of variables to handle in eeprom */
98
99/**
100 * @}
101 */
102
103/**
104 * @}
105 */
106
107#ifdef __cplusplus
108}
109#endif
110
111/**
112 * @}
113 */
114
115#endif /* __EEPROM_EMUL_CONF_H */
116
117
118/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Note: See TracBrowser for help on using the repository browser.