MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Crossbar AND/OR/INVERT (AOI) block of MCUXpresso SDK devices.
The AOI module supports a configurable number of event outputs, where each event output represents a user-programmed combinational boolean function based on four event inputs. The key features of this module include:
To initialize the AOI driver, call the AOI_Init() function and pass a baseaddr pointer.
See the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/aoi.
The AOI module provides a universal boolean function generator using a four-term sum of products expression with each product term containing true or complement values of the four selected event inputs (A, B, C, D). The AOI is a highly programmable module for creating combinational boolean outputs for use as hardware triggers. Each selected input term in each product term can be configured to produce a logical 0 or 1 or pass the true or complement of the selected event input. To configure the selected AOI module event, call the API of the AOI_SetEventLogicConfig() function. To get the current event state configure, call the API of AOI_GetEventLogicConfig() function. The AOI module does not support any special modes of operation. See the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/aoi.
The AOI module is designed to be integrated in conjuction with one or more inter-peripheral crossbar switch (XBAR) modules. A crossbar switch is typically used to select the 4*n AOI inputs from among available peripheral outputs and GPIO signals. The n EVENTn outputs from the AOI module are typically used as additional inputs to a second crossbar switch, adding to it the ability to connect to its outputs an arbitrary 4-input boolean function of its other inputs.
This is an example to initialize and configure the AOI driver for a possible use case. Because the AOI module function is directly connected with an XBAR (Inter-peripheral crossbar) module, other peripheral drivers (PIT, CMP, and XBAR) are used to show full functionality of AOI module.
For example: Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/aoi
Data Structures | |
struct | aoi_event_config_t |
AOI event configuration structure. More... | |
Macros | |
#define | AOI AOI0 |
AOI peripheral address. | |
Enumerations | |
enum | aoi_input_config_t { kAOI_LogicZero = 0x0U, kAOI_InputSignal = 0x1U, kAOI_InvInputSignal = 0x2U, kAOI_LogicOne = 0x3U } |
AOI input configurations. More... | |
enum | aoi_event_t { kAOI_Event0 = 0x0U, kAOI_Event1 = 0x1U, kAOI_Event2 = 0x2U, kAOI_Event3 = 0x3U } |
AOI event indexes, where an event is the collection of the four product terms (0, 1, 2, and 3) and the four signal inputs (A, B, C, and D). More... | |
Driver version | |
#define | FSL_AOI_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
Version 2.0.1. More... | |
AOI Initialization | |
void | AOI_Init (AOI_Type *base) |
Initializes an AOI instance for operation. More... | |
void | AOI_Deinit (AOI_Type *base) |
Deinitializes an AOI instance for operation. More... | |
AOI Get Set Operation | |
void | AOI_GetEventLogicConfig (AOI_Type *base, aoi_event_t event, aoi_event_config_t *config) |
Gets the Boolean evaluation associated. More... | |
void | AOI_SetEventLogicConfig (AOI_Type *base, aoi_event_t event, const aoi_event_config_t *eventConfig) |
Configures an AOI event. More... | |
struct aoi_event_config_t |
Defines structure _aoi_event_config and use the AOI_SetEventLogicConfig() function to make whole event configuration.
Data Fields | |
aoi_input_config_t | PT0AC |
Product term 0 input A. | |
aoi_input_config_t | PT0BC |
Product term 0 input B. | |
aoi_input_config_t | PT0CC |
Product term 0 input C. | |
aoi_input_config_t | PT0DC |
Product term 0 input D. | |
aoi_input_config_t | PT1AC |
Product term 1 input A. | |
aoi_input_config_t | PT1BC |
Product term 1 input B. | |
aoi_input_config_t | PT1CC |
Product term 1 input C. | |
aoi_input_config_t | PT1DC |
Product term 1 input D. | |
aoi_input_config_t | PT2AC |
Product term 2 input A. | |
aoi_input_config_t | PT2BC |
Product term 2 input B. | |
aoi_input_config_t | PT2CC |
Product term 2 input C. | |
aoi_input_config_t | PT2DC |
Product term 2 input D. | |
aoi_input_config_t | PT3AC |
Product term 3 input A. | |
aoi_input_config_t | PT3BC |
Product term 3 input B. | |
aoi_input_config_t | PT3CC |
Product term 3 input C. | |
aoi_input_config_t | PT3DC |
Product term 3 input D. | |
#define FSL_AOI_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
enum aoi_input_config_t |
enum aoi_event_t |
void AOI_Init | ( | AOI_Type * | base | ) |
This function un-gates the AOI clock.
base | AOI peripheral address. |
void AOI_Deinit | ( | AOI_Type * | base | ) |
This function shutdowns AOI module.
base | AOI peripheral address. |
void AOI_GetEventLogicConfig | ( | AOI_Type * | base, |
aoi_event_t | event, | ||
aoi_event_config_t * | config | ||
) |
This function returns the Boolean evaluation associated.
Example:
base | AOI peripheral address. |
event | Index of the event which will be set of type aoi_event_t. |
config | Selected input configuration . |
void AOI_SetEventLogicConfig | ( | AOI_Type * | base, |
aoi_event_t | event, | ||
const aoi_event_config_t * | eventConfig | ||
) |
This function configures an AOI event according to the aoiEventConfig structure. This function configures all inputs (A, B, C, and D) of all product terms (0, 1, 2, and 3) of a desired event.
Example:
base | AOI peripheral address. |
event | Event which will be configured of type aoi_event_t. |
eventConfig | Pointer to type aoi_event_config_t structure. The user is responsible for filling out the members of this structure and passing the pointer to this function. |