RTEMS 6.1-rc5
|
RAMECC HAL module driver. This file provides firmware functions to manage the following functionalities of the RAM ECC monitoring (RAMECC) peripheral: More...
#include "stm32h7xx_hal.h"
RAMECC HAL module driver. This file provides firmware functions to manage the following functionalities of the RAM ECC monitoring (RAMECC) peripheral:
Copyright (c) 2017 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
============================================================================== ##### How to use this driver ##### ============================================================================== [..] (#) Enable and latch error information through HAL_RAMECC_Init(). (#) For a given Monitor, enable and disable interrupt through HAL_RAMECC_EnableNotification(). To enable a notification for a given RAMECC instance, use global interrupts. To enable a notification for only RAMECC monitor, use monitor interrupts. All possible notifications are defined in the driver header file under RAMECC_Interrupt group. *** Silent mode *** =================== [..] (+) Use HAL_RAMECC_StartMonitor() to start RAMECC latch failing information without enabling any notification. *** Interrupt mode *** ====================== [..] (+) Use HAL_RAMECC_EnableNotification() to enable interrupts for a given error. (+) Configure the RAMECC interrupt priority using HAL_NVIC_SetPriority(). (+) Enable the RAMECC IRQ handler using HAL_NVIC_EnableIRQ(). (+) Start RAMECC latch failing information using HAL_RAMECC_StartMonitor(). *** Failing information *** ====================== [..] (#) Use HAL_RAMECC_GetFailingAddress() function to return the RAMECC failing address. (#) Use HAL_RAMECC_GetFailingDataLow() function to return the RAMECC failing data low. (#) Use HAL_RAMECC_GetFailingDataHigh() function to return the RAMECC failing data high. (#) Use HAL_RAMECC_GetHammingErrorCode() function to return the RAMECC Hamming bits injected. (#) Use HAL_RAMECC_IsECCSingleErrorDetected() function to check if a single error was detected and corrected. (#) Use HAL_RAMECC_IsECCDoubleErrorDetected() function to check if a double error was dedetected. *** RAMECC HAL driver macros list *** ============================================= [..] Below the list of used macros in RAMECC HAL driver. (+) __HAL_RAMECC_ENABLE_IT : Enable the specified ECCRAM Monitor interrupts. (+) __HAL_RAMECC_DISABLE_IT : Disable the specified ECCRAM Monitor interrupts. (+) __HAL_RAMECC_GET_FLAG : Return the current RAMECC Monitor selected flag. (+) __HAL_RAMECC_CLEAR_FLAG : Clear the current RAMECC Monitor selected flag. ##### Callback registration ##### ================================== [..] (#) The compilation define USE_HAL_RAMECC_REGISTER_CALLBACKS when set to 1 allows the user to configure dynamically the driver callback. [..] (#) Use Function HAL_RAMECC_RegisterCallback() to register a user callback. (#) Function HAL_RAMECC_RegisterCallback() allows to register following callback: (+) RAMECCErrorCode : RAMECC error code detection. (#) This function takes as parameters the HAL peripheral handle and a pointer to the user callback function. [..] (#) Use function HAL_RAMECC_UnRegisterCallback() to reset a callback to the default weak function. (#) HAL_RAMECC_UnRegisterCallback() takes as parameters the HAL peripheral handle. (#) This function allows to reset following callback: (+) RAMECCErrorCode : RAMECC error code detection. [..] (#) When The compilation define USE_HAL_RAMECC_REGISTER_CALLBACKS is set to 0 or not defined, the callback registration feature is not available and weak callbacks are used.