Fls_IPW.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. /*==================================================================================================
  25. ==================================================================================================*/
  26. #ifndef FLS_IPW_H
  27. #define FLS_IPW_H
  28. /**
  29. * @file Fls_IPW.h
  30. *
  31. * @addtogroup FLS
  32. * @{
  33. */
  34. /* implements Fls_IPW.h_Artifact */
  35. #ifdef __cplusplus
  36. extern "C"{
  37. #endif
  38. /*==================================================================================================
  39. INCLUDE FILES
  40. 1) system and project includes
  41. 2) needed interfaces from external units
  42. 3) internal and external interfaces from this unit
  43. ==================================================================================================*/
  44. #include "Fls.h"
  45. #include "Qspi_Ip_Features.h"
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define FLS_IPW_VENDOR_ID_H 43
  50. #define FLS_IPW_AR_RELEASE_MAJOR_VERSION_H 4
  51. #define FLS_IPW_AR_RELEASE_MINOR_VERSION_H 4
  52. #define FLS_IPW_AR_RELEASE_REVISION_VERSION_H 0
  53. #define FLS_IPW_SW_MAJOR_VERSION_H 1
  54. #define FLS_IPW_SW_MINOR_VERSION_H 0
  55. #define FLS_IPW_SW_PATCH_VERSION_H 0
  56. /*==================================================================================================
  57. * FILE VERSION CHECKS
  58. ==================================================================================================*/
  59. /* Check if current file and Fls header file are of the same vendor */
  60. #if (FLS_IPW_VENDOR_ID_H != FLS_VENDOR_ID)
  61. #error "Fls_IPW.c and Fls.h have different vendor ids"
  62. #endif
  63. /* Check if current file and Fls header file are of the same Autosar version */
  64. #if ((FLS_IPW_AR_RELEASE_MAJOR_VERSION_H != FLS_AR_RELEASE_MAJOR_VERSION) || \
  65. (FLS_IPW_AR_RELEASE_MINOR_VERSION_H != FLS_AR_RELEASE_MINOR_VERSION) || \
  66. (FLS_IPW_AR_RELEASE_REVISION_VERSION_H != FLS_AR_RELEASE_REVISION_VERSION) \
  67. )
  68. #error "AutoSar Version Numbers of Fls_IPW.c and Fls.h are different"
  69. #endif
  70. /* Check if current file and Fls header file are of the same Software version */
  71. #if ((FLS_IPW_SW_MAJOR_VERSION_H != FLS_SW_MAJOR_VERSION) || \
  72. (FLS_IPW_SW_MINOR_VERSION_H != FLS_SW_MINOR_VERSION) || \
  73. (FLS_IPW_SW_PATCH_VERSION_H != FLS_SW_PATCH_VERSION) \
  74. )
  75. #error "Software Version Numbers of Fls_IPW.c and Fls.h are different"
  76. #endif
  77. /* Check if current file and Qspi_Ip_Features header file are of the same vendor */
  78. #if (FLS_IPW_VENDOR_ID_H != QSPI_IP_FEATURES_VENDOR_ID_CFG)
  79. #error "Fls_IPW.c and Qspi_Ip_Features.h have different vendor ids"
  80. #endif
  81. /* Check if current file and Qspi_Ip_Features header file are of the same Autosar version */
  82. #if ((FLS_IPW_AR_RELEASE_MAJOR_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_MAJOR_VERSION_CFG) || \
  83. (FLS_IPW_AR_RELEASE_MINOR_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_MINOR_VERSION_CFG) || \
  84. (FLS_IPW_AR_RELEASE_REVISION_VERSION_H != QSPI_IP_FEATURES_AR_RELEASE_REVISION_VERSION_CFG) \
  85. )
  86. #error "AutoSar Version Numbers of Fls_IPW.c and Qspi_Ip_Features.h are different"
  87. #endif
  88. /* Check if current file and Qspi_Ip_Features header file are of the same Software version */
  89. #if ((FLS_IPW_SW_MAJOR_VERSION_H != QSPI_IP_FEATURES_SW_MAJOR_VERSION_CFG) || \
  90. (FLS_IPW_SW_MINOR_VERSION_H != QSPI_IP_FEATURES_SW_MINOR_VERSION_CFG) || \
  91. (FLS_IPW_SW_PATCH_VERSION_H != QSPI_IP_FEATURES_SW_PATCH_VERSION_CFG) \
  92. )
  93. #error "Software Version Numbers of Fls_IPW.c and Qspi_Ip_Features.h are different"
  94. #endif
  95. /*******************************************************************************
  96. * Definitions
  97. ******************************************************************************/
  98. /*! Invalid configuration, specifies unused device */
  99. #define FLS_IPW_CFG_INVALID (uint8)0xFFU
  100. /*==================================================================================================
  101. * VARIABLE DECLARATIONS
  102. ==================================================================================================*/
  103. /*==================================================================================================
  104. * DEFINES AND MACROS
  105. ==================================================================================================*/
  106. /*==================================================================================================
  107. * FUNCTION PROTOTYPES
  108. ==================================================================================================*/
  109. #define FLS_START_SEC_CODE
  110. #include "Fls_MemMap.h"
  111. void Fls_IPW_Init(void);
  112. void Fls_IPW_AbortSuspended(void);
  113. void Fls_IPW_ClearHVJob(void);
  114. void Fls_IPW_Cancel(void);
  115. void Fls_IPW_LLDMainFunction(void);
  116. Fls_LLDReturnType Fls_IPW_SectorRead(const Fls_AddressType u32SectorOffset,
  117. const Fls_AddressType u32Length,
  118. uint8 * pJobDataDestPtr,
  119. const uint8 * pJobDataSrcPtr
  120. );
  121. Fls_LLDReturnType Fls_IPW_SectorErase(const Fls_AddressType u32SectorOffset,
  122. const Fls_LengthType u32PhysicalSectorSize,
  123. const boolean bAsynch
  124. );
  125. Fls_LLDReturnType Fls_IPW_SectorWrite(const Fls_AddressType u32SectorOffset,
  126. const Fls_AddressType u32Length,
  127. const uint8 * pJobDataSrcPtr,
  128. const boolean bAsynch
  129. );
  130. #if ( STD_ON == FLS_INTERNAL_SECTORS_CONFIGURED )
  131. #if ( (STD_ON == FLS_ECC_CHECK) || (STD_ON == FLS_ECC_CHECK_BY_AUTOSAR_OS) )
  132. Fls_CompHandlerReturnType Fls_IPW_DsiHandler(const Fls_ExceptionDetailsType *pExceptionDetailsPtr);
  133. #endif /* (STD_ON == FLS_ECC_CHECK) || (STD_ON == FLS_ECC_CHECK_BY_AUTOSAR_OS) */
  134. #if (STD_ON == FLS_ECC_CHECK_BY_AUTOSAR_OS)
  135. void Fls_IPW_ReadEachBlock(void);
  136. #endif /* STD_ON == FLS_ECC_CHECK_BY_AUTOSAR_OS */
  137. #endif /* STD_ON == FLS_INTERNAL_SECTORS_CONFIGURED */
  138. #if ( STD_ON == FLS_AC_LOAD_ON_JOB_START )
  139. Fls_BlockNumberOfSectorType Fls_IPW_GetBlockNumberFromAddress(Fls_AddressType targetAddress);
  140. #endif /* STD_ON == FLS_AC_LOAD_ON_JOB_START */
  141. #define FLS_STOP_SEC_CODE
  142. #include "Fls_MemMap.h"
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. /** @} */
  147. #endif /* FLS_IPW_H */