Skip to content

Ebyte E180-ZG120B-TB Test Board

Support for Ebyte E180-ZG120B-TB Test Board

Overview

Image of the E180-ZG120B test board

Ebyte E180-ZG120B Test Board is equipped with the EFM32 microcontroller. It is specifically designed for low-power applications, having energy-saving peripherals, different energy modes and short wake-up times.

Hardware

MCU

MCUEFR32MG1B232F256GM32
FamilyARM Cortex-M4F
VendorEbyte
Vendor FamilyEFM32 Mighty Gecko 1B
RAM32.0 KiB (1.0 KiB reserved by radio blob)
Flash256.0 KiB
EEPROMno
Frequencyup to 38.4 MHz
FPUyes
MPUyes
DMA8 channels
Timers2x 16-bit + 1x 16-bit (low power)
ADCs12-bit ADC
UARTs2x USART, 1x LEUART
SPIs2x USART
I2Cs1x
Vcc1.85 V - 3.8 V
DatasheetDatasheet
ManualManual
Board ManualBoard Manual

Pin Mapping

Warning: At least for revision 10199-V1.0 of the test board most of the silkscreen labels are incorrect.

Note: Everything here assumes the board is oriented so that the USB connector is on the top.

Right Header

(Top-left pin is 1, top-right pin is 2, and so on.)

DescriptionPin (left)Pin (right)Description
GND12VCC
PB1334PB12
PB1156PD15
NC (pin 8 on E180-ZG120B)78NC (pin 7 on E180-ZG120B)
PA1910PA0
PD141112PD13
GND1314GND

Top Header

(Leftmost pin is 1, second from left is 2, and so on.)

DescriptionPin (left to right)
NC (pin 23 on E180-ZG120B)1
NC (pin 22 on E180-ZG120B)2
PC113
NC (pin 20 on E180-ZG120B)4
PF25
PC106
NC (pin 17 on E180-ZG120B)7
NC (pin 16 on E180-ZG120B)8
NC (pin 16 on E180-ZG120B)9

Left Header

(Top-left pin is 1, top-right pin is 2, and so on.)

DescriptionPin (left)Pin (right)Description
NC (pin 24 on E180-ZG120B)12SWCLK
SWDIO34PB14
PB1556NC (pin 29 on E180-ZG120B)
PF378NC (pin 31 on E180-ZG120B)
NC (pin 32 on E180-ZG120)910NC (pin 33 on E180-ZG120B)
NC (pin 34 on E180-ZG120)1112NC (pin 35 on E180-ZG120B)
GND1314Reset

Peripheral mapping

PeripheralNumberHardwarePinsComments
ADC0ADC0CHAN0: internal temperaturePorts are fixed, 14/16-bit resolution not supported
HWCRYPTOAES128/AES256, SHA1, SHA256
RTTRTCC1 Hz interval. Either RTT or RTC (see below)
RTCRTCC1 Hz interval. Either RTC or RTT (see below)
Timer0TIMER0 + TIMER1TIMER0 is used as prescaler (must be adjacent)
1LETIMER0
UART0USART0RX: PA1, TX: PA0Default STDIO output

User interface

PeripheralMapped toPinComments
ButtonPB0_PINPD15Mode Change
PB1_PINPD13Touch Link
PB2_PINPB11Baud Rate Reset
LEDLED0_PINPF2GPIO2 LED
LED1_PINPF3Link LED

The fourth button with the Chinese description is the reset button.

Implementation Status

DeviceIDSupportedComments
MCUEFR32MG1ByesPower modes supported
Low-level driverADCyes
Flashyes
GPIOyesInterrupts are shared across pins (see reference manual)
HW Cryptoyes
I2Cyes
PWMyes
RTCCyesAs RTT or RTC
SPIpartiallyOnly master mode
Timeryes
UARTyesUSART is shared with SPI. LEUART baud rate limited (see below)
USBno

Board configuration

Clock selection

There are several clock sources that are available for the different peripherals. You are advised to read AN0004.0 to get familiar with the different clocks.

