Qspi_Ip_Common.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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_COMMON_H
  25. #define QSPI_IP_COMMON_H
  26. /**
  27. * @file Qspi_Ip_Common.h
  28. *
  29. * @addtogroup IPV_QSPI QSPI IPV Driver
  30. * @{
  31. */
  32. /* implements Qspi_Ip_Common.h_Artifact */
  33. #ifdef __cplusplus
  34. extern "C"{
  35. #endif
  36. #include "Qspi_Ip_Features.h"
  37. #include "Qspi_Ip.h"
  38. /*==================================================================================================
  39. * SOURCE FILE VERSION INFORMATION
  40. ==================================================================================================*/
  41. #define QSPI_IP_COMMON_VENDOR_ID_H 43
  42. #define QSPI_IP_COMMON_AR_RELEASE_MAJOR_VERSION_H 4
  43. #define QSPI_IP_COMMON_AR_RELEASE_MINOR_VERSION_H 4
  44. #define QSPI_IP_COMMON_AR_RELEASE_REVISION_VERSION_H 0
  45. #define QSPI_IP_COMMON_SW_MAJOR_VERSION_H 1
  46. #define QSPI_IP_COMMON_SW_MINOR_VERSION_H 0
  47. #define QSPI_IP_COMMON_SW_PATCH_VERSION_H 0
  48. /*==================================================================================================
  49. * FILE VERSION CHECKS
  50. ==================================================================================================*/
  51. /* Check if current file and Qspi_Ip_Features header file are of the same vendor */
  52. #if (QSPI_IP_COMMON_VENDOR_ID_H != QSPI_IP_FEATURES_VENDOR_ID_CFG)
  53. #error "Qspi_Ip_Common.h and Qspi_Ip_Features.h have different vendor ids"
  54. #endif
  55. /* Check if current file and Qspi_Ip_Features header file are of the same Autosar version */
  56. #if ((QSPI_IP_COMMON_AR_RELEASE_MAJOR_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_MAJOR_VERSION_CFG) || \
  57. (QSPI_IP_COMMON_AR_RELEASE_MINOR_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_MINOR_VERSION_CFG) || \
  58. (QSPI_IP_COMMON_AR_RELEASE_REVISION_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_REVISION_VERSION_CFG) \
  59. )
  60. #error "AutoSar Version Numbers of Qspi_Ip_Common.h and Qspi_Ip_Features.h are different"
  61. #endif
  62. /* Check if current file and Qspi_Ip_Features header file are of the same Software version */
  63. #if ((QSPI_IP_COMMON_SW_MAJOR_VERSION_H != QSPI_IP_FEATURES_SW_MAJOR_VERSION_CFG) || \
  64. (QSPI_IP_COMMON_SW_MINOR_VERSION_H != QSPI_IP_FEATURES_SW_MINOR_VERSION_CFG) || \
  65. (QSPI_IP_COMMON_SW_PATCH_VERSION_H != QSPI_IP_FEATURES_SW_PATCH_VERSION_CFG) \
  66. )
  67. #error "Software Version Numbers of Qspi_Ip_Common.h and Qspi_Ip_Features.h are different"
  68. #endif
  69. /* Check if current file and Qspi_Ip header file are of the same vendor */
  70. #if (QSPI_IP_COMMON_VENDOR_ID_H != QSPI_IP_VENDOR_ID_H)
  71. #error "Qspi_Ip_Common.h and Qspi_Ip.h have different vendor ids"
  72. #endif
  73. /* Check if current file and Qspi_Ip header file are of the same Autosar version */
  74. #if ((QSPI_IP_COMMON_AR_RELEASE_MAJOR_VERSION_H != QSPI_IP_AR_RELEASE_MAJOR_VERSION_H) || \
  75. (QSPI_IP_COMMON_AR_RELEASE_MINOR_VERSION_H != QSPI_IP_AR_RELEASE_MINOR_VERSION_H) || \
  76. (QSPI_IP_COMMON_AR_RELEASE_REVISION_VERSION_H != QSPI_IP_AR_RELEASE_REVISION_VERSION_H) \
  77. )
  78. #error "AutoSar Version Numbers of Qspi_Ip_Common.h and Qspi_Ip.h are different"
  79. #endif
  80. /* Check if current file and Qspi_Ip header file are of the same Software version */
  81. #if ((QSPI_IP_COMMON_SW_MAJOR_VERSION_H != QSPI_IP_SW_MAJOR_VERSION_H) || \
  82. (QSPI_IP_COMMON_SW_MINOR_VERSION_H != QSPI_IP_SW_MINOR_VERSION_H) || \
  83. (QSPI_IP_COMMON_SW_PATCH_VERSION_H != QSPI_IP_SW_PATCH_VERSION_H) \
  84. )
  85. #error "Software Version Numbers of Qspi_Ip_Common.h and Qspi_Ip.h are different"
  86. #endif
  87. #if (QSPI_IP_MEM_INSTANCE_COUNT > 0)
  88. /*******************************************************************************
  89. * Enumerations.
  90. ******************************************************************************/
  91. /*******************************************************************************
  92. * External variable declarations.
  93. ******************************************************************************/
  94. /* Phisical LUT seq to use for all flash commands */
  95. #define QSPI_IP_COMMAND_LUT 0U
  96. /* Phisical LUT seq to use for AHB reads */
  97. #define QSPI_IP_AHB_LUT 1U
  98. #define FLS_START_SEC_CONST_UNSPECIFIED
  99. #include "Fls_MemMap.h"
  100. /* Table of AHB addresses for QuadSPI instances. */
  101. extern const uint32 Qspi_Ip_AhbAddress[QuadSPI_INSTANCE_COUNT];
  102. #define FLS_STOP_SEC_CONST_UNSPECIFIED
  103. #include "Fls_MemMap.h"
  104. /*******************************************************************************
  105. * Definitions
  106. ******************************************************************************/
  107. /*!
  108. * @brief Driver configuration structure
  109. *
  110. * This structure is used to provide configuration parameters for the external flash driver
  111. * at initialization time.
  112. */
  113. typedef struct
  114. {
  115. const Qspi_Ip_MemoryConfigType *configuration; /*!< Serial flash device configuration */
  116. const Qspi_Ip_MemoryConnectionType *connection; /*!< Connection to a QSPI device */
  117. uint32 baseAddress; /*!< Base address of serial flash device */
  118. uint32 lastCommand; /*!< Last command sent to the flash device */
  119. uint16 activeReadLut; /*!< LUT number for currently active read mode */
  120. } Qspi_Ip_StateType;
  121. /*******************************************************************************
  122. * API
  123. ******************************************************************************/
  124. #endif /* QSPI_IP_MEM_INSTANCE_COUNT */
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128. /** @} */
  129. #endif /* QSPI_IP_COMMON_H */