1 
2 /**
3   ******************************************************************************
4   * @file    boot_hal_cfg.h
5   * @author  MCD Application Team
6   * @brief   File fixing configuration flag specific for STM32L5xx platform
7   *
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
12   * All rights reserved.</center></h2>
13   *
14   * This software component is licensed by ST under BSD 3-Clause license,
15   * the "License"; You may not use this file except in compliance with the
16   * License. You may obtain a copy of the License at:
17   *                        opensource.org/licenses/BSD-3-Clause
18   *
19   ******************************************************************************
20   */
21 
22 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef BOOT_HAL_CFG_H
25 #define BOOT_HAL_CFG_H
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32l5xx_hal.h"
29 #define RTC_CLOCK_SOURCE_LSE
30 
31 
32 #ifdef RTC_CLOCK_SOURCE_LSE
33 #define RTC_ASYNCH_PREDIV  0x7F
34 #define RTC_SYNCH_PREDIV   0x00FF
35 #endif /* RTC_CLOCK_SOURCE_LSE */
36 
37 /* Static protection checking  Flag */
38 /* #define TFM_OB_RDP_LEVEL_VALUE OB_RDP_LEVEL_1 */ /*!< RDP level */
39 /* #define TFM_WRP_PROTECT_ENABLE */ /*!< Write Protection  */
40 #define TFM_HDP_PROTECT_ENABLE /*!< HDP protection   */
41 #define TFM_SECURE_USER_SRAM2_ERASE_AT_RESET /*!< SRAM2 clear at Reset  */
42 #define TFM_OB_BOOT_LOCK 0 /*!< BOOT Lock expected value  */
43 /* run time protection */
44 #define TFM_FLASH_PRIVONLY_ENABLE  /*!< Flash Command in Privileged only  */
45 /*#define TFM_BOOT_MPU_PROTECTION */  /*!< TFM_SBSFU_Boot uses MPU to prevent execution outside of TFM_SBSFU_Boot code  */
46 #define TFM_ENABLE_SET_OB /*!< Option bytes are set by TFM_SBSFU_Boot when not correctly set  */
47 #define TFM_ERROR_HANDLER_NON_SECURE /*!< Error handler is in Non Secure , this allows regression without jumping   */
48 /* Exported types ------------------------------------------------------------*/
49 typedef enum
50 {
51   TFM_SUCCESS = 0U,
52   TFM_FAILED
53 } TFM_ErrorStatus;
54 
55 /* Exported constants --------------------------------------------------------*/
56 /* Exported macro ------------------------------------------------------------*/
57 /* Exported functions ------------------------------------------------------- */
58 void Error_Handler(void);
59 #endif /* BOOT_HAL_CFG_H */
60 
61 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
62