EBI - External Bus Interface#

EBI External Bus Interface (EBI) Peripheral API.

This module contains functions to control the EBI peripheral of Silicon Labs 32-bit MCUs and SoCs. The EBI is used for accessing external parallel devices. The devices appear as part of the internal memory map of the MCU.

Modules#

EBI_Init_TypeDef

Enumerations#

enum
ebiModeD8A8 = EBI_CTRL_MODE_D8A8
ebiModeD16A16ALE = EBI_CTRL_MODE_D16A16ALE
ebiModeD8A24ALE = EBI_CTRL_MODE_D8A24ALE
}

EBI Mode of operation.

enum
ebiActiveLow = 0
ebiActiveHigh = 1
}

EBI Polarity configuration.

enum
ebiLineARDY
ebiLineALE
ebiLineWE
ebiLineRE
ebiLineCS
}

EBI Pin Line types.

Functions#

void
EBI_Init(const EBI_Init_TypeDef *ebiInit)

Configure and enable the External Bus Interface.

void

Disable External Bus Interface.

uint32_t
EBI_BankAddress(uint32_t bank)

Return the base address of the EBI bank.

void
EBI_BankEnable(uint32_t banks, bool enable)

Enable or disable EBI Bank.

void
EBI_ChipSelectEnable(uint32_t cs, bool enable)

Enable or disable EBI Chip Select.

void
EBI_ReadTimingSet(uint32_t setupCycles, uint32_t strobeCycles, uint32_t holdCycles)

Configure timing values of read bus accesses.

void
EBI_WriteTimingSet(uint32_t setupCycles, uint32_t strobeCycles, uint32_t holdCycles)

Configure timing values of write bus accesses.

void
EBI_AddressTimingSet(uint32_t setupCycles, uint32_t holdCycles)

Configure timing values of address latch bus accesses.

void
EBI_PolaritySet(EBI_Line_TypeDef line, EBI_Polarity_TypeDef polarity)

Configure EBI pin polarity.

Macros#

#define
EBI_BANK0 (uint32_t)(1 << 1)

EBI address bank 0.

#define
EBI_BANK1 (uint32_t)(1 << 2)

EBI address bank 1.

#define
EBI_BANK2 (uint32_t)(1 << 3)

EBI address bank 2.

#define
EBI_BANK3 (uint32_t)(1 << 4)

EBI address bank 3.

#define
EBI_CS0 (uint32_t)(1 << 1)

EBI chip select line 0.

#define
EBI_CS1 (uint32_t)(1 << 2)

EBI chip select line 1.

#define
EBI_CS2 (uint32_t)(1 << 3)

EBI chip select line 2.

#define
EBI_CS3 (uint32_t)(1 << 4)

EBI chip select line 3.

#define
EBI_INIT_DEFAULT undefined

Default configuration for EBI initialization structures.

Enumeration Documentation#

EBI_Mode_TypeDef#

EBI_Mode_TypeDef

EBI Mode of operation.

Enumerator
ebiModeD8A8

8 data bits, 8 address bits.

ebiModeD16A16ALE

16 data bits, 16 address bits, using address latch enable.

ebiModeD8A24ALE

8 data bits, 24 address bits, using address latch enable.


EBI_Polarity_TypeDef#

EBI_Polarity_TypeDef

EBI Polarity configuration.

Enumerator
ebiActiveLow

Active Low.

ebiActiveHigh

Active High.


EBI_Line_TypeDef#

EBI_Line_TypeDef

EBI Pin Line types.

Enumerator
ebiLineARDY

Address Ready line.

ebiLineALE

Address Latch Enable line.

ebiLineWE

Write Enable line.

ebiLineRE

Read Enable line.

ebiLineCS

Chip Select line.


Function Documentation#

EBI_Init#

void EBI_Init (const EBI_Init_TypeDef * ebiInit)

Configure and enable the External Bus Interface.

Parameters
TypeDirectionArgument NameDescription
const EBI_Init_TypeDef *[in]ebiInit

The EBI configuration structure.

Note

  • GPIO lines must be configured as a PUSH_PULL for the correct operation. GPIO and EBI clocks must be enabled in the CMU.


EBI_Disable#

void EBI_Disable (void )

Disable External Bus Interface.

Parameters
TypeDirectionArgument NameDescription
voidN/A

EBI_BankAddress#

uint32_t EBI_BankAddress (uint32_t bank)

Return the base address of the EBI bank.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]bank

A bank to return the start address for.

Returns

  • an absolute address of the bank.


EBI_BankEnable#

void EBI_BankEnable (uint32_t banks, bool enable)

Enable or disable EBI Bank.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]banks

Banks to reconfigure, mask of EBI_BANK<n> flags.

bool[in]enable

True to enable, false to disable.


EBI_ChipSelectEnable#

void EBI_ChipSelectEnable (uint32_t cs, bool enable)

Enable or disable EBI Chip Select.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]cs

ChipSelect lines to reconfigure, mask of EBI_CS<n> flags.

bool[in]enable

True to enable, false to disable.


EBI_ReadTimingSet#

void EBI_ReadTimingSet (uint32_t setupCycles, uint32_t strobeCycles, uint32_t holdCycles)

Configure timing values of read bus accesses.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]setupCycles

A number of clock cycles for the address setup before REn is asserted.

uint32_t[in]strobeCycles

The number of cycles the REn is held active. After the specified number of cycles, data is read. If set to 0, 1 cycle is inserted by hardware.

uint32_t[in]holdCycles

The number of cycles CSn is held active after the REn is deasserted.


EBI_WriteTimingSet#

void EBI_WriteTimingSet (uint32_t setupCycles, uint32_t strobeCycles, uint32_t holdCycles)

Configure timing values of write bus accesses.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]setupCycles

A number of clock cycles for the address setup before WEn is asserted.

uint32_t[in]strobeCycles

A number of cycles WEn is held active. If set to 0, 1 cycle is inserted by hardware.

uint32_t[in]holdCycles

A number of cycles CSn is held active after the WEn is deasserted.


EBI_AddressTimingSet#

void EBI_AddressTimingSet (uint32_t setupCycles, uint32_t holdCycles)

Configure timing values of address latch bus accesses.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]setupCycles

Sets the number of cycles the address is held after ALE is asserted.

uint32_t[in]holdCycles

Sets the number of cycles the address is driven onto the ADDRDAT bus before ALE is asserted. If set 0, 1 cycle is inserted by hardware.


EBI_PolaritySet#

void EBI_PolaritySet (EBI_Line_TypeDef line, EBI_Polarity_TypeDef polarity)

Configure EBI pin polarity.

Parameters
TypeDirectionArgument NameDescription
EBI_Line_TypeDef[in]line

Which pin/line to configure.

EBI_Polarity_TypeDef[in]polarity

Active high or active low.