May 2018 UM2245 Rev 2 1/44
1
UM2245
User manual
Sigfox™ software expansion for STM32Cube
Introduction
This user manual describes the Sigfox™ embedded expansion software implementation on
the CMWX1ZZABZ-091 or CMWX1ZZABZ-078 Murata modules. X-CUBE-SFOX is the
name of the corresponding STM32Cube Expansion Package.
This user manual also explains how to interface with the Sigfox™ API from an application
point of view.
Sigfox™ is a type of wireless telecommunication network designed to allow long-range
communication at very low bit rates and enable the use of long-life battery-operated
sensors. The Sigfox Stack™ library from Sigfox™ manages the channel access and
security protocol that ensures interoperability with the Sigfox™ network.
The Sigfox™ software expansion for CMWX1ZZABZ modules is Sigfox Verified™.
X-CUBE-SFOX main features are:
Application integration ready
Easy add-on of the low-power LoRa
®
solution
Extremely low CPU load
No latency requirements
Small STM32 memory footprint
Low-power timing services provided
The X-CUBE-SFOX software is based on the STM32Cube HAL drivers (refer to Chapter 3:
X-CUBE-SFOX stack description).
This user manual targets the following tool:
B-L072-LRAWAN1 STM32 Discovery kit embedding the CMWX1ZZABZ-091 module
from Murata. CMWX1ZZABZ-091 embeds the STM32L072 microcontroller.
www.st.com
Contents UM2245
2/44 UM2245 Rev 2
Contents
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Sigfox™ standard overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 End-device hardware architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Regional radio resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Tx/Rx radio time diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Listen before talk (LBT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 X-CUBE-SFOX stack description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
3.2 Sigfox™ certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
3.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5 Required STM32 peripherals to drive the radio . . . . . . . . . . . . . . . . . . . . 13
3.5.1 Radio reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.2 Radio SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.3 RTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.4 TIMER2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.5 Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 X-CUBE-SFOX middleware programming guidelines . . . . . . . . . . . . . 15
4.1 Sigfox™ Core library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.1 Opening the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.2 Sigfox Addon Verified library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.3 Sending frames/bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.4 Set standard configuration for FH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Library Sigfox™ modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Cmac library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4 Credentials library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22