1 /* 2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef BSP_REGISTER_PROTECTION_H 8 #define BSP_REGISTER_PROTECTION_H 9 10 /** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */ 11 FSP_HEADER 12 13 /*********************************************************************************************************************** 14 * Macro definitions 15 **********************************************************************************************************************/ 16 17 /*********************************************************************************************************************** 18 * Typedef definitions 19 **********************************************************************************************************************/ 20 21 /*******************************************************************************************************************//** 22 * @addtogroup BSP_MCU 23 * @{ 24 **********************************************************************************************************************/ 25 26 /** The different types of registers that can be protected. */ 27 typedef enum e_bsp_reg_protect 28 { 29 /** Enables writing to the registers related to the clock generation circuit. */ 30 BSP_REG_PROTECT_CGC = 0, 31 32 /** Enables writing to the registers related to operating modes, low power consumption, and battery backup 33 * function. */ 34 BSP_REG_PROTECT_OM_LPC_BATT, 35 36 /** Enables writing to the registers related to the LVD: LVCMPCR, LVDLVLR, LVD1CR0, LVD1CR1, LVD1SR, LVD2CR0, 37 * LVD2CR1, LVD2SR. */ 38 BSP_REG_PROTECT_LVD, 39 40 /** Enables writing to the registers related to the security function. */ 41 BSP_REG_PROTECT_SAR, 42 } bsp_reg_protect_t; 43 44 /** @} (end addtogroup BSP_MCU) */ 45 46 /*********************************************************************************************************************** 47 * Exported global variables 48 **********************************************************************************************************************/ 49 50 /*********************************************************************************************************************** 51 * Exported global functions (to be accessed by other files) 52 **********************************************************************************************************************/ 53 54 /* Public functions defined in bsp.h */ 55 void bsp_register_protect_open(void); // Used internally by BSP 56 57 /** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */ 58 FSP_FOOTER 59 60 #endif 61