Skip to content

MCU Info Page: Arduino Nicla Sense ME

Jamie Smith edited this page May 16, 2024 · 2 revisions

Nicla Sense ME Overview

The Arduino Nicla Sense ME is a small Mbed-compatible board from Arduino containing a general-purpose microcontroller with Bluetooth capabilities. The Arduino Nano 33 BLE uses a U-Blox ANNA-B112 module, which itself contains an nRF52832 MCU. Unlike most Arduino boards, the Nicla Sense ME includes a built-in debugger (yes!), so you can flash and debug it just like a normal Mbed-enabled board with no modifications. This board is a convenient option for smaller projects which need to use bluetooth and various sensors (motion, etc) in a small form factor!

Nicla Sense ME

Feature Overview

CPU Flash/Code Memory RAM Communication Peripherals Other Features
Cortex-M4F, clocked at up to 64 MHz Total: 512KiB
Available to user:* 457 kiB
Total: 64kiB
Available to user:* 54kiB
  • 2x I2C/SPI combo
  • 1x additional SPI
  • 1x UART
  • Bluetooth 5 radio
  • 8-input ADC (AnalogIn)
  • 3x PWM (independent frequencies)
  • Hardware RNG
  • DMA (only supported for UART)
  • Watchdog (currently not supported)

*"Available to user" subtracts both regions of memory unusable by Mbed OS projects and the baseline memory used by a minimal build of Mbed OS.

Targets and Upload Methods

To build Mbed OS for this board, use the ARDUINO_NICLA_SENSE_ME target. OPENOCD and PYOCD are enabled as UPLOAD_METHOD values, and OPENOCD is recommended.

Bluetooth Stacks

There are two Bluetooth stacks in existence for this microcontroller: Nordic SoftDevice and Arm Cordio. SoftDevice is closed-source and provided as a precompiled binary from Nordic, complicating the build process significantly. Arm Cordio is an open-source Bluetooth stack produced by Packetcraft and ARM, and is included as part of the Mbed OS source code (in the connectivity/FEATURE_BLE/libraries/cordio_stack folder).

Mbed OS used to support both stacks, but SoftDevice support was removed in Mbed OS 5.11 (perhaps so that ARM could promote its internally developed stack instead?). Currently only Cordio is supported and is used automatically. However, users should be aware that Cordio has issues that prevent nRF MCUs from entering a low-power state when using Bluetooth -- users have not been able to get it below ~1.5mA. Sadly, development on open-source Cordio appears to be dead as it became a private company, so this is unlikely to be fixed anytime soon.

Instead, the option that seems more promising is resurrecting the old SoftDevice interface, enabling Mbed to use Nordic's maintained stack. Mbed Community Edition is interested in doing this work but there is no concrete plan for this as of yet.

Misc MCU Info

Pin Mapping

Most Mbed boards are limited to using specific peripherals (e.g. I2C, SPI, PWM) on specific pins. However, the Nano 33 BLE and its nRF52840 allow using most peripherals (aside from USB and the ADC) on absolutely any pin on the device. This means you aren't restricted to the pins labeled as SPI and I2C in the pinout! However, you still must respect the total number of peripherals available, e.g. you can only create a total of two UARTs and four PWMs at any one time.

There's an additional consideration for SPI and I2C busses: Each of the two I2C instances shares resources with one of the three SPIs. So, if you create two I2Cs, you only can create one SPI, and if you create three SPIs you can't use I2C at all.

Timer Usage

The nRF52840 features five 32-bit timer/counter modules. Mbed OS uses TIMER1 to provide its internal time reference, leaving the other four timers (TIMER0, TIMER2-TIMER4) available for you to use.

I2C Frequencies

The Mbed HAL implementation for nRF52 currently only supports three I2C frequencies: 100kHz, 250kHz, and 400kHz. The frequency you pass to I2C::frequency() is rounded down to the nearest frequency, and frequencies below 100kHz are rounded up.

Mbed CE is interested in removing this limitation but no concrete plans have been made.

Datasheets