2.15 MSI-Driver

2.15.1 Introduction

Overview

The MSI module is a bridge between the Main and a Secondary processor system, each of which operates within independent clock domains. The Main and Secondary have their own registers to communicate between the MSI modules; the Main MSI registers are located in the Main SFR space and the Secondary MSI registers are in the Secondary SFR space.

For detailed explanation, refer this link "4.1 dsPIC33CH Architecture Overview and Features"

Features

  • Sixteen Unidirectional Data Mailbox Registers
    • Direction of each Mailbox register is fuse-selectable

    • Byte and word-addressable

  • Eight Mailbox Data Flow Control Protocol Blocks
    • Individual fuse enables

    • Write port active; read port passive (i.e., no read data request required)

    • Automatic, interrupt-driven (or polled), data flow control mechanism across MSI clock boundary

    • Fuse assignable to any of the Mailbox registers, supports any length data buffers (up to the number of available Mailbox registers)

  • Main to Secondary and Secondary to Main Interrupt Request with Acknowledge Data Flow Control

  • Two-Channel FIFO Memory Structure
    • One read and one write channel, each 32 words deep

    • Circular operation with empty and full status, and interrupts

    • Overflow/underflow detection with interrupts to Main core and Secondary core

    • Interrupt-based, software polled or DMA transfer-compatible

  • Main and Secondary Processor Cross-Boundary Control and Status
    • Readable operating mode status for both processors

    • Secondary enable from Main (subject to satisfying a hardware write interlock sequencer)

    • Main interrupt when Secondary is reset during code execution

    • Secondary interrupt when Main is reset during code execution

  • Optional (fuse) Decoupling of Main and Secondary Resets; POR/BOR/MCLR always Resets Main and Secondary; Influence of Remaining Run-Time Resets on the Secondary Enable is Fuse-Programmable

2.15.2 Main Core Driver

2.15.2.1 Module Documentation

2.15.2.1.1 MSI-Main Core Driver

2.15.2.1.1.1 Module description

This is the generated driver interface file for the MAIN_CORE driver.

2.15.2.1.1.1.1 Data structures
2.15.2.1.1.1.2 Enumerations
2.15.2.1.1.1.3 Functions
2.15.2.1.1.1.4 Variables
  • const struct MAIN_CORE_INTERFACE MSIInterface

    Structure object of type MAIN_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Main_Core can be changed by the user in the MAIN_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.2.1.1.2 Function Documentation
2.15.2.1.1.2.1 MAIN_CORE_Deinitialize()

void MAIN_CORE_Deinitialize (void )

Deinitializes MAIN_CORE to POR values.

Parameters:
none
Returns:

none

2.15.2.1.1.2.2 MAIN_CORE_FIFOOverFLowUnderFlowCallback()

void MAIN_CORE_FIFOOverFLowUnderFlowCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_FIFOOverFLowUnderFlowCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.3 MAIN_CORE_FIFOOverFLowUnderFlowCallbackRegister()

void MAIN_CORE_FIFOOverFLowUnderFlowCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE FIFOOverFLowUnderFlow event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.4 MAIN_CORE_FIFORead()

uint16_t MAIN_CORE_FIFORead (uint16_t * pData, uint16_t wordCount)

This routine reads FIFO data sent from the Main Core.

Parameters:
in *pData

- Pointer to an array to store the read data

in wordCount

- Number of words to be read.  

Returns:

Number of words read.  

2.15.2.1.1.2.5 MAIN_CORE_FIFOReadIsEmpty()

inline static bool MAIN_CORE_FIFOReadIsEmpty (void )

This inline function checks whether the status of Read FIFO is Empty. Returns true if last read by Main core from Read FIFO (RFDATA) emptied the FIFO of all valid data or FIFO is disabled (and initialized to the empty state)

Returns:
2.15.2.1.1.2.6 MAIN_CORE_FIFOReadIsFull()

inline static bool MAIN_CORE_FIFOReadIsFull (void )

This inline function checks whether the status of Read FIFO is full. last write by Secondary core to Read FIFO (RFDATA) was into the last free location.

Returns:
2.15.2.1.1.2.7 MAIN_CORE_FIFOWrite()

uint16_t MAIN_CORE_FIFOWrite (uint16_t * pData, uint16_t wordCount)

This routine transfers FIFO data to Main Core.

Precondition:

MAIN_CORE_Initialize() should be called before calling this routine.

Parameters:
in *pData

- Pointer to an array which has data for transmission.

in wordCount

- Number of words to be transfer.  

Returns:

Number of words transferred.  

2.15.2.1.1.2.8 MAIN_CORE_FIFOWriteIsEmpty()

inline static bool MAIN_CORE_FIFOWriteIsEmpty (void )

This inline function checks whether the status of Write FIFO is Empty. Returns true if last write by Main to Write FIFO (WFDATA) was into the last free location.

Returns:
2.15.2.1.1.2.9 MAIN_CORE_FIFOWriteIsFull()

inline static bool MAIN_CORE_FIFOWriteIsFull (void )

This inline function checks whether the status of Write FIFO is Full. Returns true if last write by Main core to Write FIFO (WFDATA) was into the last free location.

Returns:
2.15.2.1.1.2.10 MAIN_CORE_Initialize()

void MAIN_CORE_Initialize (void )

This routine initializes the MSI driver. This routine must be called before any other MSI routine is called. This routine should only be called once during system initialization.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.11 MAIN_CORE_InterruptRequestAcknowledge()

void MAIN_CORE_InterruptRequestAcknowledge (void )

This routine acknowledges interrupt received from Main MSI.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.12 MAIN_CORE_InterruptRequestAcknowledgeComplete()

void MAIN_CORE_InterruptRequestAcknowledgeComplete (void )

This routine clears acknowledge for interrupt received from Main MSI.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.13 MAIN_CORE_InterruptRequestComplete()

void MAIN_CORE_InterruptRequestComplete (void )

This routine clears interrupt to MAIN_CORE.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.14 MAIN_CORE_InterruptRequestGenerate()

void MAIN_CORE_InterruptRequestGenerate (void )

This routine generates interrupt to MAIN_CORE.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.15 MAIN_CORE_IsInterruptRequestAcknowledged()

