1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/slstk3701a/doc.txt
2023-09-27 09:12:06 +02:00

289 lines
14 KiB
Plaintext

/**
* @defgroup boards_slstk3701a Silicon Labs SLSTK3701A starter kit
* @ingroup boards
* @brief Support for Silicon Labs SLSTK3701A starter kit
## Overview
Silicon Labs EFM32 Giant Gecko GG11 Starter Kit 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.
The starter kit is equipped with an Advanced Energy Monitor. This allows you to
actively measure the power consumption of your hardware and code, in real-time.
## Hardware
### MCU
| MCU | EFM32GG11B820F2048GL192 |
|-----------------|------------------------------------------------------|
| Family | ARM Cortex-M4F |
| Vendor | Silicon Labs |
| Vendor Family | EFM32 Giant Gecko 11B |
| RAM | 512.0 KiB |
| Flash | 2048.0 KiB |
| EEPROM | no |
| Frequency | up to 50 MHz |
| FPU | yes |
| MPU | yes |
| DMA | 24 channels |
| Timers | 4 x 32-bit + 7 x 16-bit + 1 x 16-bit (low power) |
| ADCs | 2 x 12-bit ADC (1 Msample/s) |
| DACs | 2 x 12-bit VDAC (500 ksamples/s), 1 x IDAC |
| I2Cs | 3 x |
| SPIs | 4 x USART |
| UARTs | 4 x USART, 1 x LEUART |
| USB | 1 x Low Energy Full-Speed USB 2.0 |
| Ethernet | Ethernet MAC 10/100 Mbps |
| Vcc | 1.85 V - 3.8 V |
| Datasheet | [Datasheet](https://www.silabs.com/documents/public/data-sheets/efm32gg11-datasheet.pdf) |
| Manual | [Manual](https://www.silabs.com/documents/public/reference-manuals/efm32gg11-rm.pdf) |
| Board Manual | [Board Manual](https://www.silabs.com/documents/public/user-guides/ug287-stk3701.pdf) |
| Board Schematic | Can be downloaded using Silicon Labs' Simplicity Studio |
### Pinout
This is the pinout of the expansion header on the right side of the board.
PIN 1 is the bottom-left contact when the header faces you horizontally.
| RIOT Peripheral | Name | PIN | PIN | Name | RIOT Peripheral |
|-----------------|------|-----|-----|--------|-----------------|
| | 3V3 | 20 | 19 | ID SDA | |
| | 5V | 18 | 17 | ID SCL | |
| I2C_DEV(0):SDA | PC0 | 16 | 15 | PC1 | I2C_DEV(0):SCL |
| UART_DEV(1):RX | PE9 | 14 | 13 | PB9 | |
| UART_DEV(1):TX | PE8 | 12 | 11 | PB11 | DAC_LINE(0) |
| | PE13 | 10 | 9 | PC5 | I2C_DEV(1):SCL |
| SPI_DEV(0):CLK | PE12 | 8 | 7 | PC4 | I2C_DEV(1):SDA |
| SPI_DEV(0):MISO | PE11 | 6 | 5 | PA13 | |
| SPI_DEV(0):MOSI | PE10 | 4 | 3 | PA12 | |
| | VMCU | 2 | 1 | GND | |
**Note**: not all starter kits by Silicon Labs share the same pinout!
**Note:** some pins are connected to the board controller, when enabled!
### Peripheral mapping
| Peripheral | Number | Hardware | Pins | Comments |
|-------------|---------|------------|------------------|-------------------------------------|
| ADC | 0 | ADC0:CH0 | | Internal temperature |
| ADC | 1 | ADC0:CH1 | | AVDD |
| DAC | 0 | DAC0:OUT0 | PB11 | AVVD as reference voltage |
| I2C | 0 | I2C0 | SDA:PC0, SCL:PC1 | Normal speed |
| I2C | 1 | I2C1 | SDA:PC7, SCL:PC5 | Normal speed |
| I2C | 2 | I2C2 | SDA:PI4, SCL:PI5 | Normal speed, Sensor I2C bus |
| HWCRYPTO | - | - | | AES128/AES256, SHA1, SHA224/SHA256 |
| HWRNG | - | TNRG0 | | True Random Number Generator (TRNG) |
| RTT | - | RTCC | | 1 Hz interval, either RTT or RTC |
| RTC | - | RTCC | | 1 Hz interval, either RTT or RTC |
| SPI | 0 | USART0 | MOSI:PE10, MISO:PE11, CLK:PE12 | |
| Timer | 0 | WTIMER0 + WTIMER1 | | WTIMER0 is used as prescaler |
| Timer | 1 | TIMER0 + TIMER1 | | TIMER0 is used as prescaler |
| Timer | 2 | LETIMER0 | | |
| UART | 0 | USART4 | RX:PH5, TX:PH4 | Default STDIO |
| UART | 1 | USART5 | RX:PE9, TX:PE8 | |
### User interface
| Peripheral | Mapped to | Pin | Comments |
|------------|-----------|-----------|------------|
| Button | PB0_PIN | PC8 | |
| | PB1_PIN | PC9 | |
| LED | LED0R_PIN | PH10 | |
| | LED0G_PIN | PH11 | |
| | LED0B_PIN | PH12 | |
| | LED1R_PIN | PH13 | |
| | LED1G_PIN | PH14 | |
| | LED1B_PIN | PH15 | |
| | LED0_PIN | LED0R_PIN | |
| | LED1_PIN | LED1R_PIN | |
## Implementation Status
| Device | ID | Supported | Comments |
|------------------|------------|-----------|----------------------------------------------------|
| MCU | EFM32GG11B | yes | Power modes supported |
| Low-level driver | ADC | yes | |
| | DAC | yes | VDAC, IDAC is not supported |
| | Ethernet | no | |
| | Flash | yes | |
| | GPIO | yes | Interrupts are shared across pins (see ref manual) |
| | HW Crypto | yes | |
| | I2C | yes | |
| | PWM | yes | |
| | RTCC | yes | As RTT or RTC |
| | SPI | yes | Only master mode |
| | Timer | yes | |
| | TRNG | yes | True Random Number Generator |
| | UART | yes | USART is shared with SPI. LEUART baud rate limited |
| | USB | yes | Device mode |
## Board configuration
### Board controller
The starter kit is equipped with a Board Controller. This controller provides a
virtual serial port. The board controller is enabled via a GPIO pin.
By default, this pin is enabled. You can disable the board controller module by
passing `DISABLE_MODULE=silabs_bc` to the `make` command.
**Note:** to use the virtual serial port, ensure you have the latest board
controller firmware installed.
**Note:** the board controller *always* configures the virtual serial port at
115200 baud with 8 bits, no parity and one stop bit. This also means that it
expects data from the MCU with the same settings.
### Advanced Energy Monitor
This development kit has an Advanced Energy Monitor. It can be connected to the
Simplicity Studio development software.
This development kit can measure energy consumption and correlate this with the
code. It allows you to measure energy consumption on code-level.
The board controller is responsible for measuring energy consumption. For
real-time code correlation, the CoreDebug peripheral will be configured to
output MCU register data and interrupt data via the SWO port.
By default, this feature is enabled. It can be disabled by passing
`DISABLE_MODULE=silabs_aem` to the `make` command.
Note that Simplicity Studio requires debug symbols to correlate code. RIOT-OS
defaults to GDB debug symbols, but Simplicity Studio requires DWARF-2 debug
symbols (`-gdwarf-2` for GCC).
### Clock selection
There are several clock sources that are available for the different
peripherals. You are advised to read
[AN0004.0](https://www.silabs.com/documents/public/application-notes/an0004.0-efm32-cmu.pdf)
to get familiar with the different clocks.
| Source | Internal | Speed | Comments |
|--------|----------|------------|------------------------------------|
| HFRCO | Yes | 19 MHz | Enabled during startup, changeable |
| HFXO | No | 50 MHz | |
| LFRCO | Yes | 32.768 kHz | |
| LFXO | No | 32.768 kHz | |
| ULFRCO | No | 1 kHz | Not very reliable as a time source |
The sources can be used to clock following branches:
| Branch | Sources | Comments |
|--------|-------------------------|------------------------------|
| HF | HFRCO, HFXO | Core, peripherals |
| LFA | LFRCO, LFXO | Low-power timers |
| LFB | LFRCO, LFXO, CORELEDIV2 | Low-power UART |
| LFE | LFRCO, LFXO | Real-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 Silicon Labs 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 provides a on-board SEGGER J-Link debugger through the micro USB
board so that flashing and debugging is very easy.
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 Silicon Labs SLSTK3701A starter kit we strongly recommend
the usage of the [GNU Tools for ARM Embedded Processors](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm)
toolchain.
## License information
* Silicon Labs' EMLIB: zlib-style license (permits distribution of source).
*/