Thingy:52

Warning

Nordic Semiconductor no longer offers support for this board, so it is not recommended for new prototypes.

Overview

Zephyr uses the thingy52/nrf52832 (PCA20020) board configuration for building for the Thingy:52 board. The board has the nRF52832 MCU with ARM Cortex-M4F processor, a set of environmental sensors, a pushbutton, and two RGB LEDs.

  • ADC

  • CLOCK

  • FLASH

  • Gas sensor

  • GPIO

  • GPIO Expander

  • Humidity and temperature sensor

  • I2C

  • MPU

  • NVIC

  • Pressure sensor

  • PWM

  • RADIO (Bluetooth Low Energy)

  • RGB LEDs

  • RTC

  • SPI

  • UART

  • WDT

More information about the board can be found at the nRF52 DK website [1]. The Nordic Thingy:52 guide [2] contains the processor’s information and the datasheet.

Hardware

Thingy:52 has the following features:

  • Two RGB LEDs

  • CO2 and TVOC sensor

  • Humidity and temperature sensor

  • Color sensor

  • I2C GPIO expander

  • Provisions for a pin header and I2C and serial connectors

  • Bluetooth radio

Supported Features

The thingy52 board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.
thingy52
/
nrf52832

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

Nordic Semiconductor nRF family SAADC node1

nordic,nrf-saadc

ARM architecture

on-chip

Nordic UICR (User Information Configuration Registers)1

nordic,nrf-uicr

on-chip

Nordic nRF family BPROT (Block Protection)1

nordic,nrf-bprot

on-chip

Nordic EGU (Event Generator Unit)6

nordic,nrf-egu

on-chip

Nordic nRF family MWU (Memory Watch Unit)1

nordic,nrf-mwu

Audio

on-chip

Nordic PDM (Pulse Density Modulation interface)1

nordic,nrf-pdm

Clock control

on-chip

Nordic nRF clock control node1

nordic,nrf-clock

Comparator

on-chip

Nordic nRF COMP (analog COMParator)1

nordic,nrf-comp

Counter

on-chip

Nordic nRF timer node5

nordic,nrf-timer

Cryptographic accelerator

on-chip

Nordic ECB (AES electronic codebook mode encryption)1

nordic,nrf-ecb

on-chip

Nordic nRF family CCM (AES CCM mode encryption)1

nordic,nrf-ccm

Debug

on-chip

ARMv7 instrumentation trace macrocell1

arm,armv7m-itm

Flash controller

on-chip

Nordic NVMC (Non-Volatile Memory Controller)1

nordic,nrf52-flash-controller

GPIO & Headers

on-board

SX1509B GPIO1

semtech,sx1509b

on-chip

NRF5 GPIOTE1

nordic,nrf-gpiote

on-chip

NRF5 GPIO1

nordic,nrf-gpio

I2C

on-chip

Nordic nRF family TWIM (TWI master with EasyDMA)2

nordic,nrf-twim

I2S

on-chip

Nordic I2S (Inter-IC sound interface)1

nordic,nrf-i2s

IIO

on-board

Description for a voltage divider, with optional ability to measure resistance of the upper leg1

voltage-divider

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

Miscellaneous

on-chip

Nordic FICR (Factory Information Configuration Registers)1

nordic,nrf-ficr

on-chip

Nordic nRF family PPI (Programmable Peripheral Interconnect)1

nordic,nrf-ppi

MTD

on-chip

Flash node1

soc-nv-flash

on-board

Fixed partitions of a flash (or other non-volatile storage) memory1

fixed-partitions

Networking

on-chip

Nordic nRF family RADIO peripheral1

nordic,nrf-radio

on-chip

Nordic nRF family NFCT (Near Field Communication Tag)1

nordic,nrf-nfct

Pin control

on-chip

The nRF pin controller is a singleton node responsible for controlling pin function selection and pin properties1

nordic,nrf-pinctrl

Power management

on-chip

Nordic nRF power control node1

nordic,nrf-power

PWM

on-chip

nRF PWM3

nordic,nrf-pwm

on-chip

nRFx S/W PWM1

nordic,nrf-sw-pwm

Regulator

on-chip

Nordic nRF5X regulator (fixed stage of the core supply)1

nordic,nrf5x-regulator

on-board

Fixed voltage regulators2 3

regulator-fixed

Retained memory

on-chip

Nordic GPREGRET (General Purpose Register Retention) device2

nordic,nrf-gpregret

RNG

on-chip

Nordic nRF family RNG (Random Number Generator)1

nordic,nrf-rng

RTC

on-chip

Nordic nRF RTC (Real-Time Counter)3

nordic,nrf-rtc

Sensors

on-board

STMicroelectronics LPS22HB pressure sensor1

st,lps22hb-press

on-board

STMicroelectronics HTS221 humidity and temperature sensor on I2C bus1

st,hts221

on-board

CCS811 digital air quality sensor1

ams,ccs811

on-board

STMicroelectronics LIS2DH12 3-axis accelerometer1

st,lis2dh12

on-chip

Nordic nRF family TEMP node1

nordic,nrf-temp

on-chip

