Multicore Manager (MCMGR) User's Guide  Rev. 2.0.1
NXP Semiconductors
MCMGR API

This section describes the Multicore Manager component API. More...

Overview

This section describes the Multicore Manager component API.

Macros

#define MCMGR_NO_STARTUP_DATA   (0)
 To be used with MCMGR_StartCore function, when no data should be sent.
 

Typedefs

typedef enum _mcmgr_status mcmgr_status_t
 Enumeration that defines MCMGR function return status codes.
 
typedef enum _mcmgr_boot_source mcmgr_boot_source_t
 Enumeration that defines a boot source address for non-primary cores.
 
typedef enum _mcmgr_core_property mcmgr_core_property_t
 Enumeration that defines property of core.
 
typedef enum _mcmgr_core_status mcmgr_core_status_t
 Enumeration that defines property value of core status.
 
typedef enum _mcmgr_core_type mcmgr_core_type_t
 Enumeration that defines property value of core type.
 
typedef enum _mcmgr_src_addr mcmgr_src_addr_t
 Enumeration that defines source address of the app image.
 
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.
 

Enumerations

enum  _mcmgr_status {
  kStatus_MCMGR_Success,
  kStatus_MCMGR_Error,
  kStatus_MCMGR_NotImplemented
}
 Enumeration that defines MCMGR function return status codes. More...
 
enum  _mcmgr_boot_source {
  kMCMGR_BootZero,
  kMCMGR_BootDmem,
  kMCMGR_BootImem
}
 Enumeration that defines a boot source address for non-primary cores. More...
 
enum  _mcmgr_core_property {
  kMCMGR_CoreStatus,
  kMCMGR_CoreType,
  kMCMGR_CorePowerMode
}
 Enumeration that defines property of core. More...
 
enum  _mcmgr_core_status {
  kMCMGR_InReset,
  kMCMGR_NotInReset
}
 Enumeration that defines property value of core status. More...
 
enum  _mcmgr_core_type {
  kMCMGR_CoreTypeCortexM0,
  kMCMGR_CoreTypeCortexM0Plus,
  kMCMGR_CoreTypeCortexM4
}
 Enumeration that defines property value of core type. More...
 
enum  _mcmgr_src_addr {
  kMCMGR_SrcAddrFile,
  kMCMGR_SrcAddr
}
 Enumeration that defines source address of the app image. 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_version_enum { kMCMGR_Version = 0x00020001 }
 Version of MCMGR. More...
 

Functions

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 (mcmgr_core_t coreNum, uint32_t *startupData)
 Get startup data for the slave core. More...
 
mcmgr_status_t MCMGR_SignalReady (mcmgr_core_t coreNum)
 Signal to the master core, that we are ready. More...
 
mcmgr_status_t MCMGR_StopCore (mcmgr_core_t coreNum)
 Stop a selected core. More...
 
mcmgr_status_t MCMGR_LoadApp (mcmgr_core_t coreNum, void *srcAddr, mcmgr_src_addr_t srcAddrType)
 Load App image to RAM. More...
 
int32_t MCMGR_GetVersion (void)
 Get version of MCMGR. More...
 
mcmgr_status_t MCMGR_MapAddress (void *inAddress, void **outAddress, mcmgr_core_t srcCore, mcmgr_core_t destCore)
 Map address between two address spaces. 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...
 

Enumeration Type Documentation

Enumeration that defines a boot source address for non-primary cores.

Enumerator
kMCMGR_BootZero 

Boot from 0x0.

kMCMGR_BootDmem 

Boot from DMEM Base.

kMCMGR_BootImem 

Boot from IMEM Base.

Enumeration that defines core.

Enumerator
kMCMGR_Core0 

Enum value for Core 0.

kMCMGR_Core1 

Enum value for Core 1.

Enumeration that defines property of core.

Enumerator
kMCMGR_CoreStatus 

Status of Core.