SourceInternalSpeedComments
HFRCOYes19 MHzEnabled during startup, changeable
HFXONo38.4 MHz
LFRCOYes32.768 kHz
LFXONo32.768 kHz
ULFRCONo1 kHzNot very reliable as a time source

The sources can be used to clock following branches:

BranchSourcesComments
HFHFRCO, HFXOCore, peripherals
LFALFRCO, LFXOLow-power timers
LFBLFRCO, LFXO, CORELEDIV2Low-power UART
LFELFRCO, LFXOReal-time Clock and Calendar

CORELEDIV2 is a source that depends on the clock source that powers the core. It is divided by 2 or 4 to not exceed maximum clock frequencies (EMLIB takes care of this).

The frequencies mentioned in the tables above are specific for this starter kit.

It is important that the clock speeds are known to the code, for proper calculations of speeds and baud rates. If the HFXO or LFXO are different from the speeds above, ensure to pass EFM32_HFXO_FREQ=freq_in_hz and EFM32_LFXO_FREQ=freq_in_hz to your compiler.

You can override the branch’s clock source by adding CLOCK_LFA=source to your compiler defines, e.g. CLOCK_LFA=cmuSelect_LFRCO.

Low-power peripherals

The low-power UART is capable of providing an UART peripheral using a low-speed clock. When the LFB clock source is the LFRCO or LFXO, it can still be used in EM2. However, this limits the baud rate to 9600 baud. If a higher baud rate is desired, set the clock source to CORELEDIV2.

Note: peripheral mappings in your board definitions will not be affected by this setting. Ensure you do not refer to any low-power peripherals.

RTC or RTT

RIOT-OS has support for Real-Time Tickers and Real-Time Clocks.

However, this board MCU family has support for a 32-bit Real-Time Clock and Calendar, which can be configured in ticker mode or calendar mode. Therefore, only one of both peripherals can be enabled at the same time.

Configured at 1 Hz interval, the RTCC will overflow each 136 years.

Hardware crypto

This MCU is equipped with a hardware-accelerated crypto peripheral that can speed up AES128, AES256, SHA1, SHA256 and several other cryptographic computations.

A peripheral driver interface is proposed, but not yet implemented.

Usage of EMLIB

This port makes uses of EMLIB by Ebyte to abstract peripheral registers. While some overhead is to be expected, it ensures proper setup of devices, provides chip errata and simplifies development. The exact overhead depends on the application and peripheral usage, but the largest overhead is expected during peripheral setup. A lot of read/write/get/set methods are implemented as inline methods or macros (which have no overhead).

Another advantage of EMLIB are the included assertions. These assertions ensure that peripherals are used properly. To enable this, pass DEBUG_EFM to your compiler.

Pin locations

The EFM32 platform supports peripherals to be mapped to different pins (predefined locations). The definitions in periph_conf.h mostly consist of a location number and the actual pins. The actual pins are required to configure the pins via GPIO driver, while the location is used to map the peripheral to these pins.

In other words, these definitions must match. Refer to the data sheet for more information.

This MCU has extended pin mapping support. Each pin of a peripheral can be connected separately to one of the predefined pins for that peripheral.

Flashing the device

The board has no integrated programmer/debugger and no bootloader. Hence, an external SWD programmer/debugger such as the SEGGER JLink or the ST-Link is required. Connect at least the SWDIO, SWCLK, and GND to the programmer. If JLinkExe is found in $PATH, jlink is used by default for flashing, otherwise openocd is the default. When using OpenOCD, the stlink is the default for OPENOCD_DEBUG_ADAPTER; provide a different value if you use other hardware.

Note: When flashing with OpenOCD, leave the NRESET pin unconnected. The configuration does a soft reset only to work around an issue attaching with the hardware reset signal.

Flashing is supported by RIOT-OS using the command below:

make flash

To run the GDB debugger, use the command:

make debug

Or, to connect with your own debugger:

make debug-server

Some boards have (limited) support for emulation, which can be started with:

make emulate

Supported Toolchains

For using the Ebyte E180-ZG120B-TB starter kit we strongly recommend the usage of the GNU Tools for ARM Embedded Processors toolchain.

License information

Ebyte’ EMLIB: zlib-style license (permits distribution of source).