![]() |
Multicore Manager (MCMGR) User's Guide
Rev. 2.0.1
NXP Semiconductors
|
This section describes the Multicore Manager component API. More...
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... | |
| enum _mcmgr_boot_source |
| enum _mcmgr_core |
| enum _mcmgr_core_property |
| enum _mcmgr_core_status |
| enum _mcmgr_core_type |
| enum _mcmgr_src_addr |
| 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
| 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 | ( | 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.
| [in] | coreNum | Current core number |
| [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.
| 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.
| [in] | coreNum | Enum of core |
| [in] | srcAddr | Start address of the app image |
| [in] | srcAddrType | Type of source address |
| 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.
| [in] | inAddress | Address from source core's address space |
| [out] | outAddress | Output address from destination core's address space |
| [in] | srcCore | Defines address space of one core |
| [in] | destCore | Defines address space of second core |
| 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.
| [in] | coreNum | Current core number |
| 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, synchronous or asynchronous |
| 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. |