Nordic nRF quadrature decoder (QDEC) node1

nordic,nrf-qdec

Serial controller

on-chip

Nordic nRF family UARTE (UART with EasyDMA)1

nordic,nrf-uarte

SPI

on-chip

Nordic nRF family SPI (SPI master)3

nordic,nrf-spi

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

Watchdog

on-chip

Nordic nRF family WDT (Watchdog Timer)1

nordic,nrf-wdt

Connections and IOs

Lightwell RGB LED

The LED is driven by the SX1509B GPIO expander chip (device name GPIO_P0).

GPIO Expander Pin

LED Channel

5

Green

6

Blue

7

Red

Button

Thingy:52 has a pushbutton, connected to the P0.11 SOC GPIO pin.

Serial

By default the system UART has the following pin configuration:

SOC Pin

Signal

P0.02

TX

P0.03

RX

The pins can be found on the P4 and P6 connectors. The system UART console uses these pins by default.

Internal I2C Bus

The internal I2C bus (I2C_0) is not routed to any of the external connectors, but most of the on-board devices are accessed through it. The following pins have been assigned to the bus:

SOC Pin

Signal

P0.07

SDA

P0.08

SCL

The following devices are attached to the bus.

Device

Address

SX1509B

0x3e

LPS22HB

0x5c

HTS221

0x5f

CCS811

0x5a

External I2C Bus

The external I2C bus (I2C_1) can be found on the P4 header and the P5 and P7 connectors.

SOC Pin

Signal

P0.14

SDA_EXT

P0.15

SCL_EXT

Pin Header

This is the pinout of the P4 pin header. Some of the SOC GPIO pins and I2C GPIO expander pins are accessible through it. It also allows attaching external devices to the four on-board N-channel MOSFET transistors.

Pin

Device

Signal / Device Pin

1

SOC

SCL_EXT / P0.15

2

SOC

SDA_EXT / P0.14

3

SOC

ANA/DIG0 / P0.02

4

SOC

ANA/DIG1 / P0.03

5

SOC

ANA/DIG2 / P0.04

6

GND

7

GPIO Expander

Pin 0

8

GPIO Expander

Pin 1

9

GPIO Expander

Pin 2

10

GPIO Expander

Pin 3

11

MOSFET 1

Drain

12

MOSFET 1

Source

13

MOSFET 2

Drain

14

MOSFET 2

Source

15

MOSFET 3

Drain

16

MOSFET 3

Source

17

MOSFET 4

Drain

18

MOSFET 4

Source

19

VDD

20

GND

MOSFETs

The MOSFETs are attached to the following SOC GPIO pins:

Device

Gate Pin

MOSFET 1

P0.18

MOSFET 2

P0.19

MOSFET 3

P0.20

MOSFET 4

P0.21

Power Rails

Thing:52 has multiple power rails. The necessary rails for the currently supported devices are listed here.

Name

Derived from

Controlled by

VREG

The battery

Always on

VDD_nRF

VREG

Always on

VDD

VREG

SOC pin P0.30

VDD_CCS

VDD

GPIO expander pin 10

Due to the dependencies of the power rails, multiple rails may need to be powered for a given device to turn on. The correct order of powering up the rails is the order of the rails down the dependency chain. For example, in order to power the CCS811 gas sensor, VDD has to be turned on first and VDD_CCS after it. Here’s a list of the devices and their power rails:

Device

Rail

nRF52832

VDD_nRF

SX1509B

VDD

LPS22HB

VDD

HTS221

VDD

CCS811

VDD_CCS

Sensors

Device

Function

Bus

I2C Address

Power Rail

LPS22HB

Pressure and Temperature sensor

I2C_0

0x5c

VDD

HTS221

Humidity and Temperature sensor

I2C_0

0x5f

VDD

CCS811

Gas sensor

I2C_0

0x5a

VDD_CCS

Misc. Device Pins

SX1509B

Device Signal

SOC Pin

SX_OSCIO

P0.05

SX_RESET

P0.16

LPS22HB

Sensor Signal

SOC Pin

LPS_INT

P0.23

HTS221

Sensor Signal

SOC Pin

HTS_INT

P0.24

CCS811

Sensor Signal

GPIO Expander Pin

CCS_RESET

11

CCS_WAKE

12

Programming and Debugging

Flashing

Flashing Zephyr onto Thingy:52 requires an external J-Link programmer. The programmer is attached to the P9 programming header.

Debugging

Thingy:52 does not have an on-board J-Link debug IC as some other nRF5 development boards, however, instructions from the Nordic nRF5x Segger J-Link page also apply to this board, with the additional step of connecting an external debugger. A development board with a Debug out connector such as the nRF52 DK can be used as a debugger with Thingy:52.

Testing board features

The green lightwell LED can be tested with the Blinky example.

# From the root of the zephyr repository
west build -b thingy52/nrf52832 samples/basic/blinky
west flash

Also the temperature and humidity sensor can be tested with the HTS221 Temperature and Humidity Monitor sample.

# From the root of the zephyr repository
west build -b thingy52/nrf52832 samples/sensor/hts221
west flash

References