Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FLEXBUS Peripheral Driver

Overview

The section describes the programming interface of the FLEXBUS Peripheral driver. The FLEXBUS driver provides an easy way to initialize and configure the FLEXBUS.

FLEXBUS Overview

The FLEXBUS (external bus interface) is a hardware module that provides memory expansion and a connection to external peripheral with a parallel bus. It can be directly connected to the slave-only devices such as:

FLEXBUS Initialization

To initialize the FLEXBUS module, call the FLEXBUS_DRV_Init() function and pass in the instance number and the user configuration structure. This function automatically enables the FLEXBUS module and clock.
This example code shows how to initialize and configure the FLEXBUS for MRAM purpose:

/* Define configuration.
flexbus_user_config_t fb_config;
/* Clear user configuration struct first.
memset(&fb_config, 0x0, sizeof(flexbus_user_config_t));
fb_config.chip = 0;
fb_config.baseAddress = 0x60000000; /* Configure base address.
fb_config.portSize = kFlexbus1byte; /* Port size of transfer.
fb_config.autoAcknowledge = true; /* Enable auto acknowledge.
fb_config.waitStates = 0x2; /* Set wait state.
fb_config.baseAddressMask = 0x7; /* Configure base address mask.
/* Initialize FLEXBUS.
FLEXBUS_DRV_Init(instance, &fb_config);

FLEXBUS De-initialize

To shut down the FLEXBUS module, call the FLEXBUS_DRV_Deinit() function and pass in the instance number.

Functions

flexbus_status_t FLEXBUS_DRV_Init (uint32_t instance, const flexbus_user_config_t *fb_config)
 Initializes the FlexBus driver. More...
 
flexbus_status_t FLEXBUS_DRV_Deinit (uint32_t instance)
 Shuts down the FlexBus driver. More...
 

Variables

FB_Type *const g_fbBase []
 Table of base addresses for FlexBus instances. More...
 

Function Documentation

flexbus_status_t FLEXBUS_DRV_Init ( uint32_t  instance,
const flexbus_user_config_t fb_config 
)
Parameters
instanceThe FlexBus peripheral instance number.
fb_configFlexBus input user configuration
Returns
Execution status.
flexbus_status_t FLEXBUS_DRV_Deinit ( uint32_t  instance)
Parameters
instanceThe FlexBus peripheral instance number.
Returns
Execution status.

Variable Documentation

FB_Type* const g_fbBase[]