kMCMGR_CoreType 

Type of Core.

kMCMGR_CorePowerMode 

Power Mode of Core.

Enumeration that defines property value of core status.

Enumerator
kMCMGR_InReset 

Core is holded in reset.

kMCMGR_NotInReset 

Core in not in reset.

Enumeration that defines property value of core type.

Enumerator
kMCMGR_CoreTypeCortexM0 

Cortex M0.

kMCMGR_CoreTypeCortexM0Plus 

Cortex M0+.

kMCMGR_CoreTypeCortexM4 

Cortex M4.

Enumeration that defines source address of the app image.

Enumerator
kMCMGR_SrcAddrFile 

Address of file.

kMCMGR_SrcAddr 

Address of memory.

Enumeration that defines start type.

Enumerator
kMCMGR_Start_Synchronous 

Enum value for starting synchronously.

kMCMGR_Start_Asynchronous 

Enum value for starting asynchronously.

Enumeration that defines MCMGR function return status codes.

Enumerator
kStatus_MCMGR_Success 

Operation was success.

kStatus_MCMGR_Error 

Operation was not success.

kStatus_MCMGR_NotImplemented 

Function is not implemented.

Version of MCMGR.

Version 1.0.0, for version 1.2.3 it will be 0x00010203

Function Documentation

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

Returns
the count of cores in a 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.

Parameters
[in]coreNumEnum of core
[in]propertyRequested property type
[in,out]valueParameter for value of property
[in,out]lengthParameter for size of property value in bytes
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.
mcmgr_core_t MCMGR_GetCurrentCore ( void  )

Get current CPU core.

This function returns enum of current core.

Returns
Enum of current core
mcmgr_status_t MCMGR_GetStartupData ( mcmgr_core_t  coreNum,
uint32_t *  startupData 
)

Get startup data for the slave core.

This function read startup data provided by the master core. Use only on startup.

Parameters
[in]coreNumCurrent core number
[out]startupDataData to read by this function
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure
int32_t MCMGR_GetVersion ( void  )

Get version of MCMGR.

This function returns a number of MCMGR version.

Returns
a number of MCMGR version
mcmgr_status_t MCMGR_Init ( void  )

Initialize the multicore manager.

Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.
mcmgr_status_t MCMGR_LoadApp ( mcmgr_core_t  coreNum,
void *  srcAddr,
mcmgr_src_addr_t  srcAddrType 
)

Load App image to RAM.

This function copies the app image from a specified location (flash, SD card, NAND flash) to the RAM of the secondary core.

Parameters
[in]coreNumEnum of core
[in]srcAddrStart address of the app image
[in]srcAddrTypeType of source address
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.
mcmgr_status_t MCMGR_MapAddress ( void *  inAddress,
void **  outAddress,
mcmgr_core_t  srcCore,
mcmgr_core_t  destCore 
)

Map address between two address spaces.

This function maps address between memory regions that may have different addresses for each core.

Parameters
[in]inAddressAddress from source core's address space
[out]outAddressOutput address from destination core's address space
[in]srcCoreDefines address space of one core
[in]destCoreDefines address space of second core
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.
mcmgr_status_t MCMGR_SignalReady ( mcmgr_core_t  coreNum)

Signal to the master core, that we are ready.

This function signals to the master core, that it is ready.

Parameters
[in]coreNumCurrent core number
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure
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.

Parameters
[in]coreNumEnum of the core to be started.
[in]bootAddressBoot address of the core to be started application.
[in]startupDataData which can be get by the other core on startup
[in]modeStart mode, synchronous or asynchronous
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.
mcmgr_status_t MCMGR_StopCore ( mcmgr_core_t  coreNum)

Stop a selected core.

This function causes a selected core to halt code execution.

Parameters
[in]coreNumEnum of core to be stopped.
Returns
kStatus_MCMGR_Success on success or kStatus_MCMGR_Error on failure.