CMSIS-Driver_PIC32CM-JH  
Peripheral Library (PLIB) Documentation
 
Loading...
Searching...
No Matches
MCRAMC Interface

Driver API for MCRAMC (plib_mcramc.h) More...

Typedefs

typedef uint32_t MCRAMC_INTERRUPT_MASK
 Interrupt source mask type.
 
typedef void(* MCRAMC_CALLBACK) (MCRAMC_INTERRUPT_MASK interrupt_source)
 Function pointer type for interrupt callback functions.
 

Functions

void MCRAMC_ECC_Enable (void)
 Enables the MCRAMC peripheral (ECC engine).
 
void MCRAMC_ECC_Disable (void)
 Disables the MCRAMC peripheral (ECC engine).
 
bool MCRAMC_ECC_IsEnabled (void)
 Returns the MCRAMC enable status.
 
void MCRAMC_EnableInterrupt (MCRAMC_INTERRUPT_MASK interrupt_source)
 Enables MCRAMC interrupts.
 
void MCRAMC_DisableInterrupt (MCRAMC_INTERRUPT_MASK interrupt_source)
 Disables MCRAMC interrupts.
 
uint32_t MCRAMC_GetInterruptStatus (void)
 Gets the current interrupt status flags.
 
void MCRAMC_ClearInterrupt (MCRAMC_INTERRUPT_MASK interrupt_source)
 Clears interrupt status flags.
 
void MCRAMC_SetCallbackHandler (MCRAMC_CALLBACK callback)
 Registers an interrupt callback function.
 
uint32_t MCRAMC_GetErrorCaptureAddress (void)
 Reads ERRCADR (Error Capture Address Register).
 
uint8_t MCRAMC_GetErrorCaptureParity (void)
 Reads ERRCPAR (Error Capture Parity Register).
 
uint8_t MCRAMC_GetErrorCaptureSyndrome (void)
 Gets the syndrome field (ERRCSYN.ERCSYN).
 
bool MCRAMC_ErrorIsSingleBit (void)
 Checks ERRCSYN.ERR1 to see if a single-bit error was captured.
 
bool MCRAMC_ErrorIsDoubleBit (void)
 Checks ERRCSYN.ERR2 to see if a double-bit error was captured.
 

Description

Driver API for MCRAMC (plib_mcramc.h)

Typedef Documentation

◆ MCRAMC_CALLBACK

typedef void(* MCRAMC_CALLBACK) (MCRAMC_INTERRUPT_MASK interrupt_source)

Function pointer type for interrupt callback functions.

◆ MCRAMC_INTERRUPT_MASK

typedef uint32_t MCRAMC_INTERRUPT_MASK

Interrupt source mask type.

Pass the desired interrupt bits as a bit-mask. You may use the device-header (DFP) masks directly as arguments, e.g.:

  • MCRAMC_INTENCLR_SERREN_Msk
  • MCRAMC_INTENSET_DERREN_Msk
  • MCRAMC_INTSTA_DERR_Msk

Function Documentation

◆ MCRAMC_ClearInterrupt()

void MCRAMC_ClearInterrupt ( MCRAMC_INTERRUPT_MASK interrupt_source)

Clears interrupt status flags.

Parameters
interrupt_sourceInterrupt source status mask to clear.

◆ MCRAMC_DisableInterrupt()

void MCRAMC_DisableInterrupt ( MCRAMC_INTERRUPT_MASK interrupt_source)

Disables MCRAMC interrupts.

Parameters
interrupt_sourceInterrupt source mask to disable.

◆ MCRAMC_ECC_Disable()

void MCRAMC_ECC_Disable ( void )

Disables the MCRAMC peripheral (ECC engine).

◆ MCRAMC_ECC_Enable()

void MCRAMC_ECC_Enable ( void )

Enables the MCRAMC peripheral (ECC engine).

◆ MCRAMC_ECC_IsEnabled()

bool MCRAMC_ECC_IsEnabled ( void )

Returns the MCRAMC enable status.

Returns
true if enabled, false otherwise.

◆ MCRAMC_EnableInterrupt()

void MCRAMC_EnableInterrupt ( MCRAMC_INTERRUPT_MASK interrupt_source)

Enables MCRAMC interrupts.

Parameters
interrupt_sourceInterrupt source mask to enable.

◆ MCRAMC_ErrorIsDoubleBit()

bool MCRAMC_ErrorIsDoubleBit ( void )

Checks ERRCSYN.ERR2 to see if a double-bit error was captured.

Returns
true if double-bit error captured, false otherwise.

◆ MCRAMC_ErrorIsSingleBit()

bool MCRAMC_ErrorIsSingleBit ( void )

Checks ERRCSYN.ERR1 to see if a single-bit error was captured.

Returns
true if single-bit error captured, false otherwise.

◆ MCRAMC_GetErrorCaptureAddress()

uint32_t MCRAMC_GetErrorCaptureAddress ( void )

Reads ERRCADR (Error Capture Address Register).

Returns
Captured error address.

◆ MCRAMC_GetErrorCaptureParity()

uint8_t MCRAMC_GetErrorCaptureParity ( void )

Reads ERRCPAR (Error Capture Parity Register).

Returns
Captured parity value.

◆ MCRAMC_GetErrorCaptureSyndrome()

uint8_t MCRAMC_GetErrorCaptureSyndrome ( void )

Gets the syndrome field (ERRCSYN.ERCSYN).

Returns
Captured syndrome value.

◆ MCRAMC_GetInterruptStatus()

uint32_t MCRAMC_GetInterruptStatus ( void )

Gets the current interrupt status flags.

Returns
Interrupt status flag register value. Use the DFP masks to interpret the bits.

◆ MCRAMC_SetCallbackHandler()

void MCRAMC_SetCallbackHandler ( MCRAMC_CALLBACK callback)

Registers an interrupt callback function.

Parameters
callbackFunction pointer to the callback function.