Fls_Cfg.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral : FTFC_FLS_IP IPV_QSPI
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. #ifndef FLS_CFG_H
  25. #define FLS_CFG_H
  26. /**
  27. * @file Fls_Cfg.h
  28. *
  29. * @addtogroup FLS
  30. * @{
  31. */
  32. /* implements Fls_Cfg.h_Artifact */
  33. #ifdef __cplusplus
  34. extern "C"{
  35. #endif
  36. /*==================================================================================================
  37. * INCLUDE FILES
  38. * 1) system and project includes
  39. * 2) needed interfaces from external units
  40. * 3) internal and external interfaces from this unit
  41. ==================================================================================================*/
  42. #include "Fls_Types.h"
  43. #include "Mcal.h"
  44. #include "MemIf_Types.h"
  45. #include "Ftfc_Fls_Ip_Cfg.h"
  46. #include "Qspi_Ip_Cfg.h"
  47. #include "Fls_VS_0_PBcfg.h"
  48. /*==================================================================================================
  49. * SOURCE FILE VERSION INFORMATION
  50. ==================================================================================================*/
  51. #define FLS_VENDOR_ID_CFG 43
  52. #define FLS_AR_RELEASE_MAJOR_VERSION_CFG 4
  53. #define FLS_AR_RELEASE_MINOR_VERSION_CFG 4
  54. #define FLS_AR_RELEASE_REVISION_VERSION_CFG 0
  55. #define FLS_SW_MAJOR_VERSION_CFG 1
  56. #define FLS_SW_MINOR_VERSION_CFG 0
  57. #define FLS_SW_PATCH_VERSION_CFG 0
  58. /*==================================================================================================
  59. * FILE VERSION CHECKS
  60. ==================================================================================================*/
  61. /* Check if current file and Fls configuration header file are of the same vendor */
  62. #if (FLS_TYPES_VENDOR_ID != FLS_VENDOR_ID_CFG)
  63. #error "Fls_Types.h and Fls_Cfg.h have different vendor ids"
  64. #endif
  65. /* Check if current file and Fls configuration header file are of the same Autosar version */
  66. #if ((FLS_TYPES_AR_RELEASE_MAJOR_VERSION != FLS_AR_RELEASE_MAJOR_VERSION_CFG) || \
  67. (FLS_TYPES_AR_RELEASE_MINOR_VERSION != FLS_AR_RELEASE_MINOR_VERSION_CFG) || \
  68. (FLS_TYPES_AR_RELEASE_REVISION_VERSION != FLS_AR_RELEASE_REVISION_VERSION_CFG) \
  69. )
  70. #error "AutoSar Version Numbers of Fls_Types.h and Fls_Cfg.h are different"
  71. #endif
  72. /* Check if current file and Fls configuration header file are of the same software version */
  73. #if ((FLS_TYPES_SW_MAJOR_VERSION != FLS_SW_MAJOR_VERSION_CFG) || \
  74. (FLS_TYPES_SW_MINOR_VERSION != FLS_SW_MINOR_VERSION_CFG) || \
  75. (FLS_TYPES_SW_PATCH_VERSION != FLS_SW_PATCH_VERSION_CFG) \
  76. )
  77. #error "Software Version Numbers of Fls_Types.h and Fls_Cfg.h are different"
  78. #endif
  79. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  80. /* Check if current file and Std_Types header file are of the same version */
  81. #if ((FLS_AR_RELEASE_MAJOR_VERSION_CFG != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  82. (FLS_AR_RELEASE_MINOR_VERSION_CFG != MCAL_AR_RELEASE_MINOR_VERSION) \
  83. )
  84. #error "AutoSar Version Numbers of Fls_Types.h and Mcal.h are different"
  85. #endif
  86. #endif
  87. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  88. /* Check if current file and MemIf_Types.h file are of the same Autosar version */
  89. #if ((FLS_AR_RELEASE_MAJOR_VERSION_CFG != MEMIF_AR_RELEASE_MAJOR_VERSION) || \
  90. (FLS_AR_RELEASE_MINOR_VERSION_CFG != MEMIF_AR_RELEASE_MINOR_VERSION) \
  91. )
  92. #error "AutoSar Version Numbers of Fls_Cfg.h and MemIf_Types.h are different"
  93. #endif
  94. #endif
  95. /* Check if current file and Ftfc_Fls_Ip_Cfg header file are of the same vendor */
  96. #if (FLS_VENDOR_ID_CFG != FTFC_FLS_IP_VENDOR_ID_CFG)
  97. #error "Fls_Cfg.h and Ftfc_Fls_Ip_Cfg.h have different vendor ids"
  98. #endif
  99. /* Check if current file and Ftfc_Fls_Ip_Cfg header file are of the same Autosar version */
  100. #if ((FLS_AR_RELEASE_MAJOR_VERSION_CFG != FTFC_FLS_IP_AR_RELEASE_MAJOR_VERSION_CFG) || \
  101. (FLS_AR_RELEASE_MINOR_VERSION_CFG != FTFC_FLS_IP_AR_RELEASE_MINOR_VERSION_CFG) || \
  102. (FLS_AR_RELEASE_REVISION_VERSION_CFG != FTFC_FLS_IP_AR_RELEASE_REVISION_VERSION_CFG) \
  103. )
  104. #error "AutoSar Version Numbers of Fls_Cfg.h and Ftfc_Fls_Ip_Cfg.h are different"
  105. #endif
  106. /* Check if current file and Ftfc_Fls_Ip_Cfg header file are of the same Software version */
  107. #if ((FLS_SW_MAJOR_VERSION_CFG != FTFC_FLS_IP_SW_MAJOR_VERSION_CFG) || \
  108. (FLS_SW_MINOR_VERSION_CFG != FTFC_FLS_IP_SW_MINOR_VERSION_CFG) || \
  109. (FLS_SW_PATCH_VERSION_CFG != FTFC_FLS_IP_SW_PATCH_VERSION_CFG) \
  110. )
  111. #error "Software Version Numbers of Fls_Cfg.h and Ftfc_Fls_Ip_Cfg.h are different"
  112. #endif
  113. /* Check if current file and Qspi_Ip_Cfg header file are of the same vendor */
  114. #if (FLS_VENDOR_ID_CFG != QSPI_IP_VENDOR_ID_CFG)
  115. #error "Fls_Cfg.h and Qspi_Ip_Cfg.h have different vendor ids"
  116. #endif
  117. /* Check if current file and Qspi_Ip_Cfg header file are of the same Autosar version */
  118. #if ((FLS_AR_RELEASE_MAJOR_VERSION_CFG != QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG) || \
  119. (FLS_AR_RELEASE_MINOR_VERSION_CFG != QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG) || \
  120. (FLS_AR_RELEASE_REVISION_VERSION_CFG != QSPI_IP_AR_RELEASE_REVISION_VERSION_CFG) \
  121. )
  122. #error "AutoSar Version Numbers of Fls_Cfg.h and Qspi_Ip_Cfg.h are different"
  123. #endif
  124. /* Check if current file and Qspi_Ip_Cfg header file are of the same software version */
  125. #if ((FLS_SW_MAJOR_VERSION_CFG != QSPI_IP_SW_MAJOR_VERSION_CFG) || \
  126. (FLS_SW_MINOR_VERSION_CFG != QSPI_IP_SW_MINOR_VERSION_CFG) || \
  127. (FLS_SW_PATCH_VERSION_CFG != QSPI_IP_SW_PATCH_VERSION_CFG) \
  128. )
  129. #error "Software Version Numbers of Fls_Cfg.h and Qspi_Ip_Cfg.h are different"
  130. #endif
  131. /* Check if current file and Fls_VS_0_PBcfg header file are of the same vendor */
  132. #if (FLS_VENDOR_ID_CFG != FLS_VS_0_PBCFG_VENDOR_ID)
  133. #error "Fls_Cfg.h and Fls_VS_0_PBcfg.h have different vendor ids"
  134. #endif
  135. /* Check if current file and Fls_VS_0_PBcfg header file are of the same Autosar version */
  136. #if ((FLS_AR_RELEASE_MAJOR_VERSION_CFG != FLS_VS_0_PBCFG_AR_RELEASE_MAJOR_VERSION) || \
  137. (FLS_AR_RELEASE_MINOR_VERSION_CFG != FLS_VS_0_PBCFG_AR_RELEASE_MINOR_VERSION) || \
  138. (FLS_AR_RELEASE_REVISION_VERSION_CFG != FLS_VS_0_PBCFG_AR_RELEASE_REVISION_VERSION) \
  139. )
  140. #error "AutoSar Version Numbers of Fls_Cfg.h and Fls_VS_0_PBcfg.h are different"
  141. #endif
  142. /* Check if current file and Fls_VS_0_PBcfg header file are of the same software version */
  143. #if ((FLS_SW_MAJOR_VERSION_CFG != FLS_VS_0_PBCFG_SW_MAJOR_VERSION) || \
  144. (FLS_SW_MINOR_VERSION_CFG != FLS_VS_0_PBCFG_SW_MINOR_VERSION) || \
  145. (FLS_SW_PATCH_VERSION_CFG != FLS_VS_0_PBCFG_SW_PATCH_VERSION) \
  146. )
  147. #error "Software Version Numbers of Fls_Cfg.h and Fls_VS_0_PBcfg.h are different"
  148. #endif
  149. /*==================================================================================================
  150. DEFINES AND MACROS
  151. ==================================================================================================*/
  152. #define FLS_CONFIG_EXT \
  153. FLS_CONFIG_VS_0_PB \
  154. /* STD_ON: Flash access code loaded on job start / unloaded on job end or error */
  155. #define FLS_AC_LOAD_ON_JOB_START (STD_ON)
  156. #if (FLS_AC_LOAD_ON_JOB_START == STD_ON)
  157. /* Cleaning cache after loading access code to RAM */
  158. #define FLS_CLEAN_CACHE_AFTER_LOAD_AC (STD_OFF)
  159. #endif
  160. /* Compile switch to enable and disable the Fls_Cancel function */
  161. #define FLS_CANCEL_API (STD_ON)
  162. /* Compile switch to enable and disable the Fls_Compare function */
  163. #define FLS_COMPARE_API (STD_ON)
  164. /* Compile switch to enable and disable the Fls_BlankCheck function */
  165. #define FLS_BLANK_CHECK_API (STD_OFF)
  166. /* Pre-processor switch to enable and disable development error detection */
  167. #define FLS_DEV_ERROR_DETECT (STD_ON)
  168. /* Compile switch to enable and disable the Fls_GetJobResult function */
  169. #define FLS_GET_JOB_RESULT_API (STD_ON)
  170. /* Compile switch to enable and disable the Fls_GetStatus function */
  171. #define FLS_GET_STATUS_API (STD_ON)
  172. /* Compile switch to enable and disable the Fls_SetMode function */
  173. #define FLS_SET_MODE_API (STD_ON)
  174. /* Pre-processor switch to enable / disable the API to read out the modules version information */
  175. #define FLS_VERSION_INFO_API (STD_ON)
  176. /* Pre-processor switch to enable / disable the API to report data storage (ECC) errors to the flash driver */
  177. #define FLS_ECC_CHECK (STD_OFF)
  178. #define FLS_ECC_CHECK_BY_AUTOSAR_OS (STD_OFF)
  179. /* Pre-processor switch to enable / disable the erase blank check */
  180. #define FLS_ERASE_VERIFICATION_ENABLED (STD_OFF)
  181. /* Pre-processor switch to enable / disable the write verify check */
  182. #define FLS_WRITE_VERIFICATION_ENABLED (STD_OFF)
  183. #if (FLS_ERASE_VERIFICATION_ENABLED == STD_ON)
  184. /* The maximum number of bytes to blank check in one cycle of the flash driver job processing function */
  185. #define FLS_MAX_ERASE_BLANK_CHECK (256U)
  186. #endif
  187. /* Timeout handling enabled */
  188. #define FLS_TIMEOUT_SUPERVISION_ENABLED (STD_OFF)
  189. /* Internal sectors are present or not in the current configuration. */
  190. #define FLS_INTERNAL_SECTORS_CONFIGURED (STD_ON)
  191. /* Base address of code flash */
  192. #define FLS_PROGRAM_FLASH_BASE_ADDR (0x00000000UL)
  193. /* Base address of data flash */
  194. #define FLS_DATA_FLASH_BASE_ADDR (0x10000000UL)
  195. /* Internal flash write register size */
  196. #define FLS_INTERNAL_WRITE_SIZE (8UL)
  197. /* External QSPI sectors are present or not in the current configuration. */
  198. #define FLS_QSPI_SECTORS_CONFIGURED (STD_OFF)
  199. /*==================================================================================================
  200. STRUCTURES AND OTHER TYPEDEFS
  201. ==================================================================================================*/
  202. /*==================================================================================================
  203. GLOBAL CONSTANT DECLARATIONS
  204. ==================================================================================================*/
  205. #define FLS_PRECOMPILE_SUPPORT
  206. #define FLS_START_SEC_CONFIG_DATA_UNSPECIFIED
  207. #include "Fls_MemMap.h"
  208. /* Declaration of pre-compile configuration set structure */
  209. #define Fls_Config Fls_Config_VS_0
  210. extern const Fls_ConfigType Fls_Config;
  211. #define FLS_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  212. #include "Fls_MemMap.h"
  213. /*==================================================================================================
  214. FUNCTION PROTOTYPES
  215. ==================================================================================================*/
  216. #ifdef __cplusplus
  217. }
  218. #endif
  219. /** @} */
  220. #endif /* FLS_CFG_H */