bool MAIN_CORE_IsInterruptRequestAcknowledged (void )

This routine returns the status of interrupt request acknowledge from the MAIN_CORE.

Parameters:
none
Returns:

True - when MAIN_CORE has acknowledged Main MSI interrupt request.

False - when MAIN_CORE has not acknowledged Main MSI interrupt request.  

2.15.2.1.1.2.16 MAIN_CORE_IsInterruptRequested()

bool MAIN_CORE_IsInterruptRequested (void )

This routine returns the status of interrupt request from the MAIN_CORE.

Parameters:
none
Returns:

True - when MAIN_CORE has issued interrupt to Secondary Core.

False - when MAIN_CORE has not issued interrupt to Secondary Core.  

2.15.2.1.1.2.17 MAIN_CORE_MainBreakCallback()

void MAIN_CORE_MainBreakCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_MainBreakCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.18 MAIN_CORE_MainBreakCallbackRegister()

void MAIN_CORE_MainBreakCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE MainBreak event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.19 MAIN_CORE_MainInitiatedCallback()

void MAIN_CORE_MainInitiatedCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_MainInitiatedCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.20 MAIN_CORE_MainInitiatedCallbackRegister()

void MAIN_CORE_MainInitiatedCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE MainInitiated event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.21 MAIN_CORE_MainResetCallback()

void MAIN_CORE_MainResetCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_MainResetCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.22 MAIN_CORE_MainResetCallbackRegister()

void MAIN_CORE_MainResetCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE MainReset event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.23 MAIN_CORE_MSI1_ProtocolACallback()

void MAIN_CORE_MSI1_ProtocolACallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_MSI1_ProtocolACallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.24 MAIN_CORE_MSI1_ProtocolBCallback()

void MAIN_CORE_MSI1_ProtocolBCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_MSI1_ProtocolBCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.25 MAIN_CORE_ProtocolCallbackRegister()

