@@ -218,10 +218,10 @@ extern HAL_TickFreqTypeDef uwTickFreq;
218218/** @defgroup SBS_NextHDPL_Selection Next HDPL Selection
219219 * @{
220220 */
221- #define SBS_OBKHDPL_INCR_0 0x00U
222- #define SBS_OBKHDPL_INCR_1 SBS_NEXTHDPLCR_NEXTHDPL_0
223- #define SBS_OBKHDPL_INCR_2 SBS_NEXTHDPLCR_NEXTHDPL_1
224- #define SBS_OBKHDPL_INCR_3 SBS_NEXTHDPLCR_NEXTHDPL
221+ #define SBS_OBKHDPL_INCR_0 0x00U /*!< Index to add to the current HDPL to point (through OBK-HDPL) to the next secure storage areas */
222+ #define SBS_OBKHDPL_INCR_1 SBS_NEXTHDPLCR_NEXTHDPL_0 /*!< Index to add to the current HDPL to point (through OBK-HDPL) to the next secure storage areas */
223+ #define SBS_OBKHDPL_INCR_2 SBS_NEXTHDPLCR_NEXTHDPL_1 /*!< Index to add to the current HDPL to point (through OBK-HDPL) to the next secure storage areas */
224+ #define SBS_OBKHDPL_INCR_3 SBS_NEXTHDPLCR_NEXTHDPL /*!< Index to add to the current HDPL to point (through OBK-HDPL) to the next secure storage areas */
225225/**
226226 * @}
227227 */
@@ -230,14 +230,24 @@ extern HAL_TickFreqTypeDef uwTickFreq;
230230/** @defgroup SBS_HDPL_Value HDPL Value
231231 * @{
232232 */
233- #define SBS_HDPL_VALUE_0 0x000000B4U
234- #define SBS_HDPL_VALUE_1 0x00000051U
235- #define SBS_HDPL_VALUE_2 0x0000008AU
236- #define SBS_HDPL_VALUE_3 0x0000006FU
233+ #define SBS_HDPL_VALUE_0 0x000000B4U /*!< Hide protection level 0 */
234+ #define SBS_HDPL_VALUE_1 0x00000051U /*!< Hide protection level 0 */
235+ #define SBS_HDPL_VALUE_2 0x0000008AU /*!< Hide protection level 0 */
236+ #define SBS_HDPL_VALUE_3 0x0000006FU /*!< Hide protection level 0 */
237237/**
238238 * @}
239239 */
240240
241+ #if defined(SBS_DBGCR_DBG_AUTH_SEC )
242+ /** @defgroup SBS_DEBUG_SEC_Value Debug sec Value
243+ * @{
244+ */
245+ #define SBS_DEBUG_SEC_NSEC 0x000000B4U /*!< Debug opening for secure and non-secure */
246+ #define SBS_DEBUG_NSEC 0x0000003CU /*!< Debug opening for non-secure only */
247+ /**
248+ * @}
249+ */
250+ #endif /* SBS_DBGCR_DBG_AUTH_SEC */
241251
242252/** @defgroup SBS_Lock_items SBS Lock items
243253 * @brief SBS items to set lock on
@@ -255,7 +265,7 @@ extern HAL_TickFreqTypeDef uwTickFreq;
255265 code only) */
256266#define SBS_LOCK_ALL (SBS_MPU_NSEC|SBS_VTOR_NSEC|SBS_SAU|SBS_MPU_SEC|SBS_VTOR_AIRCR_SEC) /*!< All */
257267#else
258- #define SBS_LOCK_ALL (SBS_MPU_NSEC|SBS_VTOR_NSEC) /*!< All (privileged secure or non-secure only) */
268+ #define SBS_LOCK_ALL (SBS_MPU_NSEC|SBS_VTOR_NSEC) /*!< All (privileged secure or non-secure only) */
259269#endif /* __ARM_FEATURE_CMSE */
260270/**
261271 * @}
@@ -646,6 +656,9 @@ extern HAL_TickFreqTypeDef uwTickFreq;
646656 (((__PIN__) & SBS_FASTMODEPLUS_PB8) == SBS_FASTMODEPLUS_PB8))
647657#endif /* SBS_FASTMODEPLUS_PB9 */
648658
659+ #define IS_SBS_HDPL (__LEVEL__ ) (((__LEVEL__) == SBS_HDPL_VALUE_0) || ((__LEVEL__) == SBS_HDPL_VALUE_1) || \
660+ ((__LEVEL__) == SBS_HDPL_VALUE_2) || ((__LEVEL__) == SBS_HDPL_VALUE_3))
661+
649662#define IS_SBS_OBKHDPL_SELECTION (__SELECT__ ) (((__SELECT__) == SBS_OBKHDPL_INCR_0) || \
650663 ((__SELECT__) == SBS_OBKHDPL_INCR_1) || \
651664 ((__SELECT__) == SBS_OBKHDPL_INCR_2) || \
@@ -701,11 +714,11 @@ extern HAL_TickFreqTypeDef uwTickFreq;
701714 */
702715
703716/* Initialization and de-initialization functions ******************************/
704- HAL_StatusTypeDef HAL_Init (void );
705- HAL_StatusTypeDef HAL_DeInit (void );
706- void HAL_MspInit (void );
707- void HAL_MspDeInit (void );
708- HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority );
717+ HAL_StatusTypeDef HAL_Init (void );
718+ HAL_StatusTypeDef HAL_DeInit (void );
719+ void HAL_MspInit (void );
720+ void HAL_MspDeInit (void );
721+ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority );
709722
710723/**
711724 * @}
@@ -716,20 +729,20 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority);
716729 */
717730
718731/* Peripheral Control functions ************************************************/
719- void HAL_IncTick (void );
720- void HAL_Delay (uint32_t Delay );
721- uint32_t HAL_GetTick (void );
722- uint32_t HAL_GetTickPrio (void );
723- HAL_StatusTypeDef HAL_SetTickFreq (HAL_TickFreqTypeDef Freq );
724- HAL_TickFreqTypeDef HAL_GetTickFreq (void );
725- void HAL_SuspendTick (void );
726- void HAL_ResumeTick (void );
727- uint32_t HAL_GetHalVersion (void );
728- uint32_t HAL_GetREVID (void );
729- uint32_t HAL_GetDEVID (void );
730- uint32_t HAL_GetUIDw0 (void );
731- uint32_t HAL_GetUIDw1 (void );
732- uint32_t HAL_GetUIDw2 (void );
732+ void HAL_IncTick (void );
733+ void HAL_Delay (uint32_t Delay );
734+ uint32_t HAL_GetTick (void );
735+ uint32_t HAL_GetTickPrio (void );
736+ HAL_StatusTypeDef HAL_SetTickFreq (HAL_TickFreqTypeDef Freq );
737+ HAL_TickFreqTypeDef HAL_GetTickFreq (void );
738+ void HAL_SuspendTick (void );
739+ void HAL_ResumeTick (void );
740+ uint32_t HAL_GetHalVersion (void );
741+ uint32_t HAL_GetREVID (void );
742+ uint32_t HAL_GetDEVID (void );
743+ uint32_t HAL_GetUIDw0 (void );
744+ uint32_t HAL_GetUIDw1 (void );
745+ uint32_t HAL_GetUIDw2 (void );
733746
734747/**
735748 * @}
@@ -740,10 +753,10 @@ uint32_t HAL_GetUIDw2(void);
740753 */
741754
742755/* DBGMCU Peripheral Control functions *****************************************/
743- void HAL_DBGMCU_EnableDBGStopMode (void );
744- void HAL_DBGMCU_DisableDBGStopMode (void );
745- void HAL_DBGMCU_EnableDBGStandbyMode (void );
746- void HAL_DBGMCU_DisableDBGStandbyMode (void );
756+ void HAL_DBGMCU_EnableDBGStopMode (void );
757+ void HAL_DBGMCU_DisableDBGStopMode (void );
758+ void HAL_DBGMCU_EnableDBGStandbyMode (void );
759+ void HAL_DBGMCU_DisableDBGStandbyMode (void );
747760
748761/**
749762 * @}
@@ -753,47 +766,92 @@ void HAL_DBGMCU_DisableDBGStandbyMode(void);
753766 * @{
754767 */
755768
756- /* SBS Control functions ****************************************************/
757-
769+ /* VREFBUF Control functions ****************************************************/
758770#if defined(VREFBUF )
759- void HAL_VREFBUF_VoltageScalingConfig (uint32_t VoltageScaling );
760- void HAL_VREFBUF_HighImpedanceConfig (uint32_t Mode );
761- void HAL_VREFBUF_TrimmingConfig (uint32_t TrimmingValue );
762- HAL_StatusTypeDef HAL_EnableVREFBUF (void );
763- void HAL_DisableVREFBUF (void );
771+ void HAL_VREFBUF_VoltageScalingConfig (uint32_t VoltageScaling );
772+ void HAL_VREFBUF_HighImpedanceConfig (uint32_t Mode );
773+ void HAL_VREFBUF_TrimmingConfig (uint32_t TrimmingValue );
774+ HAL_StatusTypeDef HAL_EnableVREFBUF (void );
775+ void HAL_DisableVREFBUF (void );
764776#endif /* VREFBUF */
765777
766- void HAL_SBS_ETHInterfaceSelect (uint32_t SBS_ETHInterface );
767- void HAL_SBS_EnableVddIO1CompensationCell (void );
768- void HAL_SBS_DisableVddIO1CompensationCell (void );
769- void HAL_SBS_EnableVddIO2CompensationCell (void );
770- void HAL_SBS_DisableVddIO2CompensationCell (void );
771- void HAL_SBS_VDDCompensationCodeSelect (uint32_t SBS_CompCode );
772- void HAL_SBS_VDDIOCompensationCodeSelect (uint32_t SBS_CompCode );
773- uint32_t HAL_SBS_GetVddIO1CompensationCellReadyFlag (void );
774- uint32_t HAL_SBS_GetVddIO2CompensationCellReadyFlag (void );
775- void HAL_SBS_VDDCompensationCodeConfig (uint32_t SBS_PMOSCode , uint32_t SBS_NMOSCode );
776- void HAL_SBS_VDDIOCompensationCodeConfig (uint32_t SBS_PMOSCode , uint32_t SBS_NMOSCode );
777- uint32_t HAL_SBS_GetNMOSVddCompensationValue (void );
778- uint32_t HAL_SBS_GetPMOSVddCompensationValue (void );
779- uint32_t HAL_SBS_GetNMOSVddIO2CompensationValue (void );
780- uint32_t HAL_SBS_GetPMOSVddIO2CompensationValue (void );
781- void HAL_SBS_EPOCHSelection (uint32_t Epoch_Selection );
782- uint32_t HAL_SBS_GetEPOCHSelection (void );
783- void HAL_SBS_IncrementHDPLValue (void );
784- uint32_t HAL_SBS_GetHDPLValue (void );
785- void HAL_SBS_SetOBKHDPL (uint32_t OBKHDPL_Value );
786- uint32_t HAL_SBS_GetOBKHDPL (void );
787- void HAL_SBS_FLASH_EnableECCNMI (void );
788- void HAL_SBS_FLASH_DisableECCNMI (void );
789- uint32_t HAL_SBS_FLASH_ECCNMI_IsDisabled (void );
778+ /**
779+ * @}
780+ */
781+
782+ /** @addtogroup HAL_Exported_Functions_Group5
783+ * @{
784+ */
785+
786+ /* SBS System Configuration functions *******************************************/
787+ void HAL_SBS_ETHInterfaceSelect (uint32_t SBS_ETHInterface );
788+ void HAL_SBS_EnableVddIO1CompensationCell (void );
789+ void HAL_SBS_DisableVddIO1CompensationCell (void );
790+ void HAL_SBS_EnableVddIO2CompensationCell (void );
791+ void HAL_SBS_DisableVddIO2CompensationCell (void );
792+ void HAL_SBS_VDDCompensationCodeSelect (uint32_t SBS_CompCode );
793+ void HAL_SBS_VDDIOCompensationCodeSelect (uint32_t SBS_CompCode );
794+ uint32_t HAL_SBS_GetVddIO1CompensationCellReadyFlag (void );
795+ uint32_t HAL_SBS_GetVddIO2CompensationCellReadyFlag (void );
796+ void HAL_SBS_VDDCompensationCodeConfig (uint32_t SBS_PMOSCode , uint32_t SBS_NMOSCode );
797+ void HAL_SBS_VDDIOCompensationCodeConfig (uint32_t SBS_PMOSCode , uint32_t SBS_NMOSCode );
798+ uint32_t HAL_SBS_GetNMOSVddCompensationValue (void );
799+ uint32_t HAL_SBS_GetPMOSVddCompensationValue (void );
800+ uint32_t HAL_SBS_GetNMOSVddIO2CompensationValue (void );
801+ uint32_t HAL_SBS_GetPMOSVddIO2CompensationValue (void );
802+ void HAL_SBS_FLASH_EnableECCNMI (void );
803+ void HAL_SBS_FLASH_DisableECCNMI (void );
804+ uint32_t HAL_SBS_FLASH_ECCNMI_IsDisabled (void );
790805
791806/**
792807 * @}
793808 */
794809
810+ /** @addtogroup HAL_Exported_Functions_Group6
811+ * @{
812+ */
813+
814+ /* SBS Boot control functions ***************************************************/
815+ void HAL_SBS_IncrementHDPLValue (void );
816+ uint32_t HAL_SBS_GetHDPLValue (void );
795817
796- /** @addtogroup HAL_Exported_Functions_Group5
818+ /**
819+ * @}
820+ */
821+
822+ /** @addtogroup HAL_Exported_Functions_Group7
823+ * @{
824+ */
825+
826+ /* SBS Hardware secure storage control functions ********************************/
827+ void HAL_SBS_EPOCHSelection (uint32_t Epoch_Selection );
828+ uint32_t HAL_SBS_GetEPOCHSelection (void );
829+ void HAL_SBS_SetOBKHDPL (uint32_t OBKHDPL_Value );
830+ uint32_t HAL_SBS_GetOBKHDPL (void );
831+
832+ /**
833+ * @}
834+ */
835+
836+ /** @addtogroup HAL_Exported_Functions_Group8
837+ * @{
838+ */
839+
840+ /* SBS Debug control functions ***************************************************/
841+ void HAL_SBS_OpenAccessPort (void );
842+ void HAL_SBS_OpenDebug (void );
843+ HAL_StatusTypeDef HAL_SBS_ConfigDebugLevel (uint32_t Level );
844+ uint32_t HAL_SBS_GetDebugLevel (void );
845+ void HAL_SBS_LockDebugConfig (void );
846+ void HAL_SBS_ConfigDebugSecurity (uint32_t Security );
847+ uint32_t HAL_SBS_GetDebugSecurity (void );
848+
849+ /**
850+ * @}
851+ */
852+
853+
854+ /** @addtogroup HAL_Exported_Functions_Group9
797855 * @{
798856 */
799857
@@ -805,7 +863,7 @@ HAL_StatusTypeDef HAL_SBS_GetLock(uint32_t *pItem);
805863 * @}
806864 */
807865
808- /** @addtogroup HAL_Exported_Functions_Group6
866+ /** @addtogroup HAL_Exported_Functions_Group10
809867 * @{
810868 */
811869
0 commit comments