![]() |
Multicore Manager (MCMGR) User's Guide
Rev. 4.0.3
NXP Semiconductors
|
This section describes the Multicore Manager component API. More...
This section describes the Multicore Manager component API.
Macros | |
#define | MCMGR_HANDLE_EXCEPTIONS (0) |
Set to 1 to enable exception handling. | |
Typedefs | |
typedef enum _mcmgr_status | mcmgr_status_t |
Enumeration that defines MCMGR function return status codes. | |
typedef enum _mcmgr_core_property | mcmgr_core_property_t |
Enumeration that defines property of core. | |
typedef enum _mcmgr_core_type | mcmgr_core_type_t |
Enumeration that defines property value of core type. | |
typedef enum _mcmgr_core | mcmgr_core_t |
Enumeration that defines core. | |
typedef enum _mcmgr_start_mode | mcmgr_start_mode_t |
Enumeration that defines start type. | |
typedef enum _mcmgr_event_type_t | mcmgr_event_type_t |
Type definition of event types. | |
typedef void(* | mcmgr_event_callback_t) (uint16_t data, void *context) |
Type definition of event callback function pointer. | |
Enumerations | |
enum | _mcmgr_status { kStatus_MCMGR_Success, kStatus_MCMGR_Error, kStatus_MCMGR_NotImplemented, kStatus_MCMGR_NotReady } |
Enumeration that defines MCMGR function return status codes. More... | |
enum | _mcmgr_core_property { kMCMGR_CoreStatus, kMCMGR_CoreType, kMCMGR_CorePowerMode } |
Enumeration that defines property of core. More... | |
enum | _mcmgr_core_type { kMCMGR_CoreTypeCortexM0, kMCMGR_CoreTypeCortexM0Plus, kMCMGR_CoreTypeCortexM4, kMCMGR_CoreTypeCortexM33 } |
Enumeration that defines property value of core type. More... | |
enum | _mcmgr_core { kMCMGR_Core0, kMCMGR_Core1 } |
Enumeration that defines core. More... | |
enum | _mcmgr_start_mode { kMCMGR_Start_Synchronous, kMCMGR_Start_Asynchronous } |
Enumeration that defines start type. More... | |
enum | _mcmgr_event_type_t { kMCMGR_RemoteCoreUpEvent = 1, kMCMGR_RemoteCoreDownEvent, kMCMGR_RemoteExceptionEvent, kMCMGR_StartupDataEvent, kMCMGR_FeedStartupDataEvent, kMCMGR_RemoteRPMsgEvent, kMCMGR_RemoteApplicationEvent, kMCMGR_EventTableLength } |
Type definition of event types. | |
enum | mcmgr_version_enum { kMCMGR_Version = 0x00040003 } |
Version of MCMGR. More... | |
Functions | |
mcmgr_status_t | MCMGR_EarlyInit (void) |
Initialize the multicore manager, early init. More... | |
mcmgr_status_t | MCMGR_Init (void) |
Initialize the multicore manager. More... | |
mcmgr_status_t | MCMGR_StartCore (mcmgr_core_t coreNum, void *bootAddress, uint32_t startupData, mcmgr_start_mode_t mode) |
Start a selected core. More... | |
mcmgr_status_t | MCMGR_GetStartupData (uint32_t *startupData) |
Get startup data for the slave core. More... | |
mcmgr_status_t | MCMGR_StopCore (mcmgr_core_t coreNum) |
Stop a selected core. More... | |
int32_t | MCMGR_GetVersion (void) |
Get version of MCMGR. More... | |
mcmgr_status_t | MCMGR_GetCoreProperty (mcmgr_core_t coreNum, mcmgr_core_property_t property, void *value, uint32_t *length) |
Get property of the CPU core. More... | |
uint32_t | MCMGR_GetCoreCount (void) |
Return the count of cores in a multicore system. More... | |
mcmgr_core_t | MCMGR_GetCurrentCore (void) |
Get current CPU core. More... | |
mcmgr_status_t | MCMGR_RegisterEvent (mcmgr_event_type_t type, mcmgr_event_callback_t callback, void *callbackData) |
Register event handler. More... | |
mcmgr_status_t | MCMGR_TriggerEvent (mcmgr_event_type_t type, uint16_t eventData) |
Trigger event handler. More... | |
mcmgr_status_t | MCMGR_TriggerEventForce (mcmgr_event_type_t type, uint16_t eventData) |
Trigger event handler, force version. More... | |
enum _mcmgr_core |
enum _mcmgr_core_property |
enum _mcmgr_core_type |
enum _mcmgr_start_mode |
enum _mcmgr_status |
enum mcmgr_version_enum |
Version of MCMGR.
Version 1.0.0, for version 1.2.3 it will be 0x00010203
mcmgr_status_t MCMGR_EarlyInit | ( | void | ) |
Initialize the multicore manager, early init.
After calling this function, MCMGR_TriggerEvent() and/or MCMGR_Init() can be called.
uint32_t MCMGR_GetCoreCount | ( | void | ) |
Return the count of cores in a multicore system.
This function returns the count of cores in a multicore system.
mcmgr_status_t MCMGR_GetCoreProperty | ( | mcmgr_core_t | coreNum, |
mcmgr_core_property_t | property, | ||
void * | value, | ||
uint32_t * | length | ||
) |
Get property of the CPU core.
This function provides the property of the CPU core.
[in] | coreNum | Enum of core. |
[in] | property | Requested property type. |
[in,out] | value | Parameter for value of property. |
[in,out] | length | Parameter for size of property value in bytes. |
mcmgr_core_t MCMGR_GetCurrentCore | ( | void | ) |
Get current CPU core.
This function returns enum of current core.
mcmgr_status_t MCMGR_GetStartupData | ( | uint32_t * | startupData | ) |
Get startup data for the slave core.
This function read startup data provided by the master core. Use only on the slave core during the startup.
[out] | startupData | Data to read by this function. |
int32_t MCMGR_GetVersion | ( | void | ) |
Get version of MCMGR.
This function returns a number of MCMGR version.
mcmgr_status_t MCMGR_Init | ( | void | ) |
Initialize the multicore manager.
After calling this function, all API can be used.
mcmgr_status_t MCMGR_RegisterEvent | ( | mcmgr_event_type_t | type, |
mcmgr_event_callback_t | callback, | ||
void * | callbackData | ||
) |
Register event handler.
This function registers an event handler. for remote processor events handling.
[in] | type | Type of the event. |
[in] | callback | User callback. |
[in] | callbackData | Data/context for user callback. |
mcmgr_status_t MCMGR_StartCore | ( | mcmgr_core_t | coreNum, |
void * | bootAddress, | ||
uint32_t | startupData, | ||
mcmgr_start_mode_t | mode | ||
) |
Start a selected core.
This function causes a selected core to initialize and start the code execution. If the secondary core application boots from RAM, then there is a need to call the function, which copies this app. Image to RAM prior this function.
[in] | coreNum | Enum of the core to be started. |
[in] | bootAddress | Boot address of the core to be started application. |
[in] | startupData | Data which can be get by the other core on startup. |
[in] | mode | Start mode, use kMCMGR_Start_Synchronous for synchronous mode (wait until the core is started), kMCMGR_Start_Asynchronous for asynchronous mode (do not wait). |
mcmgr_status_t MCMGR_StopCore | ( | mcmgr_core_t | coreNum | ) |
Stop a selected core.
This function causes a selected core to halt code execution.
[in] | coreNum | Enum of core to be stopped. |
mcmgr_status_t MCMGR_TriggerEvent | ( | mcmgr_event_type_t | type, |
uint16_t | eventData | ||
) |
Trigger event handler.
This function triggers an event handler on the remote core.
[in] | type | Type of the event. |
[in] | eventData | Data to send to remote core. |
mcmgr_status_t MCMGR_TriggerEventForce | ( | mcmgr_event_type_t | type, |
uint16_t | eventData | ||
) |
Trigger event handler, force version.
This function triggers an event handler on the remote core, force version that does not check the consumption of previously sent data.
[in] | type | Type of the event. |
[in] | eventData | Data to send to remote core. |