Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_flexbus_hal.h File Reference
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include "fsl_device_registers.h"

Data Structures

struct  flexbus_user_config_t
 Configuration structure that the user needs to set. More...
 

Enumerations

enum  flexbus_status_t {
  kStatus_FLEXBUS_Success = 0x00U,
  kStatus_FLEXBUS_OutOfRange,
  kStatus_FLEXBUS_InvalidArgument,
  kStatus_FLEXBUS_Failed
}
 Flexbus status return codes. More...
 
enum  flexbus_port_size_t {
  kFlexbus4bytes = 0x00U,
  kFlexbus1byte = 0x01U,
  kFlexbus2bytes = 0x02U
}
 Defines port size for Flexbus peripheral. More...
 
enum  flexbus_write_address_hold_t {
  kFlexbusHold1cycle = 0x00U,
  kFlexbusHold2cycles = 0x01U,
  kFlexbusHold3cycles = 0x02U,
  kFlexbusHold4cycles = 0x03U
}
 Defines number of cycles to hold address and attributes for Flexbus peripheral. More...
 
enum  flexbus_read_address_hold_t {
  kFlexbusHold4or3cycles = 0x03U,
  kFlexbusHold3or2cycles = 0x02U,
  kFlexbusHold2or1cycle = 0x01U,
  kFlexbusHold1or0cycle = 0x00U
}
 Defines number of cycles to hold address and attributes for Flexbus peripheral. More...
 
enum  flexbus_address_setup_t {
  kFlexbusFirstRisingEdge = 0x00U,
  kFlexbusSecondRisingEdge = 0x01U,
  kFlexbusThirdRisingEdge = 0x02U,
  kFlexbusFourthRisingEdge = 0x03U
}
 Address setup for Flexbus peripheral. More...
 
enum  flexbus_bytelane_shift_t {
  kFlexbusNotShifted = 0x00U,
  kFlexbusShifted = 0x01U
}
 Defines byte-lane shift for Flexbus peripheral. More...
 
enum  flexbus_multiplex_group1_t {
  kFlexbusMultiplexGroup1_FB_ALE = 0x00U,
  kFlexbusMultiplexGroup1_FB_CS1 = 0x01U,
  kFlexbusMultiplexGroup1_FB_TS = 0x02U
}
 Defines multiplex group1 valid signals. More...
 
enum  flexbus_multiplex_group2_t {
  kFlexbusMultiplexGroup2_FB_CS4 = 0x00U,
  kFlexbusMultiplexGroup2_FB_TSIZ0 = 0x01U,
  kFlexbusMultiplexGroup2_FB_BE_31_24 = 0x02U
}
 Defines multiplex group2 valid signals. More...
 
enum  flexbus_multiplex_group3_t {
  kFlexbusMultiplexGroup3_FB_CS5 = 0x00U,
  kFlexbusMultiplexGroup3_FB_TSIZ1 = 0x01U,
  kFlexbusMultiplexGroup3_FB_BE_23_16 = 0x02U
}
 Defines multiplex group3 valid signals. More...
 
enum  flexbus_multiplex_group4_t {
  kFlexbusMultiplexGroup4_FB_TBST = 0x00U,
  kFlexbusMultiplexGroup4_FB_CS2 = 0x01U,
  kFlexbusMultiplexGroup4_FB_BE_15_8 = 0x02U
}
 Defines multiplex group4 valid signals. More...
 
enum  flexbus_multiplex_group5_t {
  kFlexbusMultiplexGroup5_FB_TA = 0x00U,
  kFlexbusMultiplexGroup5_FB_CS3 = 0x01U,
  kFlexbusMultiplexGroup5_FB_BE_7_0 = 0x02U
}
 Defines multiplex group5 valid signals. More...
 

Functions

Configuration
void FLEXBUS_HAL_Init (FB_Type *base)
 Initialization to default values. More...
 
void FLEXBUS_HAL_Configure (FB_Type *base, const flexbus_user_config_t *userConfigPtr)
 Configure to a known values. More...
 
