![]() |
MCUXpresso SDK API Reference Manual
Rev 2.15.000
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Crossbar External Bus Interface (FlexBus) block of MCUXpresso SDK devices.
A multifunction external bus interface is provided on the device with a basic functionality to interface to slave-only devices. It can be directly connected to the following asynchronous or synchronous devices with little or no additional circuitry.
For asynchronous devices, a simple chip-select based interface can be used. The FlexBus interface has up to six general purpose chip-selects, FB_CS[5:0]. The number of chip selects available depends on the device and its pin configuration.
To configure the FlexBus driver, use on of the two ways to configure the flexbus_config_t structure.
To initialize and configure the FlexBus driver, call the FLEXBUS_Init() function and pass a pointer to the flexbus_config_t structure.
To de-initialize the FlexBus driver, call the FLEXBUS_Deinit() function.
This example shows how to write/read to external memory (MRAM) by using the FlexBus module.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/flexbus
Data Structures | |
| struct | _flexbus_config |
| Configuration structure that the user needs to set. More... | |
Typedefs | |
| typedef enum _flexbus_port_size | flexbus_port_size_t |
| Defines port size for FlexBus peripheral. | |
|
typedef enum _flexbus_write_address_hold | flexbus_write_address_hold_t |
| Defines number of cycles to hold address and attributes for FlexBus peripheral. | |
|
typedef enum _flexbus_read_address_hold | flexbus_read_address_hold_t |
| Defines number of cycles to hold address and attributes for FlexBus peripheral. | |
| typedef enum _flexbus_address_setup | flexbus_address_setup_t |
| Address setup for FlexBus peripheral. | |
|
typedef enum _flexbus_bytelane_shift | flexbus_bytelane_shift_t |
| Defines byte-lane shift for FlexBus peripheral. | |
|
typedef enum _flexbus_multiplex_group1_signal | flexbus_multiplex_group1_t |
| Defines multiplex group1 valid signals. | |
|
typedef enum _flexbus_multiplex_group2_signal | flexbus_multiplex_group2_t |
| Defines multiplex group2 valid signals. | |
|
typedef enum _flexbus_multiplex_group3_signal | flexbus_multiplex_group3_t |
| Defines multiplex group3 valid signals. | |
|
typedef enum _flexbus_multiplex_group4_signal | flexbus_multiplex_group4_t |
| Defines multiplex group4 valid signals. | |
|
typedef enum _flexbus_multiplex_group5_signal | flexbus_multiplex_group5_t |
| Defines multiplex group5 valid signals. | |
| typedef struct _flexbus_config | flexbus_config_t |
| Configuration structure that the user needs to set. | |
Driver version | |
| #define | FSL_FLEXBUS_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
| Version 2.1.1. More... | |
FlexBus functional operation | |
| void | FLEXBUS_Init (FB_Type *base, const flexbus_config_t *config) |
| Initializes and configures the FlexBus module. More... | |
| void | FLEXBUS_Deinit (FB_Type *base) |
| De-initializes a FlexBus instance. More... | |
| void | FLEXBUS_GetDefaultConfig (flexbus_config_t *config) |
| Initializes the FlexBus configuration structure. More... | |
| struct _flexbus_config |
Data Fields | |
| uint8_t | chip |
| Chip FlexBus for validation. | |
| uint8_t | waitStates |
| Value of wait states. | |
| uint8_t | secondaryWaitStates |
| Value of secondary wait states. | |
| uint32_t | chipBaseAddress |
| Chip base address for using FlexBus. | |
| uint32_t | chipBaseAddressMask |
| Chip base address mask. | |
| bool | writeProtect |
| Write protected. | |
| bool | burstWrite |
| Burst-Write enable. | |
| bool | burstRead |
| Burst-Read enable. | |
| bool | byteEnableMode |
| Byte-enable mode support. | |
| bool | autoAcknowledge |
| Auto acknowledge setting. | |
| bool | extendTransferAddress |
| Extend transfer start/extend address latch enable. | |
| bool | secondaryWaitStatesEnable |
| Enable secondary wait states. | |
| flexbus_port_size_t | portSize |
| Port size of transfer. | |
| flexbus_bytelane_shift_t | byteLaneShift |
| Byte-lane shift enable. | |
| flexbus_write_address_hold_t | writeAddressHold |
| Write address hold or deselect option. | |
| flexbus_read_address_hold_t | readAddressHold |
| Read address hold or deselect option. | |
| flexbus_address_setup_t | addressSetup |
| Address setup setting. | |
| flexbus_multiplex_group1_t | group1MultiplexControl |
| FlexBus Signal Group 1 Multiplex control. | |
| flexbus_multiplex_group2_t | group2MultiplexControl |
| FlexBus Signal Group 2 Multiplex control. | |
| flexbus_multiplex_group3_t | group3MultiplexControl |
| FlexBus Signal Group 3 Multiplex control. | |
| flexbus_multiplex_group4_t | group4MultiplexControl |
| FlexBus Signal Group 4 Multiplex control. | |
| flexbus_multiplex_group5_t | group5MultiplexControl |
| FlexBus Signal Group 5 Multiplex control. | |
| #define FSL_FLEXBUS_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
| enum _flexbus_port_size |
| void FLEXBUS_Init | ( | FB_Type * | base, |
| const flexbus_config_t * | config | ||
| ) |
This function enables the clock gate for FlexBus module. Only chip 0 is validated and set to known values. Other chips are disabled. Note that in this function, certain parameters, depending on external memories, must be set before using the FLEXBUS_Init() function. This example shows how to set up the uart_state_t and the flexbus_config_t parameters and how to call the FLEXBUS_Init function by passing in these parameters.
| base | FlexBus peripheral address. |
| config | Pointer to the configuration structure |
| void FLEXBUS_Deinit | ( | FB_Type * | base | ) |
This function disables the clock gate of the FlexBus module clock.
| base | FlexBus peripheral address. |
| void FLEXBUS_GetDefaultConfig | ( | flexbus_config_t * | config | ) |
This function initializes the FlexBus configuration structure to default value. The default values are.
| config | Pointer to the initialization structure. |