/*********************************************************************************************************************** * FILE DESCRIPTION * ------------------------------------------------------------------------------------------------------------------*/ /** \file * \brief Implementation of pattern/mask based non-volatile information storage * * -------------------------------------------------------------------------------------------------------------------- * COPYRIGHT * -------------------------------------------------------------------------------------------------------------------- * \par Copyright * \verbatim * Copyright (c) 2026 by Vector Informatik GmbH. All rights reserved. * * This software is copyright protected and proprietary to Vector Informatik GmbH. * Vector Informatik GmbH grants to you only those rights as set out in the license conditions. * All other rights remain with Vector Informatik GmbH. * \endverbatim */ /**********************************************************************************************************************/ /*********************************************************************************************************************** * TEMPLATE REVISION HISTORY * -------------------------------------------------------------------------------------------------------------------- * Version Date Author Change Id Description * -------------------------------------------------------------------------------------------------------------------- * 01.04.00 2019-01-25 viskjs ESCAN00101824 Added patterns that can be validated multiple times * ESCAN00101823 Added feature to store arbitrary values at end of logical block * 01.04.01 2019-03-26 viskjs ESCAN00102200 No changes * ESCAN00102204 No changes * ESCAN00102646 No changes * 01.04.02 2019-07-22 vistbe ESCAN00103605 No changes * 01.04.03 2020-05-07 visjdn ESCAN00106002 No changes * 01.04.04 2021-03-03 visrie ESCAN00108616 No changes * ESCAN00108753 No changes * FBL-3129 Added/adapted MemMap sections * Update to MISRA 2012 * 01.04.05 2021-03-16 visrie ESCAN00108859 No changes * 01.05.00 2021-06-16 visrie FBL-3641 Support OTA use case and user extension * -------------------------------------------------------------------------------------------------------------------- * REVISION HISTORY * -------------------------------------------------------------------------------------------------------------------- * Version Date Author Change Id Description * -------------------------------------------------------------------------------------------------------------------- * 05.00.00 2022-08-15 vistmo FBL-5514 Support Additional OTA functionality * ESCAN00112435 No changes * ESCAN00112575 No changes * 05.01.00 2022-10-04 jschmitding FBL-5917 No changes * ESCAN00113919 No changes * 05.01.01 2022-10-17 fmenke ESCAN00112879 No changes * 05.01.02 2023-01-13 fmenke ESCAN00112890 No changes * ESCAN00113612 No changes * 05.02.00 2023-02-09 vistmo ESCAN00112972 No changes * ESCAN00113292 No changes * ESCAN00113835 No changes * ESCAN00113843 No changes * ESCAN00113764 No changes * FBL-6438 No changes * 05.02.01 2023-05-11 fmenke ESCAN00113831 No changes * 05.03.00 2023-07-24 fmenke FBL-7335 No changes * 05.03.01 2023-08-31 lhopfhauer ESCAN00115494 No changes * 05.03.02 2024-07-16 erizk ESCAN00117344 No changes * 05.03.03 2025-02-06 virchl ESCAN00118587 No changes * 05.04.00 2025-02-28 jjohnson FBL-10065 No changes * 05.04.01 2025-06-10 jostravsky ESCAN00120315 No changes * 05.04.02 2025-07-08 visarcmijo ESCAN00119833 No changes * 05.05.00 2025-09-01 fmenke FBL-11218 No changes * ESCAN00120917 No changes * 05.06.00 2025-10-28 mpatil FBL-11690 No changes * 05.07.00 2026-01-13 dganesh FBL-12162 No changes **********************************************************************************************************************/ #define FBL_NVPATTERN_OEM_SOURCE /*********************************************************************************************************************** * INCLUDES **********************************************************************************************************************/ #include "fbl_inc.h" #include "fbl_nvpattern_oem.h" /*********************************************************************************************************************** * GLOBAL DATA **********************************************************************************************************************/ #define FBLNVPATTERN_START_SEC_CONST #include "MemMap.h" /* PRQA S 5087 */ /* MD_MSR_MemMap */ #if defined ( FBL_NVPATTERN_ENABLE_MULTIPLE_VALIDATION ) V_MEMROM0 V_MEMROM1 vuint8 V_MEMROM2 fblNvPatternMultiplicity[] = { 1u, /**< kFblNvPatternId_PartitionValidity can be validated/invalidated once after erasure */ 1u, /**< kFblNvPatternId_ModuleValidity can be validated/invalidated once after erasure */ # if defined( FBL_ENABLE_FLASH_ERASED_DETECTION ) 1u, /**< kFblNvPatternId_ErasedState can be validated/invalidated once after erasure */ # endif FBL_NVPATTERN_USER_PATTERN_MULTIPLICITY }; #endif /* FBL_NVPATTERN_ENABLE_MULTIPLE_VALIDATION */ #if defined( FBL_NVPATTERN_ENABLE_BLOCK_PROPERTIES ) V_MEMROM0 V_MEMROM1 tFblBlockProperty V_MEMROM2 fblNvBlockProperties[] = { FBL_NVPATTERN_USER_PROPERTY_ENTRY }; #endif /* FBL_NVPATTERN_ENABLE_BLOCK_PROPERTIES */ #define FBLNVPATTERN_STOP_SEC_CONST #include "MemMap.h" /* PRQA S 5087 */ /* MD_MSR_MemMap */ /*********************************************************************************************************************** * MISRA DEVIATIONS **********************************************************************************************************************/ /* Justification for module-specific MISRA deviations: MD_FblNvPatternOem_0724_EnumValNotUnique: Reason: The same numerical value is associated to different enum entries, to allows each entry value to be used in the appropriate context, keeping a better code structure and understanding. Risk: Enum values can potentially be assigned with the same value unintentionally. Prevention: Correct design. MD_FblNvPatternOem_3684: Reason: The size of the array is determined only at compile time. Risk: The code is less clear and require more analysis for a deep understanding. Prevention: No prevention defined. */ /*********************************************************************************************************************** * END OF FILE: FBL_NVPATTERN_OEM.C **********************************************************************************************************************/