Midatronics SHARKY MKR User manual

Document:
SHARKY MKR - User’s Guide
09/19/2019
SHARKY MKR
User’s Guide
MDX-MKR-STWBP-R01 : Sharky MKR PCB Ant.
MDX-MKR-STWBU-R01 : Sharky MKR uFL antenna
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change
by Midatronics S.r.l. without notice.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 1 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Outline
1. Introduction 6
1.1. Description 6
1.2. Getting Started 6
2. System Overview 7
2.1. BLE Technology Overview 7
2.2. BLE Mesh Technology overview 9
2.3. Thread Technology overview 10
2.4. STM32WB Wireless System-on-Chip 12
2.5. Block Diagram 14
2.6. Board Specifications 15
2.7. Sharky Module Block Diagram 16
3. Connectors 17
3.1. Arduino MKR Connectors 18
3.2. J1 USB connector 20
3.3. J2 SWD/Debug Connector 21
3.4. J3 VBATT Voltage Sense 22
4. Usage 23
4.1. Power Supply 23
4.3. Reset Button 24
4.4. USR/BOOT0 button 24
4.5. LED 25
5. Board Layout 26
6. Firmware Upload 27
6.1. FW upload to M4 core 27
6.2. FW upload to M0+ core 28
7. Software Development 30
7.1. STM32Cube IDE 30
7.2. Arduino IDE 32
8. References and Useful Links 33
8.1. Data Sheets and documents 33
8.2. Tools 33
8.3. WebSites 33
8.4. Bibliography 33
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 2 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Illustrations
Figure 1. Bluetooth Scatternet topology
7
Figure 2. BLE Star-bus Topology
8
Figure 3. BLE Mesh Topology
9
Figure 4. Thread Network Architecture
10
Figure 5. STM32WB55CE pinout
13
Figure 6. Sharky Module pinout
13
Figure 7. Sharky MKR Block Diagram
14
Figure 8. Sharky Module with PCB Antenna / or uFL connector
16
Figure 9. Sharky MKR board pinout
17
Figure 10. Sharky MKR connectors
18
Figure 11. USB Interface connector
20
Figure 12. SWD Connector Pinout
21
Figure 13. VBATT voltage sense
22
Figure 14. Sharky MKR Board Power Supply
23
Figure 15. Reset button circuit
24
Figure 16. USR/BOOT0 button circuit
24
Figure 17. LED Circuit
25
Figure 18. Sharky MKR board dimensional drawing
26
Figure 19. Board connections with STLink
27
Figure 20. STM32CubeIDE from ST
30
Figure 21. Arduino IDE with stm32duino support
32
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 3 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Tables
Table 1. Board Specifications
15
Table 2. Sharky MKR pinout
19
Table 3: SWD connector pinout
21
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 4 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Revisions
REVISION
DATE
DESCRIPTION
STATUS
AUTHOR
REVISER
Ver 1.0
04/04/2019
First Release
Draft
UA-EM
Ver 1.1
08/27/2019
Corrections
D6/D7
Draft
Ver 1.2
09/19/2019
Corrections
Draft
Disclaimer
All rights strictly reserved. Reproduction in any form is not permitted without
written authorization from Midatronics S.r.l.
Midatronics S.r.l.
Via Zucchi 1 20900
Monza (Monza Brianza)
Italy
www.midatronics.com
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 5 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
1. Introduction
1.1. Description
This document describes the Sharky MKR Board.
Sharky MKR board is based on the Sharky module that contains an STMicroelectronics
STM32WB55CE, a dual-core MCUs with wireless support, based on an Arm® Cortex®-M4
core running at 64 MHz (application processor) plus an Arm® Cortex®-M0+ core at 32 MHz
(network processor).
With two totally independent cores, this innovative architecture is optimized for real‑time
execution (radio‑related software processing).
The STM32WB55 Bluetooth 5.0-certified device offers Mesh 1.0 software support, multiple
profiles and flexibility to integrate proprietary BLE stacks.
OpenThread-certified software stack is available. The radio can also run BLE/OpenThread
protocols concurrently. The embedded generic MAC allows the usage of other IEEE
802.15.4 proprietary stacks like ZigBee®, or proprietary protocols, giving even more options
for connecting devices to the Internet of Things (IoT).
The board pinout is compatible with Arduino MKR boards, and can be programmed with
Arduino IDE thanks to the STM32Duino project. The processor voltage is 3.3V .
Onboard SWD connector allows programming the board with STLink in-circuit debugger and
programmer and Atollic/IAR/SW4STM32/Keil IDEs.
Main features
● Board size 65.90 x 25 mm
● Integrated BLE/OpenThread or IEEE 802.15.4 programmable networking stacks
● Processor Voltage: 3.3V
1.2. Getting Started
The Sharky MKR board, developed by Midatronics for Arrow Electronics, is a ready-to-use
Internet of Things (IoT) hardware.
Please refer to software chapter to learn how to get started to develop your application using
the Arduino IDE or STM32 Studio IDE.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 6 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2. System Overview
2.1. BLE Technology Overview
Bluetooth Low Energy (BLE) is the main feature of the Bluetooth specification v4.0 released
in December 2009. BLE is a new protocol that allows for long-term operation of Bluetooth
devices that transmit low volumes of data. BLE enables smaller form factors, better power
optimization, and the ability to operate on a small power cell for several years.
The classic Bluetooth specification defines a uniform structure for a wide range of devices
that connect to each other. Bluetooth operates primarily using ad hoc piconets. A master
device controls up to seven slaves per piconet; the slaves communicate with the master
device but they do not communicate with each other. However, a slave device may
participate in one or more piconets, essentially a collection of devices connected via
Bluetooth. A summary of classic Bluetooth topology with multiple piconets, called scatternet,
can be found below.
Figure 1. Bluetooth Scatternet topology
In a BLE topology, the slaves each communicate on a separate physical channel with the
master. Unlike a classic Bluetooth piconet, where all slaves listen for incoming connections
and therefore need to be on constant standby, a BLE slave invites connections and so is in
total control of when to consume power. A BLE master, which is assumed to have less
power constraints, will listen for advertisements and make connections on the back of an
advertisement packet. A diagram of this can be found below.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 7 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Figure 2. BLE Star-bus Topology
While BLE inherits the operating spectrum and the basic structure of the communication
protocol from the classic Bluetooth protocol, BLE implements a new lightweight Link Layer
that provides ultra-low power idle mode operation, fast device discovery, and reliable and
secure point-to-multipoint data transfers. As a result, BLE offers substantially lower peak,
average, and idle-mode power consumption than classic Bluetooth. Averaged over time,
BLE consumes only 10% of the power consumed by classic Bluetooth.
In addition to its ultra-low power consumption, BLE has several unique features that set it
apart from other available wireless technologies, including:
●Interoperability: Like classic Bluetooth devices, BLE devices follow standards set by
the Bluetooth Special Interest Group (SIG), and BLE devices from different
manufacturers interoperate.
●Robustness: BLE uses fast frequency hopping to secure a robust transmission even
in the presence of other wireless technologies.
●Ease of Use: BLE has been developed so that it is straightforward for designers to
implement it in a variety of different applications.
●Latency: The total time to send small chunks of data is generally fewer than 6 ms,
and as low as 3 ms (compared to 100 ms with classic Bluetooth).
●Range: Thanks to an increased modulation index, BLE technology offers greater
range (up to 200 feet and beyond, in ideal environments) than to classic Bluetooth
offers.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 8 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2.2. BLE Mesh Technology overview
Figure 3. BLE Mesh Topology
Borrowing from the original Bluetooth specification, the Bluetooth SIG defines several
profiles — specifications for how a device works in a particular application — for low energy
devices. Manufacturers are expected to implement the appropriate specifications for their
device in order to ensure compatibility. A device may contain implementations of multiple
profiles.
Majority of current low energy application profiles is based on the generic attribute profile
(GATT), a general specification for sending and receiving short pieces of data known as
attributes over a low energy link. Bluetooth mesh profile is the exception to this rule as it is
based on General Access Profile (GAP).
Bluetooth mesh profiles use Bluetooth Low Energy to communicate with other Bluetooth Low
Energy devices in the network. Each device can pass the information forward to other
Bluetooth Low Energy devices creating a "mesh" effect. For example, switching off an entire
building of lights from a single smartphone.
Conceptually, the Bluetooth Mesh Standard is defined as a publish/subscribe model where
publishers can publish to a certain topic and subscribers can subscribe to one or more topics
of interest.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 9 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
This concept is used as an inspiration for the implementation in the standard. A node in a
Bluetooth Mesh network can subscribe to one or more addresses (stored in the subscriber
list
) and publish to one specific address (stored in the publish address
).
To be able to connect these different publishers and subscribers, a mesh topology is
created. The standard uses BLE advertising and scanning as an underlying technology to
implement communication. To communicate in a Bluetooth Mesh network, a flooding
mechanism is used. By default, a flooding mechanism ensures that each node in the
network repeats incoming messages, so that they are relayed further, until the destination
node is reached.
The standard uses a new type of BLE advertisement packet to communicate in a mesh
network, which is only supported by devices that support both BLE and Bluetooth Mesh.
Fortunately, the standard also defines a backwards compatibility feature to ensure that BLE
devices which do not support Bluetooth Mesh can also be part of a Bluetooth Mesh network.
2.3. Thread Technology overview
Thread is a secure, wireless mesh networking protocol. The Thread stack is an open
standard that is built upon a collection of existing Institute for Electrical and Electronics
Engineers (IEEE) and Internet Engineering Task Force (IETF) standards.
The Thread stack supports IPv6 addresses and provides low-cost bridging to other IP
networks and is optimized for low-power/battery-backed operation, and wireless
device-to-device communication. The Thread stack is designed specifically for
Connected Home applications where IP-based networking is desired and a variety of
application layers can be used on the stack.
Figure 4. Thread Network Architecture
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 10 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
These are the general characteristics of the Thread stack focused on the Connected
Home:
●Simple network installation, start-up, and operation: The Thread stack
supports several network topologies. Installation is simple using a smartphone,
tablet, or computer. Product installation codes are used to ensure only authorized
devices can join the network. The simple protocols for forming and joining
networks allow systems to self-configure and fix routing problems as they occur.
●Secure: Devices do not join the network unless authorized and all
communications are encrypted and secure. Security is provided at the network
layer and can be at the application layer. All Thread networks are encrypted using
a smartphone-era authenticationscheme and Advanced Encryption Standard
(AES) encryption. The security used in Thread networks is stronger than other
wireless standards the Thread Group has evaluated.
●Small and large networks: Home networks vary from several to hundreds of
devices. The networking layer is designed to optimize the network operation
based on the expected use.
●Range: Typical devices provide sufficient range to cover a normal home. Readily
available designs with power amplifiers extend the range substantially. A
distributed spread spectrum is used at the Physical Layer (PHY) to be more
immune to interference.
●No single point of failure: The Thread stack is designed to provide secure and
reliable operations even with the failure or loss of individual devices.
●Low power: Devices efficiently communicate to deliver an enhanced user
experience with years of expected life under normal battery conditions. Devices
can typically operate for several years on AA type batteries using suitable duty
cycles.
●Cost-effective: Compatible chipsets and software stacks from multiple vendors
are priced for mass deployment, and designed from the ground up to have
extremely low-power consumption. Typical home products run in the connected
home include: normally powered (lighting, appliances, HVAC, fans), powered or
battery-operated (thermostats, smoke detectors, CO and CO2detectors, security
systems), and normally battery-operated (door sensors, window sensors, motion
sensors, door locks).
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 11 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2.4. STM32WB Wireless System-on-Chip
The Sharky MKR Board is based on STMicroelectronics STM32WB55CE, a dual-core MCUs
with wireless support based on an Arm® Cortex®-M4 core running at 64 MHz (application
processor) plus an Arm® Cortex®-M0+ core at 32 MHz (network processor).
The STM32WB platform is an evolution of the well-known market-leading STM32L4
ultra‑low‑power series of MCUs. It provides the same digital and analog peripherals suitable
for applications requiring extended battery life and complex functionalities.
STM32WB proposes a variety of communication assets, a practical crystal-less USB2.0 FS
interface, audio support, an LCD driver, up to 72 GPIOs, an integrated SMPS for power
consumption optimization, and multiple low-power modes to maximize battery life.
On top of wireless and ultra-low-power aspects, a particular focus was placed on embedding
security hardware functions such as a 256-bit AES, PCROP, JTAG Fuse, PKA (elliptic curve
encryption engine), and Root Secure Services (RSS). The RSS allows authenticating OTA
communications, regardless of the radio stack or application.
For more informations on STM32WB visit the following site:
https://www.st.com/en/microcontrollers/stm32wb-series.html?querycriteria=productId=SS196
1
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 12 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
Figure 5. STM32WB55CE pinout
Figure 6. Sharky Module pinout
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 13 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2.5. Block Diagram
Figure 7. Skarky MKR Block Diagram
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 14 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2.6. Board Specifications
Characteristics
Value
CPU Clock Speed
64 MHz
Flash Memory
512 Kbyte
SRAM
256 KByte
Connector
1 USB
1 SWD Debugger
1 battery
Arduino MKR compatible pinout
Board supply voltage
3.3 V to 5.5 V DC
Operating Voltage
3.3 V (*)
Operating Temperature
-40 °C to +85 °C
Dimensions
65.90 x 25 mm
RoHS status
Compliant
Table 1. Board Specifications
(*) All digital I/O refer to this level
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 15 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
2.7. Sharky Module Block Diagram
Figure 8. Sharky Module with PCB Antenna / or uFL connector
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 16 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
3. Connectors
This chapter gives you an overview of the Sharky MKR board connectivity.
Figure 9. Sharky MKR board pinout
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 17 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
3.1. Arduino MKR Connectors
The connectors J4 and J5 provide the user with a standard Arduino MKR shield slot as listed
below.
Figure 10. Sharky MKR Connectors
Conn
Arduino
STM
Description
Sharky
Module pin
J4-1
VREF+
VDDA**
J4-2
A0
PA0
ADC1_IN5/A0
J27
J4-3
A1
PA1
ADC1_IN6/A1
J28
J4-4
A2
PA2
ADC1_IN7/A2
J29
J4-5
A3
PA3
ADC1_IN8/A3
J31
J4-6
A4
PA4
ADC1_IN9/A4
J32
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 18 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
J4-7
A5
PA5
ADC1_IN10/A5
J33
J4-8
A6
PA6
ADC1_IN11/A6
J34
J4-9
D0
PB0
D0
J2
J4-10
D1
PB1
D1
J3
J4-11
D2
PA8
TIM1_CH1/D2
J36
J4-12
D3
PA9
TIM1_CH2/D3
J37
J4-13
D4
PA10
TIM1_CH3/D4
J7
J4-14
D5
PA15
TIM2_CH1/D5
J10
J5-1
D6
PE4
D6/LED0
J4
J5-2
D7
PB2
D7/SPI1_SSEL
J38
J5-3
D8
PB5
SPI1_MOSI/D8
J13
J5-4
D9
PB3
SPI1_SCK/D9
J11
J5-5
D10
PB4
SPI1_MISO/D10
J12
J5-6
D11
PB9
I2C1_SDA/D11
J25
J5-7
D12
PB8
I2C1_SCL/D12
J23
J5-8
D13
PB7
USART1_RX/D13
J20
J5-9
D14
PB6
USART1_TX/D14
J15
J5-10
RESET
7-NRST
RESET*
J5-11
GND
GND
J5-12
VCC
3V3
J5-13
VIN
VIN
J5-14
5V
5V
Table 2: Sharky MKR pinout
* see reset circuit in DBG connector
** On UFQFPN48 VDDA is connected to VREF+.
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 19 of 33

Document:
SHARKY MKR - User’s Guide
09/19/2019
3.2. J1 USB connector
The board is equipped with an USB (J1) Full-Speed (12 Mbps) device port on J1 connector.
The Sharky MKR board can be powered through this interface.
Figure 11. USB Interface connector
Doc: UG_MDX-MKR-STWBx Rev 1.2
pag. 20 of 33
Table of contents
Popular Motherboard manuals by other brands

CHAINTECH
CHAINTECH 6AIV6 manual

ON Semiconductor
ON Semiconductor AR0841CS user manual

Cypress Semiconductor
Cypress Semiconductor S6SBP401AJ0SA1001 Operation guide

Texas Instruments
Texas Instruments TPA3244EVM user guide

National Semiconductor
National Semiconductor ADC08100 instruction manual

Texas Instruments
Texas Instruments FDC2214 user guide