void MAIN_CORE_ProtocolCallbackRegister (enum MAIN_CORE_PROTOCOLS protocolName, void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE protocol event.

Parameters:
in protocolName

- Selected protocol

in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.26 MAIN_CORE_ProtocolIsEmpty()

inline static bool MAIN_CORE_ProtocolIsEmpty (enum MAIN_CORE_PROTOCOLS protocolName)

This inline function checks whether mailbox is empty. Returns true if Protocol is empty indicating mailbox is ready to write by Main core. returns false indicating write operation cannot be performed by Main core.

Parameters:
in protocolName

- Selected protocol

Returns:

true - Protocol is empty

false - Protocol is full

2.15.2.1.1.2.27 MAIN_CORE_ProtocolIsFull()

inline static bool MAIN_CORE_ProtocolIsFull (enum MAIN_CORE_PROTOCOLS protocolName)

This inline function checks whether mailbox is full. Returns true if New data are ready to read. Returns false when No data are available to be read by Main core.

Parameters:
in protocolName

- Selected protocol

Returns:

true - Protocol is full

false - Protocol is empty

2.15.2.1.1.2.28 MAIN_CORE_ProtocolRead()

bool MAIN_CORE_ProtocolRead (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t * pData)

This routine reads data from mailbox.

Parameters:
in protocolName

- Selected protocol

in *pData

- Pointer to a structure to store the read data  

Returns:

true - successful read

false - unsuccessful read  

2.15.2.1.1.2.29 MAIN_CORE_ProtocolWrite()

bool MAIN_CORE_ProtocolWrite (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t * pData)

This routine writes data to mailbox.

Parameters:
in protocolName

- Selected protocol

in *pData

- Pointer to a structure which has data for transmission.  

Returns:

true - successful write

false - unsuccessful write  

2.15.2.1.1.2.30 MAIN_CORE_ReadFIFODataReadyCallback()

void MAIN_CORE_ReadFIFODataReadyCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_ReadFIFODataReadyCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.31 MAIN_CORE_ReadFIFODataReadyCallbackRegister()

void MAIN_CORE_ReadFIFODataReadyCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE ReadFIFODataReady event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.2.32 MAIN_CORE_SystemStatusGet()

enum MAIN_CORE_SYSTEM_STATUS MAIN_CORE_SystemStatusGet (void )

This routine returns Main system status.

Parameters:
none
Returns:

MAIN_CORE_SYSTEM_STATUS: Enum which provides the status of MAIN_CORE.  

2.15.2.1.1.2.33 MAIN_CORE_WriteFIFOEmptyCallback()

void MAIN_CORE_WriteFIFOEmptyCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using MAIN_CORE_WriteFIFOEmptyCallbackRegister.

Parameters:
none
Returns:

none  

2.15.2.1.1.2.34 MAIN_CORE_WriteFIFOEmptyCallbackRegister()

void MAIN_CORE_WriteFIFOEmptyCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for MAIN_CORE WriteFIFOEmpty event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.2.1.1.3 Enumeration Type Documentation
2.15.2.1.1.3.1 MAIN_CORE_PROTOCOL_SIZE

enum MAIN_CORE_PROTOCOL_SIZE

Defines the size for Protocols.

Note:

Size not required for the driver but will be required for application to create the buffers

MSI1_ProtocolA_SIZE

Size of ProtocolA in 16-bit word

MSI1_ProtocolB_SIZE

Size of ProtocolB in 16-bit word

2.15.2.1.1.3.2 MAIN_CORE_PROTOCOLS

enum MAIN_CORE_PROTOCOLS

Defines the list of Protocols configured for MAIN_CORE_driver.

Note:

These Protocols are required to create the buffer by the application

MSI1_ProtocolA

Custom-name of ProtocolA for read operation only

MSI1_ProtocolB

Custom-name of ProtocolB for write operation only

2.15.2.1.1.3.3 MAIN_CORE_SYSTEM_STATUS

enum MAIN_CORE_SYSTEM_STATUS

Defines the status enumeration for main_core.

MAIN_CORE_SYSTEM_STATUS_NOT_IN_LOW_POWER_MODE

main_core status is in Low power mode

MAIN_CORE_SYSTEM_STATUS_SLEEP_MODE

main_core status is in Sleep mode

MAIN_CORE_SYSTEM_STATUS_IDLE_MODE

main_core status is in Idle mode

MAIN_CORE_SYSTEM_STATUS_RUNNING_STATE

main_core status is in Running state

MAIN_CORE_SYSTEM_STATUS_IN_RESET_STATE

main_core status is in Reset state

2.15.2.1.1.4 Variable Documentation
2.15.2.1.1.4.1 MSIInterface

const struct MAIN_CORE_INTERFACE MSIInterface

Structure object of type MAIN_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Main_Core can be changed by the user in the MAIN_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.2.2 Class Documentation

2.15.2.2.1 MAIN_CORE_INTERFACE Struct Reference

Structure containing the function pointers of MAIN_CORE driver.

2.15.2.2.1.1 Detailed Description

Structure containing the function pointers of MAIN_CORE driver.

#include <main_core_interface.h>

2.15.2.2.1.1.1 Public Attributes
2.15.2.2.1.2 Member Data Documentation

The documentation for this struct was generated from the following file:

source/

main_core_interface.h

2.15.2.2.1.2.1 Deinitialize

void(* Deinitialize) (void)

Pointer to MAIN_CORE_Deinitialize.

2.15.2.2.1.2.2 FIFOOverFLowUnderFlowCallbackRegister

void(* FIFOOverFLowUnderFlowCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_FIFOOverFLowUnderFlowCallbackRegister.

2.15.2.2.1.2.3 FIFORead

uint16_t(* FIFORead) (uint16_t *pData, uint16_t wordCount)

Pointer to MAIN_CORE_FIFORead.

2.15.2.2.1.2.4 FIFOReadIsEmpty

bool(* FIFOReadIsEmpty) (void)

Pointer to MAIN_CORE_FIFOReadIsEmpty.

2.15.2.2.1.2.5 FIFOReadIsFull

bool(* FIFOReadIsFull) (void)

Pointer to MAIN_CORE_FIFOReadIsFull.

2.15.2.2.1.2.6 FIFOWrite

uint16_t(* FIFOWrite) (uint16_t *pData, uint16_t wordCount)

Pointer to MAIN_CORE_FIFOWrite.

2.15.2.2.1.2.7 FIFOWriteIsEmpty

bool(* FIFOWriteIsEmpty) (void)

Pointer to MAIN_CORE_FIFOWriteIsEmpty.

2.15.2.2.1.2.8 FIFOWriteIsFull

bool(* FIFOWriteIsFull) (void)

Pointer to MAIN_CORE_FIFOWriteIsFull.

2.15.2.2.1.2.9 Initialize

void(* Initialize) (void)

Pointer to MAIN_CORE_Initialize.

2.15.2.2.1.2.10 InterruptRequestAcknowledge

void(* InterruptRequestAcknowledge) (void)

Pointer to MAIN_CORE_InterruptRequestAcknowledge.

2.15.2.2.1.2.11 InterruptRequestAcknowledgeComplete

void(* InterruptRequestAcknowledgeComplete) (void)

Pointer to MAIN_CORE_InterruptRequestAcknowledgeComplete.

2.15.2.2.1.2.12 InterruptRequestComplete

void(* InterruptRequestComplete) (void)

Pointer to MAIN_CORE_InterruptRequestComplete.

2.15.2.2.1.2.13 InterruptRequestGenerate

void(* InterruptRequestGenerate) (void)

Pointer to MAIN_CORE_InterruptRequestGenerate.

2.15.2.2.1.2.14 IsInterruptRequestAcknowledged

bool(* IsInterruptRequestAcknowledged) (void)

Pointer to MAIN_CORE_IsInterruptRequestAcknowledged.

2.15.2.2.1.2.15 IsInterruptRequested

bool(* IsInterruptRequested) (void)

Pointer to MAIN_CORE_IsInterruptRequested.

2.15.2.2.1.2.16 MainBreakCallbackRegister

void(* MainBreakCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_MainBreakCallbackRegister.

2.15.2.2.1.2.17 MainInitiatedCallbackRegister

void(* MainInitiatedCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_MainInitiatedCallbackRegister.

2.15.2.2.1.2.18 MainResetCallbackRegister

void(* MainResetCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_MainResetCallbackRegister.

2.15.2.2.1.2.19 ProtocolCallbackRegister

void(* ProtocolCallbackRegister) (enum MAIN_CORE_PROTOCOLS protocolName, void(*handler)(void))

Pointer to MAIN_CORE_ProtocolCallbackRegister.

2.15.2.2.1.2.20 ProtocolIsEmpty

bool(* ProtocolIsEmpty) (enum MAIN_CORE_PROTOCOLS protocolName)

Pointer to MAIN_CORE_ProtocolIsEmpty.

2.15.2.2.1.2.21 ProtocolIsFull

bool(* ProtocolIsFull) (enum MAIN_CORE_PROTOCOLS protocolName)

Pointer to MAIN_CORE_ProtocolIsFull.

2.15.2.2.1.2.22 ProtocolRead

bool(* ProtocolRead) (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t *pData)

Pointer to MAIN_CORE_ProtocolRead.

2.15.2.2.1.2.23 ProtocolWrite

bool(* ProtocolWrite) (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t *pData)

Pointer to MAIN_CORE_ProtocolRead.

2.15.2.2.1.2.24 ReadFIFODataReadyCallbackRegister

void(* ReadFIFODataReadyCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_ReadFIFODataReadyCallbackRegister.

2.15.2.2.1.2.25 SystemStatusGet

enum MAIN_CORE_SYSTEM_STATUS(* SystemStatusGet) (void)

Pointer to MAIN_CORE_SystemStatusGet.

2.15.2.2.1.2.26 WriteFIFOEmptyCallbackRegister

void(* WriteFIFOEmptyCallbackRegister) (void(*handler)(void))

Pointer to MAIN_CORE_WriteFIFOEmptyCallbackRegister.

2.15.2.3 File Documentation

2.15.2.3.1 source/main_core.h File Reference

This is the generated driver header file for the MAIN_CORE driver.

#include <xc.h>
#include <stdint.h>
#include <stdbool.h>
#include "main_core_types.h"
#include "main_core_interface.h"
2.15.2.3.1.1 Functions
2.15.2.3.1.2 Variables
  • const struct MAIN_CORE_INTERFACE MSIInterface

    Structure object of type MAIN_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Main_Core can be changed by the user in the MAIN_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.2.3.1.3 Detailed Description

This is the generated driver header file for the MAIN_CORE driver.

MAIN_CORE Generated Driver Header File

2.15.2.3.2 source/main_core_interface.h File Reference

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "main_core_types.h"
2.15.2.3.2.1 Data structures
2.15.2.3.2.2 Detailed Description

MAIN_CORE Generated Driver Interface Header File

2.15.2.3.3 source/main_core_types.h File Reference

This is the generated driver types header file for the MAIN_CORE driver.

2.15.2.3.3.1 Enumerations
2.15.2.3.3.2 Detailed Description

This is the generated driver types header file for the MAIN_CORE driver.

MAIN_CORE Generated Driver Types Header File

2.15.3 Secondary Core Driver

2.15.3.1 Module Documentation

2.15.3.1.1 MSI-Secondary Core Driver

2.15.3.1.1.1 Module description

This is the generated driver interface file for SEC_CORE driver.

2.15.3.1.1.1.1 Data structures
2.15.3.1.1.1.2 Enumerations
2.15.3.1.1.1.3 Functions
2.15.3.1.1.1.4 Variables
  • const struct SEC_CORE_INTERFACE MSIInterface

    Structure object of type SEC_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Secondary1 can be changed by the user in the SEC_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.3.1.1.2 Function Documentation
2.15.3.1.1.2.1 SEC_CORE1_Deinitialize()

void SEC_CORE1_Deinitialize (void )

Deinitializes SEC_CORE1 to POR values.

Parameters:
none
Returns:

none

2.15.3.1.1.2.2 SEC_CORE1_FIFOOverFLowUnderFlowCallback()

void SEC_CORE1_FIFOOverFLowUnderFlowCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_FIFOOverFLowUnderFlowCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.3 SEC_CORE1_FIFOOverFLowUnderFlowCallbackRegister()

void SEC_CORE1_FIFOOverFLowUnderFlowCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 FIFOOverFLowUnderFlow event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.4 SEC_CORE1_FIFORead()

uint16_t SEC_CORE1_FIFORead (uint16_t * pData, uint16_t wordCount)

This routine reads FIFO data sent from the SEC_CORE1.

Precondition:

SEC_CORE1_ReadFIFOEnable should be called before calling this routine.

Parameters:
in *pData

- Pointer to an array to store the read data

in wordCount

- Number of words to be read.  

Returns:

Number of words read.  

2.15.3.1.1.2.5 SEC_CORE1_FIFOReadIsEmpty()

inline static bool SEC_CORE1_FIFOReadIsEmpty (void )

This inline function checks whether the status of Read FIFO is Empty. Returns true if last read by Main core from Read FIFO (RFDATA) emptied the FIFO of all valid data or FIFO is disabled (and initialized to the empty state)

Returns:
2.15.3.1.1.2.6 SEC_CORE1_FIFOReadIsFull()

inline static bool SEC_CORE1_FIFOReadIsFull (void )

This inline function checks whether the status of Read FIFO is full. last write by Secondary core to Read FIFO (RFDATA) was into the last free location.

Returns:
2.15.3.1.1.2.7 SEC_CORE1_FIFOWrite()

uint16_t SEC_CORE1_FIFOWrite (uint16_t * pData, uint16_t wordCount)

This routine transfers FIFO data to SEC_CORE1.

Precondition:

SEC_CORE1_WriteFIFOEnable() should be called before calling this routine.

Parameters:
in *pData

- Pointer to an array which has data for transmission.

in wordCount

- Number of words to be transfer.  

Returns:

Number of words transferred.  

2.15.3.1.1.2.8 SEC_CORE1_FIFOWriteIsEmpty()

inline static bool SEC_CORE1_FIFOWriteIsEmpty (void )

This inline function checks whether the status of Write FIFO is Empty. Returns true if last write by Main core to Write FIFO (WFDATA) was into the last free location.

Returns:
2.15.3.1.1.2.9 SEC_CORE1_FIFOWriteIsFull()

inline static bool SEC_CORE1_FIFOWriteIsFull (void )

This inline function checks whether the status of Write FIFO is Full. Returns true if last write by Main core to Write FIFO (WFDATA) was into the last free location.

Returns:
2.15.3.1.1.2.10 SEC_CORE1_GetResetCause()

enum SEC_CORE_RESET_CAUSE SEC_CORE1_GetResetCause (void )

This routine returns the cause for SEC_CORE1 reset.

Parameters:
none
Returns:

SECONDARY_RESET_CAUSE: Enum which provides the cause for SEC_CORE1 reset.  

2.15.3.1.1.2.11 SEC_CORE1_Initialize()

void SEC_CORE1_Initialize (void )

This routine initializes the MSI driver. This routine must be called before any other MSI routine is called. This routine should only be called once during system initialization.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.12 SEC_CORE1_InterruptRequestAcknowledge()

void SEC_CORE1_InterruptRequestAcknowledge (void )

This routine acknowledges interrupt received from SEC_CORE1.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.13 SEC_CORE1_InterruptRequestAcknowledgeComplete()

void SEC_CORE1_InterruptRequestAcknowledgeComplete (void )

This routine clears acknowledge for interrupt received from SEC_CORE1.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.14 SEC_CORE1_InterruptRequestComplete()

void SEC_CORE1_InterruptRequestComplete (void )

This routine clears interrupt to SEC_CORE1.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.15 SEC_CORE1_InterruptRequestGenerate()

void SEC_CORE1_InterruptRequestGenerate (void )

This routine generates interrupt to SEC_CORE1.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.16 SEC_CORE1_IsInterruptRequestAcknowledged()

bool SEC_CORE1_IsInterruptRequestAcknowledged (void )

This routine returns the status of interrupt request acknowledge from the SEC_CORE1.

Parameters:
none
Returns:

True - when SEC_CORE1 has acknowledged Main MSI interrupt request.

False - when SEC_CORE1 has not acknowledged Main MSI interrupt request.  

2.15.3.1.1.2.17 SEC_CORE1_IsInterruptRequested()

bool SEC_CORE1_IsInterruptRequested (void )

This routine returns the status of interrupt request from the SEC_CORE1.

Parameters:
none
Returns:

True - when SEC_CORE1 has issued interrupt to Main Core.

False - when SEC_CORE1 has not issued interrupt to Main Core.  

2.15.3.1.1.2.18 SEC_CORE1_MSI1_ProtocolACallback()

void SEC_CORE1_MSI1_ProtocolACallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_MSI1_ProtocolACallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.19 SEC_CORE1_MSI1_ProtocolBCallback()

void SEC_CORE1_MSI1_ProtocolBCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_MSI1_ProtocolBCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.20 SEC_CORE1_Program()

void SEC_CORE1_Program (void )

This routine programs secondary.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.21 SEC_CORE1_ProtocolCallbackRegister()

void SEC_CORE1_ProtocolCallbackRegister (enum SEC_CORE_PROTOCOLS protocolName, void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 protocol event.

Parameters:
in protocolName

- Selected protocol

in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.22 SEC_CORE1_ProtocolIsEmpty()

inline static bool SEC_CORE1_ProtocolIsEmpty (enum SEC_CORE_PROTOCOLS protocolName)

This inline function checks whether mailbox is empty. Returns true if Protocol is empty indicating mailbox is ready to write by secondary. Returns false indicating write operation cannot be performed by secondary.

Parameters:
in protocolName

- Selected protocol

Returns:

true - Mailbox is empty

false - Mailbox is full

2.15.3.1.1.2.23 SEC_CORE1_ProtocolIsFull()

inline static bool SEC_CORE1_ProtocolIsFull (enum SEC_CORE_PROTOCOLS protocolName)

This inline function checks whether mailbox is full. Returns true if new data are ready to read. Returns false when no data are available to be read by secondary.

Parameters:
in protocolName

- Selected protocol

Returns:

true - Mailbox is full

false - Mailbox is empty

2.15.3.1.1.2.24 SEC_CORE1_ProtocolRead()

bool SEC_CORE1_ProtocolRead (enum SEC_CORE_PROTOCOLS protocolName, uint16_t * pData)

This routine reads data from mailbox.

Parameters:
in protocolName

- Selected protocol

in *pData

- Pointer to a structure to store the read data  

Returns:

true - successful read

false - unsuccessful read  

2.15.3.1.1.2.25 SEC_CORE1_ProtocolWrite()

bool SEC_CORE1_ProtocolWrite (enum SEC_CORE_PROTOCOLS protocolName, uint16_t * pData)

This routine writes data to mailbox.

Parameters:
in protocolName

- Selected protocol

in *pData

- Pointer to a structure which has data for transmission.  

Returns:

true - successful write

false - unsuccessful write  

2.15.3.1.1.2.26 SEC_CORE1_ReadFIFODataReadyCallback()

void SEC_CORE1_ReadFIFODataReadyCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_ReadFIFODataReadyCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.27 SEC_CORE1_ReadFIFODataReadyCallbackRegister()

void SEC_CORE1_ReadFIFODataReadyCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 ReadFIFODataReady event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.28 SEC_CORE1_ReadFIFODisable()

inline static void SEC_CORE1_ReadFIFODisable (void )

This inline function Disables the Read FIFO.

Parameters:
none
Returns:

none

2.15.3.1.1.2.29 SEC_CORE1_ReadFIFOEnable()

inline static void SEC_CORE1_ReadFIFOEnable (void )

This inline function Enables the Read FIFO.

Parameters:
none
Returns:

none

2.15.3.1.1.2.30 SEC_CORE1_ResetCauseClear()

void SEC_CORE1_ResetCauseClear (enum SEC_CORE_RESET_CAUSE resetCause)

This routine clears the cause for SEC_CORE1 reset.

Precondition:

SECONDARY_RESET_CAUSE: Enum which provides the cause for SEC_CORE1 reset.

Parameters:
resetCause

- reset to be cleared

Returns:

none  

2.15.3.1.1.2.31 SEC_CORE1_SecondaryBreakCallback()

void SEC_CORE1_SecondaryBreakCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_SecondaryBreakCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.32 SEC_CORE1_SecondaryBreakCallbackRegister()

void SEC_CORE1_SecondaryBreakCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 SecondaryBreak event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.33 SEC_CORE1_SecondaryInitiatedCallback()

void SEC_CORE1_SecondaryInitiatedCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_SecondaryInitiatedCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.34 SEC_CORE1_SecondaryInitiatedCallbackRegister()

void SEC_CORE1_SecondaryInitiatedCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 SecondaryInitiated event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.35 SEC_CORE1_SecondaryResetCallback()

void SEC_CORE1_SecondaryResetCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_SecondaryResetCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.36 SEC_CORE1_SecondaryResetCallbackRegister()

void SEC_CORE1_SecondaryResetCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 SecondaryReset event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.37 SEC_CORE1_Start()

void SEC_CORE1_Start (void )

This routine enables secondary core.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.38 SEC_CORE1_SystemStatusGet()

enum SEC_CORE_SYSTEM_STATUS SEC_CORE1_SystemStatusGet (void )

This routine returns Secondary system status.

Parameters:
none
Returns:

SEC_CORE_SYSTEM_STATUS: Enum which provides the status of SEC_CORE1.  

2.15.3.1.1.2.39 SEC_CORE1_WriteFIFODisable()

inline static void SEC_CORE1_WriteFIFODisable (void )

This inline function Disables the Write FIFO.

Parameters:
none
Returns:

none

2.15.3.1.1.2.40 SEC_CORE1_WriteFIFOEmptyCallback()

void SEC_CORE1_WriteFIFOEmptyCallback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SEC_CORE1_WriteFIFOEmptyCallbackRegister.

Parameters:
none
Returns:

none  

2.15.3.1.1.2.41 SEC_CORE1_WriteFIFOEmptyCallbackRegister()

void SEC_CORE1_WriteFIFOEmptyCallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SEC_CORE1 WriteFIFOEmpty event.

Parameters:
in handler

- Address of the callback function.  

Returns:

none

2.15.3.1.1.2.42 SEC_CORE1_WriteFIFOEnable()

inline static void SEC_CORE1_WriteFIFOEnable (void )

This inline function Enables the Write FIFO.

Parameters:
none
Returns:

none

2.15.3.1.1.3 Enumeration Type Documentation
2.15.3.1.1.3.1 SEC_CORE_PROTOCOL_SIZE

enum SEC_CORE_PROTOCOL_SIZE

Defines the size for Protocols.

Note:

Size not required for the driver but will be required for application to create the buffers

MSI1_ProtocolA_SIZE

Size of ProtocolA in 16-bit word

MSI1_ProtocolB_SIZE

Size of ProtocolB in 16-bit word

2.15.3.1.1.3.2 SEC_CORE_PROTOCOLS

enum SEC_CORE_PROTOCOLS

Defines the list of Protocols configured for SEC_CORE_driver.

Note:

These Protocols are required to create the buffer by the application

MSI1_ProtocolA

Custom-name of ProtocolA for read operation only

MSI1_ProtocolB

Custom-name of ProtocolB for read operation only

2.15.3.1.1.3.3 SEC_CORE_RESET_CAUSE

enum SEC_CORE_RESET_CAUSE

Defines the sec_core reset cause enumeration.

SEC_CORE_RESET_CAUSE_WATCHDOG

sec_core reset caused from Watchdog Timer

SEC_CORE_RESET_CAUSE_UNSPECIFIED

sec_core reset cause is unspecified

2.15.3.1.1.3.4 SEC_CORE_SYSTEM_STATUS

enum SEC_CORE_SYSTEM_STATUS

Defines the status enumeration for sec_core.

SEC_CORE_SYSTEM_STATUS_NOT_IN_LOW_POWER_MODE

sec_core status is in Low power mode

SEC_CORE_SYSTEM_STATUS_SLEEP_MODE

sec_core status is in Sleep mode

SEC_CORE_SYSTEM_STATUS_IDLE_MODE

sec_core status is in Idle mode

SEC_CORE_SYSTEM_STATUS_RUNNING_STATE

sec_core status is in Running state

SEC_CORE_SYSTEM_STATUS_IN_RESET_STATE

sec_core status is in Reset state

2.15.3.1.1.4 Variable Documentation
2.15.3.1.1.4.1 MSIInterface

const struct SEC_CORE_INTERFACE MSIInterface

Structure object of type SEC_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Secondary1 can be changed by the user in the SEC_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.3.2 Class Documentation

2.15.3.2.1 SEC_CORE_INTERFACE Struct Reference

Structure containing the function pointers of SEC_CORE driver.

2.15.3.2.1.1 Detailed Description

Structure containing the function pointers of SEC_CORE driver.

#include <sec_core_interface.h>

2.15.3.2.1.1.1 Public Attributes
  • void(* Initialize )(void)

    Pointer to SEC_COREx_Initialize e.g. SEC_CORE1_Initialize.

  • void(* Deinitialize )(void)

    Pointer to SEC_COREx_Deinitialize e.g. SEC_CORE1_Deinitialize.

  • void(* Program )(void)

    Pointer to SEC_COREx_Program e.g. SEC_CORE1_Program.

  • void(* Start )(void)

    Pointer to SEC_COREx_Start e.g. SEC_CORE1_Start.

  • void(* InterruptRequestGenerate )(void)

    Pointer to SEC_COREx_InterruptRequestGenerate e.g. SEC_CORE1_InterruptRequestGenerate.

  • bool(* IsInterruptRequestAcknowledged )(void)

    Pointer to SEC_COREx_IsInterruptRequestAcknowledged e.g. SEC_CORE1_IsInterruptRequestAcknowledged.

  • void(* InterruptRequestComplete )(void)

    Pointer to SEC_COREx_InterruptRequestComplete e.g. SEC_CORE1_InterruptRequestComplete.

  • bool(* IsInterruptRequested )(void)

    Pointer to SEC_COREx_IsInterruptRequested e.g. SEC_CORE1_IsInterruptRequested.

  • void(* InterruptRequestAcknowledge )(void)

    Pointer to SEC_COREx_InterruptRequestAcknowledge e.g. SEC_CORE1_InterruptRequestAcknowledge.

  • void(* InterruptRequestAcknowledgeComplete )(void)

    Pointer to SEC_COREx_InterruptRequestAcknowledgeComplete e.g. SEC_CORE1_InterruptRequestAcknowledgeComplete.

  • enum SEC_CORE_RESET_CAUSE(* GetResetCause )(void)

    Pointer to SEC_COREx_GetResetCause e.g. SEC_CORE1_GetResetCause.

  • void(* ResetCauseClear )(enum SEC_CORE_RESET_CAUSE resetCause)

    Pointer to SEC_COREx_ResetCauseClear e.g. SEC_CORE1_ResetCauseClear.

  • enum SEC_CORE_SYSTEM_STATUS(* SystemStatusGet )(void)

    Pointer to SEC_COREx_SystemStatusGet e.g. SEC_CORE1_SystemStatusGet.

  • void(* WriteFIFOEnable )(void)

    Pointer to SEC_COREx_WriteFIFOEnable e.g. SEC_CORE1_WriteFIFOEnable.

  • void(* WriteFIFODisable )(void)

    Pointer to SEC_COREx_WriteFIFODisable e.g. SEC_CORE1_WriteFIFODisable.

  • void(* ReadFIFOEnable )(void)

    Pointer to SEC_COREx_ReadFIFOEnable e.g. SEC_CORE1_ReadFIFOEnable.

  • void(* ReadFIFODisable )(void)

    Pointer to SEC_COREx_ReadFIFODisable e.g. SEC_CORE1_ReadFIFODisable.

  • uint16_t(* FIFORead )(uint16_t *pData, uint16_t wordCount)

    Pointer to SEC_COREx_FIFORead e.g. SEC_CORE1_FIFORead.

  • uint16_t(* FIFOWrite )(uint16_t *pData, uint16_t wordCount)

    Pointer to SEC_COREx_FIFOWrite e.g. SEC_CORE1_FIFOWrite.

  • bool(* FIFOReadIsFull )(void)

    Pointer to SEC_COREx_FIFOReadIsFull e.g. SEC_CORE1_FIFOReadIsFull.

  • bool(* FIFOReadIsEmpty )(void)

    Pointer to SEC_COREx_FIFOReadIsEmpty e.g. SEC_CORE1_FIFOReadIsEmpty.

  • bool(* FIFOWriteIsFull )(void)

    Pointer to SEC_COREx_FIFOWriteIsFull e.g. SEC_CORE1_FIFOWriteIsFull.

  • bool(* FIFOWriteIsEmpty )(void)

    Pointer to SEC_COREx_FIFOWriteIsEmpty e.g. SEC_CORE1_FIFOWriteIsEmpty.

  • bool(* ProtocolRead )(enum SEC_CORE_PROTOCOLS protocolName, uint16_t *pData)

    Pointer to SEC_COREx_ProtocolRead e.g. SEC_CORE1_ProtocolRead.

  • bool(* ProtocolWrite )(enum SEC_CORE_PROTOCOLS protocolName, uint16_t *pData)

    Pointer to SEC_COREx_ProtocolRead e.g. SEC_CORE1_ProtocolRead.

  • bool(* ProtocolIsFull )(enum SEC_CORE_PROTOCOLS protocolName)

    Pointer to SEC_COREx_ProtocolIsFull e.g. SEC_CORE1_ProtocolIsFull.

  • bool(* ProtocolIsEmpty )(enum SEC_CORE_PROTOCOLS protocolName)

    Pointer to SEC_COREx_ProtocolIsEmpty e.g. SEC_CORE1_ProtocolIsEmpty.

  • void(* ProtocolCallbackRegister )(enum SEC_CORE_PROTOCOLS protocolName, void(*handler)(void))

    Pointer to SEC_COREx_ProtocolCallbackRegister e.g. SEC_CORE1_ProtocolCallbackRegister.

  • void(* ReadFIFODataReadyCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_ReadFIFODataReadyCallbackRegister e.g. SEC_CORE1_ReadFIFODataReadyCallbackRegister.

  • void(* WriteFIFOEmptyCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_WriteFIFOEmptyCallbackRegister e.g. SEC_CORE1_WriteFIFOEmptyCallbackRegister.

  • void(* FIFOOverFLowUnderFlowCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_FIFOOverFLowUnderFlowCallbackRegister e.g. SEC_CORE1_FIFOOverFLowUnderFlowCallbackRegister.

  • void(* SecondaryInitiatedCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_SecondaryInitiatedCallbackRegister e.g. SEC_CORE1_SecondaryInitiatedCallbackRegister.

  • void(* SecondaryBreakCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_SecondaryBreakCallbackRegister e.g. SEC_CORE1_SecondaryBreakCallbackRegister.

  • void(* SecondaryResetCallbackRegister )(void(*handler)(void))

    Pointer to SEC_COREx_SecondaryResetCallbackRegister e.g. SEC_CORE1_SecondaryResetCallbackRegister.

2.15.3.2.1.2 Member Data Documentation

The documentation for this struct was generated from the following file:

source/

sec_core_interface.h

2.15.3.2.1.2.1 Deinitialize

void(* Deinitialize) (void)

Pointer to SEC_COREx_Deinitialize e.g. SEC_CORE1_Deinitialize.

2.15.3.2.1.2.2 FIFOOverFLowUnderFlowCallbackRegister

void(* FIFOOverFLowUnderFlowCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_FIFOOverFLowUnderFlowCallbackRegister e.g. SEC_CORE1_FIFOOverFLowUnderFlowCallbackRegister.

2.15.3.2.1.2.3 FIFORead

uint16_t(* FIFORead) (uint16_t *pData, uint16_t wordCount)

Pointer to SEC_COREx_FIFORead e.g. SEC_CORE1_FIFORead.

2.15.3.2.1.2.4 FIFOReadIsEmpty

bool(* FIFOReadIsEmpty) (void)

Pointer to SEC_COREx_FIFOReadIsEmpty e.g. SEC_CORE1_FIFOReadIsEmpty.

2.15.3.2.1.2.5 FIFOReadIsFull

bool(* FIFOReadIsFull) (void)

Pointer to SEC_COREx_FIFOReadIsFull e.g. SEC_CORE1_FIFOReadIsFull.

2.15.3.2.1.2.6 FIFOWrite

uint16_t(* FIFOWrite) (uint16_t *pData, uint16_t wordCount)

Pointer to SEC_COREx_FIFOWrite e.g. SEC_CORE1_FIFOWrite.

2.15.3.2.1.2.7 FIFOWriteIsEmpty

bool(* FIFOWriteIsEmpty) (void)

Pointer to SEC_COREx_FIFOWriteIsEmpty e.g. SEC_CORE1_FIFOWriteIsEmpty.

2.15.3.2.1.2.8 FIFOWriteIsFull

bool(* FIFOWriteIsFull) (void)

Pointer to SEC_COREx_FIFOWriteIsFull e.g. SEC_CORE1_FIFOWriteIsFull.

2.15.3.2.1.2.9 GetResetCause

enum SEC_CORE_RESET_CAUSE(* GetResetCause) (void)

Pointer to SEC_COREx_GetResetCause e.g. SEC_CORE1_GetResetCause.

2.15.3.2.1.2.10 Initialize

void(* Initialize) (void)

Pointer to SEC_COREx_Initialize e.g. SEC_CORE1_Initialize.

2.15.3.2.1.2.11 InterruptRequestAcknowledge

void(* InterruptRequestAcknowledge) (void)

Pointer to SEC_COREx_InterruptRequestAcknowledge e.g. SEC_CORE1_InterruptRequestAcknowledge.

2.15.3.2.1.2.12 InterruptRequestAcknowledgeComplete

void(* InterruptRequestAcknowledgeComplete) (void)

Pointer to SEC_COREx_InterruptRequestAcknowledgeComplete e.g. SEC_CORE1_InterruptRequestAcknowledgeComplete.

2.15.3.2.1.2.13 InterruptRequestComplete

void(* InterruptRequestComplete) (void)

Pointer to SEC_COREx_InterruptRequestComplete e.g. SEC_CORE1_InterruptRequestComplete.

2.15.3.2.1.2.14 InterruptRequestGenerate

void(* InterruptRequestGenerate) (void)

Pointer to SEC_COREx_InterruptRequestGenerate e.g. SEC_CORE1_InterruptRequestGenerate.

2.15.3.2.1.2.15 IsInterruptRequestAcknowledged

bool(* IsInterruptRequestAcknowledged) (void)

Pointer to SEC_COREx_IsInterruptRequestAcknowledged e.g. SEC_CORE1_IsInterruptRequestAcknowledged.

2.15.3.2.1.2.16 IsInterruptRequested

bool(* IsInterruptRequested) (void)

Pointer to SEC_COREx_IsInterruptRequested e.g. SEC_CORE1_IsInterruptRequested.

2.15.3.2.1.2.17 Program

void(* Program) (void)

Pointer to SEC_COREx_Program e.g. SEC_CORE1_Program.

2.15.3.2.1.2.18 ProtocolCallbackRegister

void(* ProtocolCallbackRegister) (enum SEC_CORE_PROTOCOLS protocolName, void(*handler)(void))

Pointer to SEC_COREx_ProtocolCallbackRegister e.g. SEC_CORE1_ProtocolCallbackRegister.

2.15.3.2.1.2.19 ProtocolIsEmpty

bool(* ProtocolIsEmpty) (enum SEC_CORE_PROTOCOLS protocolName)

Pointer to SEC_COREx_ProtocolIsEmpty e.g. SEC_CORE1_ProtocolIsEmpty.

2.15.3.2.1.2.20 ProtocolIsFull

bool(* ProtocolIsFull) (enum SEC_CORE_PROTOCOLS protocolName)

Pointer to SEC_COREx_ProtocolIsFull e.g. SEC_CORE1_ProtocolIsFull.

2.15.3.2.1.2.21 ProtocolRead

bool(* ProtocolRead) (enum SEC_CORE_PROTOCOLS protocolName, uint16_t *pData)

Pointer to SEC_COREx_ProtocolRead e.g. SEC_CORE1_ProtocolRead.

2.15.3.2.1.2.22 ProtocolWrite

bool(* ProtocolWrite) (enum SEC_CORE_PROTOCOLS protocolName, uint16_t *pData)

Pointer to SEC_COREx_ProtocolRead e.g. SEC_CORE1_ProtocolRead.

2.15.3.2.1.2.23 ReadFIFODataReadyCallbackRegister

void(* ReadFIFODataReadyCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_ReadFIFODataReadyCallbackRegister e.g. SEC_CORE1_ReadFIFODataReadyCallbackRegister.

2.15.3.2.1.2.24 ReadFIFODisable

void(* ReadFIFODisable) (void)

Pointer to SEC_COREx_ReadFIFODisable e.g. SEC_CORE1_ReadFIFODisable.

2.15.3.2.1.2.25 ReadFIFOEnable

void(* ReadFIFOEnable) (void)

Pointer to SEC_COREx_ReadFIFOEnable e.g. SEC_CORE1_ReadFIFOEnable.

2.15.3.2.1.2.26 ResetCauseClear

void(* ResetCauseClear) (enum SEC_CORE_RESET_CAUSE resetCause)

Pointer to SEC_COREx_ResetCauseClear e.g. SEC_CORE1_ResetCauseClear.

2.15.3.2.1.2.27 SecondaryBreakCallbackRegister

void(* SecondaryBreakCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_SecondaryBreakCallbackRegister e.g. SEC_CORE1_SecondaryBreakCallbackRegister.

2.15.3.2.1.2.28 SecondaryInitiatedCallbackRegister

void(* SecondaryInitiatedCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_SecondaryInitiatedCallbackRegister e.g. SEC_CORE1_SecondaryInitiatedCallbackRegister.

2.15.3.2.1.2.29 SecondaryResetCallbackRegister

void(* SecondaryResetCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_SecondaryResetCallbackRegister e.g. SEC_CORE1_SecondaryResetCallbackRegister.

2.15.3.2.1.2.30 Start

void(* Start) (void)

Pointer to SEC_COREx_Start e.g. SEC_CORE1_Start.

2.15.3.2.1.2.31 SystemStatusGet

enum SEC_CORE_SYSTEM_STATUS(* SystemStatusGet) (void)

Pointer to SEC_COREx_SystemStatusGet e.g. SEC_CORE1_SystemStatusGet.

2.15.3.2.1.2.32 WriteFIFODisable

void(* WriteFIFODisable) (void)

Pointer to SEC_COREx_WriteFIFODisable e.g. SEC_CORE1_WriteFIFODisable.

2.15.3.2.1.2.33 WriteFIFOEmptyCallbackRegister

void(* WriteFIFOEmptyCallbackRegister) (void(*handler)(void))

Pointer to SEC_COREx_WriteFIFOEmptyCallbackRegister e.g. SEC_CORE1_WriteFIFOEmptyCallbackRegister.

2.15.3.2.1.2.34 WriteFIFOEnable

void(* WriteFIFOEnable) (void)

Pointer to SEC_COREx_WriteFIFOEnable e.g. SEC_CORE1_WriteFIFOEnable.

2.15.3.3 File Documentation

2.15.3.3.1 source/sec_core1.h File Reference

This is the generated driver header file for the SEC_CORE1 driver.

#include <xc.h>
#include <stdint.h>
#include <stdbool.h>
#include "sec_core_types.h"
#include "sec_core_interface.h"
2.15.3.3.1.1 Functions
2.15.3.3.1.2 Variables
  • const struct SEC_CORE_INTERFACE MSIInterface

    Structure object of type SEC_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Secondary1 can be changed by the user in the SEC_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.15.3.3.1.3 Detailed Description

This is the generated driver header file for the SEC_CORE1 driver.

SEC_CORE1 Generated Driver Header File

2.15.3.3.2 source/sec_core_interface.h File Reference

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "sec_core_types.h"
2.15.3.3.2.1 Data structures
2.15.3.3.2.2 Detailed Description

SEC_CORE Generated Driver Interface Header File

2.15.3.3.3 source/sec_core_types.h File Reference

This is the generated driver types header file for the SEC_CORE driver.

2.15.3.3.3.1 Enumerations
2.15.3.3.3.2 Detailed Description

This is the generated driver types header file for the SEC_CORE driver.

SEC_CORE Generated Driver Types Header File