static void FLEXBUS_HAL_WriteAddr (FB_Type *base, uint8_t chip, uint16_t addr, uint16_t addrMask)
 Write chip-select base address. More...
 
static void FLEXBUS_HAL_SetChipSelectValidCmd (FB_Type *base, uint8_t chip, bool valid)
 Sets chip-selects valid bit or not. More...
 
static void FLEXBUS_HAL_SetWriteProtectionCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables or disables write protection function for Flexbus. More...
 
static void FLEXBUS_HAL_SetBurstWriteCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables or disables burst-write on Flexbus. More...
 
static void FLEXBUS_HAL_SetBurstReadCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables or disables burst-read bit on Flexbus. More...
 
static void FLEXBUS_HAL_SetByteModeCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables or disables byte-enable support on Flexbus. More...
 
static void FLEXBUS_HAL_SetPortSize (FB_Type *base, uint8_t chip, flexbus_port_size_t size)
 Sets port size on Flexbus. More...
 
static void FLEXBUS_HAL_SetAutoAcknowledgeCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables auto-acknowledge on Flexbus. More...
 
static void FLEXBUS_HAL_SetByteLaneShift (FB_Type *base, uint8_t chip, flexbus_bytelane_shift_t shift)
 Enables byte-lane shift on Flexbus. More...
 
static void FLEXBUS_HAL_SetWaitStates (FB_Type *base, uint8_t chip, uint8_t waitStates)
 Sets number of wait states on Flexbus. More...
 
static void FLEXBUS_HAL_SetWriteAddrHoldOrDeselect (FB_Type *base, uint8_t chip, flexbus_write_address_hold_t addrHold)
 Sets write address hold or deselect. More...
 
static void FLEXBUS_HAL_SetReadAddrHoldOrDeselect (FB_Type *base, uint8_t chip, flexbus_read_address_hold_t addrHold)
 Sets read address hold or deselect. More...
 
static void FLEXBUS_HAL_SetAddrSetup (FB_Type *base, uint8_t chip, flexbus_address_setup_t delay)
 Set address setup. More...
 
static void FLEXBUS_HAL_SetExtendedAddrLatchCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables extended address latch. More...
 
static void FLEXBUS_HAL_SetSecondaryWaitStateCmd (FB_Type *base, uint8_t chip, bool enable)
 Enables secondary wait state. More...
 
static void FLEXBUS_HAL_SetMultiplexControlGroup1 (FB_Type *base, flexbus_multiplex_group1_t controls)
 Multiplex group1 set. More...
 
static flexbus_multiplex_group1_t FLEXBUS_HAL_GetMultiplexControlGroup1 (FB_Type *base)
 Multiplex group1 get. More...
 
static void FLEXBUS_HAL_SetMultiplexControlGroup2 (FB_Type *base, flexbus_multiplex_group2_t controls)
 Multiplex group2 set. More...
 
static flexbus_multiplex_group2_t FLEXBUS_HAL_GetMultiplexControlGroup2 (FB_Type *base)
 Multiplex group2 get. More...
 
static void FLEXBUS_HAL_SetMultiplexControlGroup3 (FB_Type *base, flexbus_multiplex_group3_t controls)
 Multiplex group3 set. More...
 
static flexbus_multiplex_group3_t FLEXBUS_HAL_GetMultiplexControlGroup3 (FB_Type *base)
 Multiplex group3 get. More...
 
static void FLEXBUS_HAL_SetMultiplexControlGroup4 (FB_Type *base, flexbus_multiplex_group4_t controls)
 Multiplex group4 set. More...
 
static flexbus_multiplex_group4_t FLEXBUS_HAL_GetMultiplexControlGroup4 (FB_Type *base)
 Multiplex group4 get. More...
 
static void FLEXBUS_HAL_SetMultiplexControlGroup5 (FB_Type *base, flexbus_multiplex_group5_t controls)
 Multiplex group5 set. More...
 
static flexbus_multiplex_group5_t FLEXBUS_HAL_GetMultiplexControlGroup5 (FB_Type *base)
 Multiplex group5 get. More...