Qspi_Ip_Cfg.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 QSPI_IP_CFG_H
  25. #define QSPI_IP_CFG_H
  26. /**
  27. * @file Qspi_Ip_Cfg.h
  28. *
  29. * @addtogroup FLS
  30. * @{
  31. */
  32. /* implements Qspi_Ip_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 "Mcal.h"
  43. #include "StandardTypes.h"
  44. #include "OsIf.h"
  45. #include "Qspi_Ip_Types.h"
  46. #include "Qspi_Ip_VS_0_PBcfg.h"
  47. /*==================================================================================================
  48. * SOURCE FILE VERSION INFORMATION
  49. ==================================================================================================*/
  50. #define QSPI_IP_VENDOR_ID_CFG 43
  51. #define QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG 4
  52. #define QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG 4
  53. #define QSPI_IP_AR_RELEASE_REVISION_VERSION_CFG 0
  54. #define QSPI_IP_SW_MAJOR_VERSION_CFG 1
  55. #define QSPI_IP_SW_MINOR_VERSION_CFG 0
  56. #define QSPI_IP_SW_PATCH_VERSION_CFG 0
  57. /*==================================================================================================
  58. * FILE VERSION CHECKS
  59. ==================================================================================================*/
  60. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  61. /* Check if Qspi_Ip_Cfg header file and Mcal.h header file are of the same Autosar version */
  62. #if ((QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != MCAL_AR_RELEASE_MAJOR_VERSION) || \
  63. (QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != MCAL_AR_RELEASE_MINOR_VERSION) \
  64. )
  65. #error "Autosar Version Numbers of Qspi_Ip_Cfg.h and Mcal.h are different"
  66. #endif
  67. /* Check if Qspi_Ip_Cfg header file and StandardTypes.h header file are of the same Autosar version */
  68. #if ((QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != STD_AR_RELEASE_MAJOR_VERSION) || \
  69. (QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != STD_AR_RELEASE_MINOR_VERSION) \
  70. )
  71. #error "Autosar Version Numbers of Qspi_Ip_Cfg.h and StandardTypes.h are different"
  72. #endif
  73. /* Check if Qspi_Ip_Cfg header file and OsIf.h header file are of the same Autosar version */
  74. #if ((QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != OSIF_AR_RELEASE_MAJOR_VERSION) || \
  75. (QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != OSIF_AR_RELEASE_MINOR_VERSION) \
  76. )
  77. #error "Autosar Version Numbers of Qspi_Ip_Cfg.h and OsIf.h are different"
  78. #endif
  79. #endif
  80. /* Check if current file and Qspi_Ip_Types header file are of the same vendor */
  81. #if (QSPI_IP_VENDOR_ID_CFG != FLS_QSPI_TYPES_VENDOR_ID)
  82. #error "Qspi_Ip_Cfg.h and Qspi_Ip_Types.h have different vendor ids"
  83. #endif
  84. /* Check if current file and Qspi_Ip_Types header file are of the same Autosar version */
  85. #if ((QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != FLS_QSPI_TYPES_AR_RELEASE_MAJOR_VERSION) || \
  86. (QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != FLS_QSPI_TYPES_AR_RELEASE_MINOR_VERSION) || \
  87. (QSPI_IP_AR_RELEASE_REVISION_VERSION_CFG != FLS_QSPI_TYPES_AR_RELEASE_REVISION_VERSION) \
  88. )
  89. #error "AutoSar Version Numbers of Qspi_Ip_Cfg.h and Qspi_Ip_Types.h are different"
  90. #endif
  91. /* Check if current file and Qspi_Ip_Types header file are of the same Software version */
  92. #if ((QSPI_IP_SW_MAJOR_VERSION_CFG != FLS_QSPI_TYPES_SW_MAJOR_VERSION) || \
  93. (QSPI_IP_SW_MINOR_VERSION_CFG != FLS_QSPI_TYPES_SW_MINOR_VERSION) || \
  94. (QSPI_IP_SW_PATCH_VERSION_CFG != FLS_QSPI_TYPES_SW_PATCH_VERSION) \
  95. )
  96. #error "Software Version Numbers of Qspi_Ip_Cfg.h and Qspi_Ip_Types.h are different"
  97. #endif
  98. /* Check if current file and Qspi_Ip_VS_0_PBcfg header file are of the same vendor */
  99. #if (QSPI_IP_VENDOR_ID_CFG != QSPI_IP_VS_0_PBCFG_VENDOR_ID)
  100. #error "Qspi_Ip_Cfg.h and Qspi_Ip_VS_0_PBcfg.h have different vendor ids"
  101. #endif
  102. /* Check if current file and Qspi_Ip_VS_0_PBcfg header file are of the same Autosar version */
  103. #if ((QSPI_IP_AR_RELEASE_MAJOR_VERSION_CFG != QSPI_IP_VS_0_PBCFG_AR_RELEASE_MAJOR_VERSION) || \
  104. (QSPI_IP_AR_RELEASE_MINOR_VERSION_CFG != QSPI_IP_VS_0_PBCFG_AR_RELEASE_MINOR_VERSION) || \
  105. (QSPI_IP_AR_RELEASE_REVISION_VERSION_CFG != QSPI_IP_VS_0_PBCFG_AR_RELEASE_REVISION_VERSION) \
  106. )
  107. #error "AutoSar Version Numbers of Qspi_Ip_Cfg.h and Qspi_Ip_VS_0_PBcfg.h are different"
  108. #endif
  109. /* Check if current file and Qspi_Ip_VS_0_PBcfg header file are of the same software version */
  110. #if ((QSPI_IP_SW_MAJOR_VERSION_CFG != QSPI_IP_VS_0_PBCFG_SW_MAJOR_VERSION) || \
  111. (QSPI_IP_SW_MINOR_VERSION_CFG != QSPI_IP_VS_0_PBCFG_SW_MINOR_VERSION) || \
  112. (QSPI_IP_SW_PATCH_VERSION_CFG != QSPI_IP_VS_0_PBCFG_SW_PATCH_VERSION) \
  113. )
  114. #error "Software Version Numbers of Qspi_Ip_Cfg.h and Qspi_Ip_VS_0_PBcfg.h are different"
  115. #endif
  116. /*==================================================================================================
  117. DEFINES AND MACROS
  118. ==================================================================================================*/
  119. /* Maximum number of retries for Write Enable command */
  120. #define QSPI_IP_MAX_RETRY (3U)
  121. /* Pre-processor switch to enable/disable development error detection for QSPI Ip API */
  122. #define DEV_ASSERT_QSPI(x)
  123. /* Number of serial flash devices */
  124. #define QSPI_IP_MEM_INSTANCE_COUNT (0U)
  125. /* Timeout for QSPI command completion */
  126. #define QSPI_IP_CMD_COMPLETE_TIMEOUT (1U)
  127. /* Timeout for external flash software reset completion */
  128. #define QSPI_IP_RESET_TIMEOUT (1U)
  129. /* Timeout for external flash startup initialization sequence completion */
  130. #define QSPI_IP_FLS_INIT_TIMEOUT (1U)
  131. /* Timeout for a complete read operation */
  132. #define QSPI_IP_READ_TIMEOUT (2147483647U)
  133. /* OsIf counter type used in timeout detection for QSPI IP operations */
  134. #define QSPI_IP_TIMEOUT_TYPE (OSIF_COUNTER_DUMMY)
  135. /* Delay after changing the value of the QSPI software reset bits */
  136. #define QSPI_IP_SOFTWARE_RESET_DELAY (0U)
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140. /** @} */
  141. #endif /* QSPI_IP_CFG_H */