MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
MCM API Specification

Overview

This section describes functions and macros of the driver's API.

Macros

#define MCM_SetMasterAttr(mask, attr, lock)
 Crossbar master access configuration and locking. More...
 
#define MCM_LoadPID(pid)
 Loads process ID register. More...
 
#define MCM_SfcCtrl(ctrl)
 Flash controller stalling control. More...
 
#define MCM_FcsCtrl(ctrl)
 Flash controller speculation control. More...
 
#define MCM_FdsCtrl(ctrl)
 Flash data speculation control. More...
 
#define MCM_FccCtrl(ctrl)
 Flash controller cache control. More...
 
#define MCM_FcicCtrl(ctrl)
 Flash controller instruction caching control. More...
 
#define MCM_FcdaCtrl(ctrl)
 Flash controller data caching control. More...
 
#define MCM_MasterArbCtrl(ctrl)
 Crossbar master arbitration control. More...
 
#define MCM_InitCPO(wakeup)
 Initializes compute operation mode (CPO). More...
 
#define MCM_QuitCPO()
 Quits pending compute operation mode (CPO). More...
 

Macro Definition Documentation

#define MCM_SetMasterAttr (   mask,
  attr,
  lock 
)

This macro configures access attributes for selected master(s) and controls access into configuration attributes.

Parameters
maskSelect one or more OR'ed MCM Crossbar Masters.
attrMCM Crossbar Master Access Attributes.
lockTRUE (configuration locked until next power on reset)
FALSE (configuration left opened for further changes).
Note
Implemented as an inline macro.
Warning
Writing MCM_CM0_MASTER access attributes must take special care. Typically, the processor would use an MCM Crossbar Master Access Attributes value of either MCM_MASTER_FR_PRIV_SECURE or MCM_MASTER_EN_PRIV_OR_USER_SECURE_OR_NONSEC because the other values can create a configuration where access to system level resources is not allowed.
See also
MCM_LoadPID
#define MCM_LoadPID (   pid)

This macro loads process ID register.

Parameters
pid00h - Reserved for privileged secure tasks, 01h - 7Fh Allocated for user secure tasks, 80h - FFh Allocated for user nonsecure tasks.
Note
Implemented as an inline macro.
See also
MCM_SetMasterAttr
#define MCM_SfcCtrl (   ctrl)

This macro controls stalling flash controller when flash is busy. Stalling flash controller must be set by this macro only just before the flash operation is executed and must be cleared when the operation completes.

Parameters
ctrlFALSE Disables stalling flash controller when flash is busy (default), TRUE Enables stalling flash controller when flash is busy.
Note
When software needs to access the flash memory while a flash memory resource is being manipulated by a flash command, software can enable a stall mechanism to avoid a read collision. The stall mechanism allows software to execute code from the same block on which flash operations are being performed. However, software must ensure the sector the flash operations are being performed on is not the same sector from which the code is executing. Implemented as an inline macro.
#define MCM_FcsCtrl (   ctrl)

This macro controls flash controller speculation.

Parameters
ctrlFALSE Disables flash controller speculation, TRUE Enables flash controller speculation (default).
Note
Implemented as an inline macro.
#define MCM_FdsCtrl (   ctrl)

This macro controls flash data speculation.

Parameters
ctrlFALSE Disables flash data speculation (default), TRUE Enables flash data speculation.
Note
Implemented as an inline macro.
#define MCM_FccCtrl (   ctrl)

This macro controls flash controller cache.

Parameters
ctrlFALSE Disables flash controller cache, TRUE Enables flash controller cache (default).
Note
Implemented as an inline macro.
#define MCM_FcicCtrl (   ctrl)

This macro controls flash controller instruction caching.

Parameters
ctrlFALSE Disables flash controller instruction caching, TRUE Enables flash controller instruction caching (default).
Note
Implemented as an inline macro.
#define MCM_FcdaCtrl (   ctrl)

This macro controls flash controller data caching.

Parameters
ctrlFALSE Disables flash controller data caching, TRUE Enables flash controller data caching (default).
Note
Implemented as an inline macro.
#define MCM_MasterArbCtrl (   ctrl)

This macro controls arbitration for crossbar masters.

Parameters
ctrlFALSE Sets fixed-priority arbitration (default), TRUE Sets round-robin arbitration.
Note
Implemented as an inline macro.
#define MCM_InitCPO (   wakeup)

This macro initializes compute operation mode (CPO). Macro waits until compute operation acknowledge (CPOACK) bit is asserted notifying successful transition to CPO mode. Compute operation wakeup on interrupt or exception vector fetch is set optionally.

Parameters
wakeupTRUE Sets compute operation as well as wakeup by any interrupt or exception vector fetch, FALSE Sets compute operation (default).
Note
Implemented as an inline macro.
See also
MCM_QuitCPO
#define MCM_QuitCPO ( )

This macro quits pending compute operation mode (CPO). Macro waits until compute operation acknowledge (CPOACK) bit is de-asserted notifying successful transition to RUN or VLPR mode.

Note
Implemented as an inline macro.
See also
MCM_InitCPO