SlideShare a Scribd company logo
October 4, 2016
Santa Clara Convention Center
Mission City Ballroom
Getting Started with STM32 IoT DK
Slim Jallouli
David Kwak
AgendaPresentation
• Seminar Material Installation
• Overview of the STM32 Portfolio
• Overview of the STM32L475 Discovery IoT Node
• STM32Cube Introduction
• IAR License installation
• ST-Link Driver Installation
• Lab1 : Simple Blinky LED
• BLE Overview
• Lab2 : Simple BLE pairing
• Wi-Fi Module Overview
• Lab3 : Wi-Fi Configuration
• Amazon AWS IoT Overview
• Lab4 : Connect to AWS IoT
• Lab5 : Connect to a Different MQTT Topic
2
Tools installation
Seminar Materials Installation
• Each participant should have received a USB Flash drive. It contains the
Seminar Installer. This will install Tera Term, the latest Java, STM32CubeMX,
STM32CubeL4 HAL, and extract the seminar file to
C:STM32IoTDKCloudSeminar.
• Please insert the USB Drive to your machine. Copy all the files to your
desktop and execute the installer
(STM32_IoT_DK_Cloud_Training_Installer-1.04.exe).
• At the end of the seminar material installation, we will continue with ST-Link
Utility and IAR installation.
4
IAR installation
• Run the IAR professional tool suite installer:
C:STM32IoTDKCloudSeminarIAR.
• From the installer menu select Install IAR Embedded Workbench.
5
Overview of the STM32 portfolio
STM32 wide portfolio
9 product series / more than 32 product lines
398 CoreMark
120 MHz
150 DMIPS
Ultra-low-power
Mainstream
Cortex-M0
Cortex-M0+
Cortex-M3 Cortex-M4 Cortex-M7
106 CoreMark
48 MHz
38 DMIPS
245 CoreMark*
72 MHz
90 DMIPS
(*) from CCM-SRAM
177 CoreMark
72 MHz
61 DMIPS
608 CoreMark
180 MHz
225 DMIPS
75 CoreMark
32 MHz
26 DMIPS
93 CoreMark
32 MHz
33 DMIPS
High-performance 1 082 CoreMark
216 MHz
462 DMIPS
273 CoreMark
80 MHz
100 DMIPS
7
Ecosystem category
Releasing your creativity
What is MCU Ecosystem?
All collaterals required to develop with an MCU
Hardware Development
Tools
Evaluation boards
Debug and Programming Probes
Software Development
Tools
Configuration Tools
Development & Debugging Tools
Monitoring Tools
Embedded Software
Drivers
RTOS
Stacks and Application Bricks
Information and sharing
Web site
Product selectors
Communities & Social Media
Ecosystem
ST-designed
Open source
Partners
9
3rd Parties
Full evaluation, Open hardware,
Optimization, Expansions, …
Hardware Development Tools
Development Tools adapted to your needs
Specialized
functionality
add-on Connectivity, Sensors…
Other Divisions
Microcontroller Division
STM32 Nucleos
Fast agile prototyping
Discovery Kits
Feature highlight, prototyping
Evaluation Boards
Full feature evaluation
32-pin 64-pin 144-pin
10
STM32 ecosystem SW development tools
C/C++ Focus
STM32CubeMX
Configure & Generate Code
STMStudio
Monitor
A complete flow, from configuration up to monitoring
Partners IDEs
Compile and Debug
FREE
IDE’s
11
Overview of the STM32L475
Discovery Kit IoT Board
STM32L475 Discovery IoT Node
Microphone
Microphone
BlueNRG
Sub GHz
Wi-Fi
NFC EEPROM
QSPI Flash
STM32L475VG
TOF Sensor
Sensors Mag Sensor
User Button
Reset Button
User LEDs
ST-Link + VCP
ST-Link Status LED
USB-OTG
PMOD
Arduino Connector
Arduino Connector
Power
13
STM32L475 Block Diagram 14
Key features
• Cortex M4 with DSP, FPU @ 80MHz and ART
• 1.71V – 3.6V supply 80 MHz Full functional
• 1MB Flash dual bank/ 128KB RAM
• USB OTG FS –LPM Battery Charging Detection
• 3 x Ultra-low-power 12-bit ADC 5 M
• Touch-Sensing 24 channels
• Ultra-low power
• VBAT
• Better Wake Up time vs. STM32L1
• Down to 160µA/MHz dynamic
• New set of Com. peripherals
• I²C FM+
• SPI: variable data length
• USART
• LP UART & 16-bit Timer
• FSMC, Quad SPI
• CAN, SWPMI, SDMMC, 2x SAI
• Digital filter for Sigma delta modulator
• 16 x timers
• Analog: Op-Amps, comparators, DAC, VREF, temperature
sensor
• RNG
Wireless Connectivity – Wi-Fi
• Inventek ISM43362 Wi-Fi Module
• 802.11 b/g/n compliant module based on a Broadcom MAC/Baseband/Radio device.
• Fully contained TCP/IP stack minimizing host CPU requirements.
• FCC and CE certified.
• Secure Wi-Fi authentication supporting WEP-128, WPA-PSK (TKIP), WPA2-PSK.
15
Wireless Connectivity - BLE
• ST SPBTLE-RF BLE Module
• Based on our ST BlueNRG-MS BLE 4.1 Wireless Network Processor
• Bluetooth Low Energy 4.1 compliant
• FCC and BQ certified module with integrated balun & antenna.
16
Wireless Connectivity - SubGHz
• ST SPSGRF-915 (915 MHz) Sub GHz Module
• FCC and IC certified module with integrated balun & antenna.
• Supports 2-FSK, GFSK, MSK, GMSK, OOK and ASK modulation schemes.
• Long range (100s of meters+) with an air data rate from 1 to 500 kbps
17
Wireless Connectivity - NFC
• ST M24SR64-Y Dynamic NFC/RFID Tag
• NFC Forum Type 4 Tag
• ISO/IEC 14443 Type A
• 106 Kbps Data Rate
18
Wired Connectivity Features
• ST-Link V2
• Programming and Debug Interface
• USB OTG FS
• Full Speed USB On-The-Go Communication Interface
• PMOD
• Peripheral Module Interface Supporting GSM, GPS, LoRa, etc..
• Arduino Connectors
• Arduino Compatible Connectors to Interface with Additional ST X-NUCLEO or 3rd Party
Expansion Board.
19
Sensors
• Full Range of Motion & Environmental MEMS Sensors
• ST LSM6DSL Accelerometer + Gyro Sensor
• ST LIS3MDL Magnetometer Sensor
• ST HTS221 Humidity + Temperature Sensor
• ST LP222HB Pressure Sensor
20
Sensors
• ST VL53L0X Time-of-Flight Range Sensor
• Integrated High Accuracy Proximity/Range Sensor
• ST MP34DT01 MEMS Digital Microphones
• Utilize for Voice & Audio Recognition Functions
• Incorporate as an Acoustic Beam Forming Feature
21
User Resource Features
• Reset and User Buttons
• Board Reset and Programmable Application Buttons
• User LEDs
• Programmable Application LEDs
• QSPI Flash
• 64Mbit for Data Storage and Program Execution
• Selectable Power Supply
• ST-Link, USB-OTG, Arduino or External Power
22
Summary
Advantages of Single Board vs Modular
• Easily Debug Hardware Issues on a Single Board.
• Collateral Includes Tightly Coupled Firmware
• BSP Included for All Board Components
• Cloud Connectivity Reference Solutions Included
• Represents a Cost Effective Development Solution
• $35 vs. $125 in a typical modular solution
• No Need to Manage & Order Multiple Board SKUs.
23
STM32L475 IoT Node Board Status
• Pre-release board.
• Software, Firmware and documentation is under development.
• Scheduled full package release in Q1 17.
• For support use On Line Support
http://www.st.com/content/st_com/en/support/online-support.html
• Reference STM32L and STM32L475 Discovery IoT node in the subject.
24
STM32CubeTM Introduction
STM32CubeTM
Introduction
• STM32CubeTM includes:
• A configuration tool, STM32CubeMX generating initialization code from user choices
• Firmware offering, delivered per series (like STM32CubeF4) with:
• An STM32 Abstraction Layer embedded software: STM32Cube HAL
• A consistent set of Middleware: RTOS, USB, TCP/IP, Graphics, …
2626
STM32CubeMX
STM32CubeF3
STM32CubeF2
STM32CubeF4
STM32CubeF1
STM32CubeF0
STM32CubeL1
STM32CubeL0
Pinout Wizard
Clock Tree wizard
Peripherals & Middleware
Wizard
Power Consumption
Wizard
STM32CubeMX
2727
STM32CubeMX
Generates Initialization C Code
based on user choices !
2828
STM32CubeMX
MCU Selector
• Filter by:
• Series
• Line
• Package
• Peripherals
29
STM32CubeMX
Pin-out configuration
• Pinout from:
• Peripheral tree
• Manually
• Automatic signal remapping
• Management of dependencies
between peripherals
30
STM32CubeMX
Clock tree
• Immediate display of all clock
values
• Management of all clock constraints
• Highlight of errors
31
STM32CubeMX
Peripheral configuration
• Global view of used
peripherals and
middleware
• Highlight of configuration
errors
• Manage:
• GPIO
• Interrupts
• DMA
32
Power consumption calculator
• Power step definitions
• Battery selection
• Creation of consumption
graph
• Display of
• Average consumption
• Average DMIPS
• Battery lifetime
33
STM32Cube Firmware Components 34
Hardware Abstraction Layer API Boards Support Packages
Drivers
HAL level Examples
Board Demonstrations
Evaluation boards Discovery boards Nucleo boards
Networking
LwIP TCP/IP
& Polar SSL
File system
FATFS
Graphics
STemWin
USB
Host & Device
Middleware level Applications
Middleware
RTOS
FreeRTOS
F4 Family
STM32F401
CMSIS
Utilities
STM32F405/7 STM32F429 STM32F439
HAL
IAR License Installation
IAR License Installation
• Open IAR
• Go to Help->License Manager
• Go to License->Offline Activation…
• Use C:STM32IoTDKCloudSeminarIARActivationResponse.txt for the activation response.
36
ST-Link Installation
ST-Link Utility Installation
• The ST-Link Utility allows typical flash program / erase / upload / download
functions via the ST-LINK/V2 debugger, onboard the STM32L475 Discovery
IoT node Board. It also installs the Windows device drivers necessary for the
ST-LINK/V2 debugger.
• Run the installer that can be found at: C:STM32IoTDKCloudSeminar
SoftwareSTM32 ST-LINK Utility_v4.0.0.exe
38
ST-Link Driver installation
ST-Link + VCP
ST-Link Status LED
39
• Connect USB ST-LINK to your PC
• The board is powered thorough the ST-LINK.
• The ST-Link Status LED will be steady when the ST-Link is recognized.
Lab1: Getting Started with STM32CubeMX
Create New Project
• From your desktop open STM32CubeMX software.
• Click New Project
41
Select the Microcontroller
• Under Series select STM32L4
• Under Lines select STM32L4x5
• Under Package select LQFP100
• Select STM32L475VGTx
• Click “OK”
1
2
3
4
5
1 2 3
4
5
42
GPIO selection
• In this example we are going to use the
LED2 present on the IoT DK board.
• Use the find toolbar and type PB14.
• Select PB14 and set it to GPIO_Output
mode.
43
PB14
GPIO Configuration
• Select the Configuration tab
• Select GPIO under System.
• Select PB14.
• Set the GPIO output level to High.
• Click Ok.
44
1
2
3
4
1
2
3
4
Project Settings
• Open the project Settings (Alt + P).
• Set the project name to Lab1.
• Set the project location
C:STM32IoTDKCloudSeminarHands_on
• Set the IDE Toolchain to EWARM.
• Click OK.
45
1
2
3
4
1
2
3
4
Generate and Open the Project
• Generate Code (Ctrl + Shift + G)
• Click Open Project.
46
Inside IAR EWARM 47
Files Window
Project
Window
Build Button Debug Button
Configure IAR to Show Line Numbers
• Go to ToolsOptions
• Select Editor
• Check the Show line number
• Click OK
48
1
2
3
4
Edit main.c
• Expand the file tree and open the
main.c file
• Add the following code inside the
while(1) loop:
HAL_Delay(100); /* Delay for 100ms */
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);
49
Load and Run
• Click the GREEN ARROW to Build
the Project, Download and start the
debugger. (Ctrl + D)
• Click the triple-arrow GO button!
(F5)
• Enjoy the LED!
50
BLE Overview
What is BLE?
• BLE technology
• Short range wireless ISM 2.4 GHz
• Optimized for ultra low power
• <15 mA peak current
• <50 uA average current
• Fast connection procedure
• Client server architecture
• Low data throughput application
• Security including privacy/authentication/authorization
• Based on encryption AES128
• Master Role : Central Device (Scanning, Initiating Connection)
• Slave Role : Peripheral Device (Advertising)
52
The Bluetooth SMART Marks Overview
• Ultra low power consumption being a pure low energy implementation
• Months to years of lifetime on a standard coin cell battery
• Classic Bluetooth + Bluetooth low energy on a single chip (small price delta)
• These are the hub devices of the Bluetooth ecosystem
53
Bluetooth SMART stack partitioning
• The application collects & computes the data to be transmitted
over BLE.
• To transmit data , application use BLE stack services and
characteristics capabilities thanks to standard or
proprietary application profile.
• All communication in low energy takes place over the Generic
Attribute Profile (GAP).
• PHY layer insures communication with stack & data (bits)
transmission over the air
54
BlueNRG BLE Solution - Available from ST
• Single mode Bluetooth® SMART wireless network
processor
• 2.4GHz RF transceiver
• Cortex-M0 microcontroller (running the BT MS stack)
• AES 128-bit co-processor
• Master and Slave Mode BLE (4.1) Network Processor.
• On chip non-volatile Flash memory allows OTA BLE-stack
upgrade. Stack qualified.
• ICCRX 7.3mA
• ICCTX 8.2mA @ 0 dBm
• ICCSleep 1.7µA
• ICCShutdown 2.5nA
• QFN32: 5 x 5 x 1mm
Integration
Flexibility
Low power
Small size
SPI Bus
Binary
Library
Source Code
Customer Code
All trademarks and logos are the property of their respective owners. All rights reserved. They are used here only as conceptual
examples
• + STM32 Consumption & Size
55
Lab2: Simple BlueNRG pairing
Goal
• This lab is to make sure that your BlueNRG device has a unique name and
MAC address.
• This test demonstrates a way to drive a BlueNRG device and communicate
with a smartphone and display environmental data.
• The IoT DK will be used as server while the applet is a client.
• You need to download the ST BlueMS application available on App store and
google play.
57
Open BlueNRG_Test Project
• Now we are going to configure the BlueNRG_Test program to give the
BlueNRG module a unique MAC address and Unique device name. The
device name will be used later to identify your board.
• Close the previous IAR project.
• Double click on file located under
C:STM32IoTDKCloudSeminarHands_onBlueNRG_TestEWARM.
58
BlueNRG Module configuration
• Open main.c file and replace the ‘X’, ‘X’ in the local_name table with your attendee
number.
• Replace the XX in the baddr table with your ID number.
• Example: attendee number = 3
• Example: attendee number = 16
59
Run the Test Program
• Compile and load the project. You can do that by pressing Ctrl + D or using
the Download and Debug button
• The project will compile, load and then stop at the main function.
• Click on the Go button to run
the program (F5)
60
Communicate with BlueMS App
• Using your phone open the BlueMS app.
• Click on START DISCOVERING.
• Identify your device using the Device name BlueNRGXXX with XXX is the number you have entered during
the board configuration. Click on your device name to connect to it.
• You should see the pressure and humidity information.
1
2
3
1
2
3
61
Debug the firmware 62
• Now we are going to set beak point
to stop the program execution when
a client is connected/disconnected
to the device.
• Keep the program running and open
the sensor_service.c file.
• Set a break point at line 423 and
line 437.
• To set break point, left click on
the left side of the line where
you want to set it.
Debug the firmware
• Now from your phone disconnect from the device:
• For Android users Press the back button
• For iOS users press the Devices button
• Once you disconnect the program will hit the break point at line 437 and stop
execution.
• Resume the execution by pressing the Go button (F5).
• Connect to the device from your phone application as we did on slide 44.
• Now the program will hit the break point at line 423.
63
Wi-Fi Module Overview
ISM43362-M3G-L44-E/U
• The ISM43362-M3G-L44-E/U is an embedded 2.4 GHz Wi-Fi module from
Inventek. The Wi-Fi module hardware consists of a Broadcom BCM43362, an
integrated antenna or optional external antenna, and a STM32F205 host processor
that has a standard USB, SPI or UART interface capability.
• The Wi-Fi has an integrated TCP/IP stack that only requires a simple AT command
set to establish connectivity for your wireless product.
65
Lab3: Wi-Fi Module Configuration
Tera Term Configuration
• First thing we need to configure Tera Term to communicate with ST-Link over the virtual com
port. This is needed later during this lab to get the Wi-Fi module IP address.
• Open Tera Term.
• Select the STMicroelectronics STLink Virtual COM Port and click OK.
• Open Setup->Serial port…
• Set the Baud rate to 115200, 8 bit, Parity none, Stop 1 and Flow control none.
67
Wi-Fi Module Configuration
• In this lab we are going to configured the Wi-Fi MAC address and Wi-Fi SSID and password.
• Close the previous IAR project.
• Double click on file located under C:STM32IoTDKCloudSeminarHands_onWIFI_TestEWARM.
1. Open aws_iot_config.h file.
2. Update the Wi-Fi Module MAC0 address. Use your participant number found on your box.
3. Update the NETWORK_SSID “STM32_DevConTraining”.
4. Update the NETWORK_PSK “stm32iot”.
68
1
2
3
4
1
2
3
4
Compile and Run the project
• Compile and load the project. You can do that by pressing Ctrl + D or using
the Download and Debug button
• The project will compile, load and then stop at the main program.
• Click on the Go button to run
the program (F5)
69
Verify Your Internet Connection
• Open Tera Term window.
• After obtaining an IP address, the
board will send a ping command to
www.google.com.
You should see the ping command
result displayed on the terminal.
70
AWS IoT Overview
What is AWS IoT
• The Amazon AWS IoT service enables secure, bidirectional communication between IoT
devices and the cloud over MQTT, HTTP and WebSockets.
• IoT devices are authenticated using AWS IoT service-provided X.509 certificates. Once a
certificate is provisioned and activated it can be installed on a device. The device will then
use that certificate to send all requests to AWS MQTT.
72
AWS Security Overview 73
AWS IoT Services
&
Authentication
Host
processor
Application
AT Command
STM32
TCP/IP
Wi-Fi
TLS
MQTT
Certs &
Keys
IoT Node
What is MQTT
• MQTT stands for MQ Telemetry Transport. It is a publish/subscribe,
extremely simple and lightweight messaging protocol, designed for
constrained devices and low-bandwidth, high-latency or unreliable networks.
• The design principles are to minimize network bandwidth and device
resource requirements whilst also attempting to ensure reliability and some
degree of assurance of delivery. These principles also turn out to make the
protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of
Things” world of connected devices, and for mobile applications where
bandwidth and battery power are at a premium.
Source: http://mqtt.org/
74
Lab 4: Connect to AWS IoT
STM32 IoT Development Kit 76
ST-Link &
VCP
Wi-Fi
User
button
STM32L475VGT6
ST-Link Status
LED
User
LED
Tera Term Configuration
• First thing we need to configure Tera Term to communicate with ST-Link over the virtual com
port. This is needed later during this lab to get the Wi-Fi module IP address.
• Open Tera Term.
• Select the STMicroelectronics STLink Virtual COM Port and click OK.
• Open Setup->Serial port…
• Set the Baud rate to 115200, 8 bit, Parity none, Stop 1 and Flow control none.
77
Wi-Fi Module Configuration
• Close the previous IAR project.
• Double click on file located under
C:STM32IoTDKCloudSeminarHands_onAWS_TestEWARM.
• Open aws_iot_config.h file.
1. Update the Wi-Fi Module MAC0 address. Use your participant number found on your box.
2. Update the NETWORK_SSID “STM32_DevConTraining”.
3. Update the NETWORK_PSK “stm32iot”.
78
Configure MQTT Parameters
1. Set the AWS_IOT_MQTT_CLIEN_ID to ThingXX with XX is your participant number.
2. Set the AWS_IOT_MY_THING_NAME to ThingXX with XX is your participant number.
3. Set the AWS_IOT_SBTOPIC_THING_NAME to ThingXX with XX is your participant number.
• Example: attendee number = 16
79
1
2
3
1
2
3
Compile and Run the project
• Compile and load the project.
You can do that by pressing Ctrl + D or using the Download and Debug button.
• Click on the Go button to run the program (F5).
• Open Tera Term console.
• Wait until the IoT DK board gets and IP address and
connects to AWS.
• Press the user button (the blue button) and the board will
start sending and receiving messages to/from AWS IoT.
The User LED1 will toggle every time you press the user
button.
• Congratulation you are sending and receiving
messages to/from AWS IoT.
80
Lab 5: Connect to different MQTT Topic
Change the Subscription Topic
• Open the aws_iot_config.h file.
• Set the AWS_IOT_SBTOPIC_THING_NAME to Thing0.
• Compile, load and run the project (Ctrl + D, then F5).
• Now your board is subscribed to the presenter publishing topic. The LED, on your board, will
toggle every time the presenter presses the button on his board.
• Example: attendee number = 16
82
STM32L475 IoT Node Board Status
• Pre-release board.
• Software, Firmware and documentation is under development.
• Scheduled full package release in Q1 17.
• For support use On Line Support
http://www.st.com/content/st_com/en/support/online-support.html
• Reference STM32L and STM32L475 Discovery IoT node in the subject.
83
Releasing Your Creativity
with the new STM32
www.st.com/stm32
/STM32
@ST_World
st.com/e2e
84

More Related Content

PDF
Application Layer Protocols for the IoT
PDF
MQTT and CoAP
PPTX
Dhcp ppt
PPT
Smtp
PDF
Quantum_Safe_Crypto_Overview_v3.pdf
PPTX
MQTT IOT Protocol Introduction
PPTX
Simple Mail Transfer Protocol
PPTX
DHCP basics
Application Layer Protocols for the IoT
MQTT and CoAP
Dhcp ppt
Smtp
Quantum_Safe_Crypto_Overview_v3.pdf
MQTT IOT Protocol Introduction
Simple Mail Transfer Protocol
DHCP basics

What's hot (20)

PPTX
Imap(internet massege access protocaols)
PPT
Mail server
PPTX
CoAP protocol -Internet of Things(iot)
PPTX
web connectivity in IoT
PPT
The constrained application protocol (CoAP)
PDF
MQTT - MQ Telemetry Transport for Message Queueing
PDF
OIT552 Cloud Computing Material
PPT
Ip address and subnetting
PPTX
Streaming Stored Video- Computer Networking
PPTX
User datagram protocol (udp)
PPTX
Bluetooth
PPT
Network cable
PPT
Presentation on telnet
PPTX
Understanding ip address
PPTX
IP addressing and Subnetting PPT
PPTX
PPT
Imap(internet massege access protocaols)
Mail server
CoAP protocol -Internet of Things(iot)
web connectivity in IoT
The constrained application protocol (CoAP)
MQTT - MQ Telemetry Transport for Message Queueing
OIT552 Cloud Computing Material
Ip address and subnetting
Streaming Stored Video- Computer Networking
User datagram protocol (udp)
Bluetooth
Network cable
Presentation on telnet
Understanding ip address
IP addressing and Subnetting PPT
Ad

Viewers also liked (20)

PDF
Track 4 session 1 - st dev con 2016 - body area network and sensor synchron...
PDF
Track 2 session 2 - st dev con 2016 - stm32 open development environment
PDF
Track 3 session 4 - st dev con 2016 - sensortile
PDF
Track 2 session 5 - st dev con 2016-usb type c with pd
PDF
Track 5 session 1 - st dev con 2016 - need for security for iot
PDF
Track 1 session 2 - st dev con 2016 - dsp concepts - innovating iot+wearab...
PDF
Track 2 session 4 - st dev con 2016 - opensoftwarex
PDF
Track 1 session 1 - st dev con 2016 - contextual awareness
PDF
Track 2 session 1 - st dev con 2016 - avnet - making things real
PDF
Track 3 session 2 - st dev con 2016 - arrow - identifying business challeng...
PDF
Track 3 session 3 - st dev con 2016 - flex - modern product developmert for...
PDF
Track 3 session 7 - st dev con 2016 - silicon photonics
PDF
Track 3 session 1 - st dev con 2016 -ieee- iot standards adn open source
PDF
Track 3 session 8 - st dev con 2016 - music and voice over ble
PDF
Track 4 session 2 - st dev con 2016 - valencell - integrated ohr, biometric...
PDF
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
PDF
Track 3 session 5 - st dev con 2016 - microsoft - from sensors to business ...
PDF
Track 4 session 6 - st dev con 2016 - samsung artik
PDF
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoning
PDF
Track 4 session 4 - st dev con 2016 - sigfox - iot 2 the evolution of conne...
Track 4 session 1 - st dev con 2016 - body area network and sensor synchron...
Track 2 session 2 - st dev con 2016 - stm32 open development environment
Track 3 session 4 - st dev con 2016 - sensortile
Track 2 session 5 - st dev con 2016-usb type c with pd
Track 5 session 1 - st dev con 2016 - need for security for iot
Track 1 session 2 - st dev con 2016 - dsp concepts - innovating iot+wearab...
Track 2 session 4 - st dev con 2016 - opensoftwarex
Track 1 session 1 - st dev con 2016 - contextual awareness
Track 2 session 1 - st dev con 2016 - avnet - making things real
Track 3 session 2 - st dev con 2016 - arrow - identifying business challeng...
Track 3 session 3 - st dev con 2016 - flex - modern product developmert for...
Track 3 session 7 - st dev con 2016 - silicon photonics
Track 3 session 1 - st dev con 2016 -ieee- iot standards adn open source
Track 3 session 8 - st dev con 2016 - music and voice over ble
Track 4 session 2 - st dev con 2016 - valencell - integrated ohr, biometric...
Track 3 session 6 - st dev con 2016 - qualcomm - wi-fi connectivity for iot
Track 3 session 5 - st dev con 2016 - microsoft - from sensors to business ...
Track 4 session 6 - st dev con 2016 - samsung artik
Track 4 session 3 - st dev con 2016 - pedestrian dead reckoning
Track 4 session 4 - st dev con 2016 - sigfox - iot 2 the evolution of conne...
Ad

Similar to Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connectivity (20)

PDF
Track 2 session 3 - st dev con 2016 - simplifying cloud connectivity
PDF
microcontrollersstm32wlseriesproductwebinarpresentation1625231766205.pdf
PDF
Webinar: Potencializando a Indústria 4.0 com tecnologias ST
PDF
Track 1 session 7 - st dev con 2016 - smart cities
PDF
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
PDF
Webinar embarcados - Simplificando seus projetos de Internet das coisas com o...
PDF
Deploy STM32 family on Zephyr - SFO17-102
PPTX
STM32F0_short-pres__Jan2017__EXTERNAL.pptx
PDF
learning STM -32
PDF
PPTX
2. Products to power your Iot STMicroelectronics
PPTX
STM32 Networking for Embedded Technology.pptx
PDF
STM32 L4 presentation
PPTX
robotics and embedded system ppt
PPTX
RIT 2nd ARM Developer Day - Texas Instruments Presentation
PPTX
Webinar: Nova família de microcontroladores STM32WL – Sub Giga Multiprotocolo
PDF
Introduction on STM32 Platform and Presentation of a Water-Level & Temperatur...
PPTX
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
PDF
Real practice of Networking design on specialized for ARM Cortex-M
PDF
IoT Intro and Demo
Track 2 session 3 - st dev con 2016 - simplifying cloud connectivity
microcontrollersstm32wlseriesproductwebinarpresentation1625231766205.pdf
Webinar: Potencializando a Indústria 4.0 com tecnologias ST
Track 1 session 7 - st dev con 2016 - smart cities
Microcontrolador STM32WL55 - Fazendo uma aplicação LORAWAN do zero em poucos ...
Webinar embarcados - Simplificando seus projetos de Internet das coisas com o...
Deploy STM32 family on Zephyr - SFO17-102
STM32F0_short-pres__Jan2017__EXTERNAL.pptx
learning STM -32
2. Products to power your Iot STMicroelectronics
STM32 Networking for Embedded Technology.pptx
STM32 L4 presentation
robotics and embedded system ppt
RIT 2nd ARM Developer Day - Texas Instruments Presentation
Webinar: Nova família de microcontroladores STM32WL – Sub Giga Multiprotocolo
Introduction on STM32 Platform and Presentation of a Water-Level & Temperatur...
Webinar: STM32WB - microcontrolador dual-core certificado BLE 5.0
Real practice of Networking design on specialized for ARM Cortex-M
IoT Intro and Demo

More from ST_World (11)

PDF
Smart Enabling Technologies for Automated Driving
PDF
Track 5 session 2 - st dev con 2016 - security iot best practices
PDF
Track 5 session 4 - st dev con 2016 - life cycle management for web
PDF
Track 5 session 3 - st dev con 2016 - mechanisms for trusted code execution...
PDF
Track 4 session 8 - st dev con 2016 - time of flight
PDF
Track 4 session 5 - st dev con 2016 - simplifying the setup and use of iot ...
PDF
Track 2 session 8 - st dev con 2016 - lora(senet)
PDF
Track 2 session 8 - st dev con 2016 - lora (mydevices)
PDF
Track 2 session 7 - st dev con 2016 - witricity - wireless power revolution...
PDF
Track 2 session 6 - st dev con 2016 - wireless charging technologies
PDF
Track 1 session 3 - st dev con 2016 - smart home and building
Smart Enabling Technologies for Automated Driving
Track 5 session 2 - st dev con 2016 - security iot best practices
Track 5 session 4 - st dev con 2016 - life cycle management for web
Track 5 session 3 - st dev con 2016 - mechanisms for trusted code execution...
Track 4 session 8 - st dev con 2016 - time of flight
Track 4 session 5 - st dev con 2016 - simplifying the setup and use of iot ...
Track 2 session 8 - st dev con 2016 - lora(senet)
Track 2 session 8 - st dev con 2016 - lora (mydevices)
Track 2 session 7 - st dev con 2016 - witricity - wireless power revolution...
Track 2 session 6 - st dev con 2016 - wireless charging technologies
Track 1 session 3 - st dev con 2016 - smart home and building

Recently uploaded (20)

PPTX
making presentation that do no stick.pptx
PDF
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
PDF
How NGOs Save Costs with Affordable IT Rentals
PPTX
Computers and mobile device: Evaluating options for home and work
PPTX
Lecture 3b C Library _ ESP32.pptxjfjfjffkkfkfk
PPTX
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
PPTX
Embeded System for Artificial intelligence 2.pptx
DOCX
A PROPOSAL ON IoT climate sensor 2.docx
PPTX
Nanokeyer nano keyekr kano ketkker nano keyer
PPTX
Embedded for Artificial Intelligence 1.pptx
PPTX
quadraticequations-111211090004-phpapp02.pptx
PPTX
1.pptxsadafqefeqfeqfeffeqfqeqfeqefqfeqfqeffqe
PPTX
了解新西兰毕业证(Wintec毕业证书)怀卡托理工学院毕业证存档可查的
PPTX
DEATH AUDIT MAY 2025.pptxurjrjejektjtjyjjy
PPTX
"Fundamentals of Digital Image Processing: A Visual Approach"
PPTX
Syllabus Computer Six class curriculum s
PPT
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
PDF
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PPTX
PROGRAMMING-QUARTER-2-PYTHON.pptxnsnsndn
PPTX
Sem-8 project ppt fortvfvmat uyyjhuj.pptx
making presentation that do no stick.pptx
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
How NGOs Save Costs with Affordable IT Rentals
Computers and mobile device: Evaluating options for home and work
Lecture 3b C Library _ ESP32.pptxjfjfjffkkfkfk
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
Embeded System for Artificial intelligence 2.pptx
A PROPOSAL ON IoT climate sensor 2.docx
Nanokeyer nano keyekr kano ketkker nano keyer
Embedded for Artificial Intelligence 1.pptx
quadraticequations-111211090004-phpapp02.pptx
1.pptxsadafqefeqfeqfeffeqfqeqfeqefqfeqfqeffqe
了解新西兰毕业证(Wintec毕业证书)怀卡托理工学院毕业证存档可查的
DEATH AUDIT MAY 2025.pptxurjrjejektjtjyjjy
"Fundamentals of Digital Image Processing: A Visual Approach"
Syllabus Computer Six class curriculum s
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PROGRAMMING-QUARTER-2-PYTHON.pptxnsnsndn
Sem-8 project ppt fortvfvmat uyyjhuj.pptx

Track 5 session 5 - st dev con 2016 - stm32 hands on seminar - cloud connectivity

  • 1. October 4, 2016 Santa Clara Convention Center Mission City Ballroom Getting Started with STM32 IoT DK Slim Jallouli David Kwak
  • 2. AgendaPresentation • Seminar Material Installation • Overview of the STM32 Portfolio • Overview of the STM32L475 Discovery IoT Node • STM32Cube Introduction • IAR License installation • ST-Link Driver Installation • Lab1 : Simple Blinky LED • BLE Overview • Lab2 : Simple BLE pairing • Wi-Fi Module Overview • Lab3 : Wi-Fi Configuration • Amazon AWS IoT Overview • Lab4 : Connect to AWS IoT • Lab5 : Connect to a Different MQTT Topic 2
  • 4. Seminar Materials Installation • Each participant should have received a USB Flash drive. It contains the Seminar Installer. This will install Tera Term, the latest Java, STM32CubeMX, STM32CubeL4 HAL, and extract the seminar file to C:STM32IoTDKCloudSeminar. • Please insert the USB Drive to your machine. Copy all the files to your desktop and execute the installer (STM32_IoT_DK_Cloud_Training_Installer-1.04.exe). • At the end of the seminar material installation, we will continue with ST-Link Utility and IAR installation. 4
  • 5. IAR installation • Run the IAR professional tool suite installer: C:STM32IoTDKCloudSeminarIAR. • From the installer menu select Install IAR Embedded Workbench. 5
  • 6. Overview of the STM32 portfolio
  • 7. STM32 wide portfolio 9 product series / more than 32 product lines 398 CoreMark 120 MHz 150 DMIPS Ultra-low-power Mainstream Cortex-M0 Cortex-M0+ Cortex-M3 Cortex-M4 Cortex-M7 106 CoreMark 48 MHz 38 DMIPS 245 CoreMark* 72 MHz 90 DMIPS (*) from CCM-SRAM 177 CoreMark 72 MHz 61 DMIPS 608 CoreMark 180 MHz 225 DMIPS 75 CoreMark 32 MHz 26 DMIPS 93 CoreMark 32 MHz 33 DMIPS High-performance 1 082 CoreMark 216 MHz 462 DMIPS 273 CoreMark 80 MHz 100 DMIPS 7
  • 9. What is MCU Ecosystem? All collaterals required to develop with an MCU Hardware Development Tools Evaluation boards Debug and Programming Probes Software Development Tools Configuration Tools Development & Debugging Tools Monitoring Tools Embedded Software Drivers RTOS Stacks and Application Bricks Information and sharing Web site Product selectors Communities & Social Media Ecosystem ST-designed Open source Partners 9
  • 10. 3rd Parties Full evaluation, Open hardware, Optimization, Expansions, … Hardware Development Tools Development Tools adapted to your needs Specialized functionality add-on Connectivity, Sensors… Other Divisions Microcontroller Division STM32 Nucleos Fast agile prototyping Discovery Kits Feature highlight, prototyping Evaluation Boards Full feature evaluation 32-pin 64-pin 144-pin 10
  • 11. STM32 ecosystem SW development tools C/C++ Focus STM32CubeMX Configure & Generate Code STMStudio Monitor A complete flow, from configuration up to monitoring Partners IDEs Compile and Debug FREE IDE’s 11
  • 12. Overview of the STM32L475 Discovery Kit IoT Board
  • 13. STM32L475 Discovery IoT Node Microphone Microphone BlueNRG Sub GHz Wi-Fi NFC EEPROM QSPI Flash STM32L475VG TOF Sensor Sensors Mag Sensor User Button Reset Button User LEDs ST-Link + VCP ST-Link Status LED USB-OTG PMOD Arduino Connector Arduino Connector Power 13
  • 14. STM32L475 Block Diagram 14 Key features • Cortex M4 with DSP, FPU @ 80MHz and ART • 1.71V – 3.6V supply 80 MHz Full functional • 1MB Flash dual bank/ 128KB RAM • USB OTG FS –LPM Battery Charging Detection • 3 x Ultra-low-power 12-bit ADC 5 M • Touch-Sensing 24 channels • Ultra-low power • VBAT • Better Wake Up time vs. STM32L1 • Down to 160µA/MHz dynamic • New set of Com. peripherals • I²C FM+ • SPI: variable data length • USART • LP UART & 16-bit Timer • FSMC, Quad SPI • CAN, SWPMI, SDMMC, 2x SAI • Digital filter for Sigma delta modulator • 16 x timers • Analog: Op-Amps, comparators, DAC, VREF, temperature sensor • RNG
  • 15. Wireless Connectivity – Wi-Fi • Inventek ISM43362 Wi-Fi Module • 802.11 b/g/n compliant module based on a Broadcom MAC/Baseband/Radio device. • Fully contained TCP/IP stack minimizing host CPU requirements. • FCC and CE certified. • Secure Wi-Fi authentication supporting WEP-128, WPA-PSK (TKIP), WPA2-PSK. 15
  • 16. Wireless Connectivity - BLE • ST SPBTLE-RF BLE Module • Based on our ST BlueNRG-MS BLE 4.1 Wireless Network Processor • Bluetooth Low Energy 4.1 compliant • FCC and BQ certified module with integrated balun & antenna. 16
  • 17. Wireless Connectivity - SubGHz • ST SPSGRF-915 (915 MHz) Sub GHz Module • FCC and IC certified module with integrated balun & antenna. • Supports 2-FSK, GFSK, MSK, GMSK, OOK and ASK modulation schemes. • Long range (100s of meters+) with an air data rate from 1 to 500 kbps 17
  • 18. Wireless Connectivity - NFC • ST M24SR64-Y Dynamic NFC/RFID Tag • NFC Forum Type 4 Tag • ISO/IEC 14443 Type A • 106 Kbps Data Rate 18
  • 19. Wired Connectivity Features • ST-Link V2 • Programming and Debug Interface • USB OTG FS • Full Speed USB On-The-Go Communication Interface • PMOD • Peripheral Module Interface Supporting GSM, GPS, LoRa, etc.. • Arduino Connectors • Arduino Compatible Connectors to Interface with Additional ST X-NUCLEO or 3rd Party Expansion Board. 19
  • 20. Sensors • Full Range of Motion & Environmental MEMS Sensors • ST LSM6DSL Accelerometer + Gyro Sensor • ST LIS3MDL Magnetometer Sensor • ST HTS221 Humidity + Temperature Sensor • ST LP222HB Pressure Sensor 20
  • 21. Sensors • ST VL53L0X Time-of-Flight Range Sensor • Integrated High Accuracy Proximity/Range Sensor • ST MP34DT01 MEMS Digital Microphones • Utilize for Voice & Audio Recognition Functions • Incorporate as an Acoustic Beam Forming Feature 21
  • 22. User Resource Features • Reset and User Buttons • Board Reset and Programmable Application Buttons • User LEDs • Programmable Application LEDs • QSPI Flash • 64Mbit for Data Storage and Program Execution • Selectable Power Supply • ST-Link, USB-OTG, Arduino or External Power 22
  • 23. Summary Advantages of Single Board vs Modular • Easily Debug Hardware Issues on a Single Board. • Collateral Includes Tightly Coupled Firmware • BSP Included for All Board Components • Cloud Connectivity Reference Solutions Included • Represents a Cost Effective Development Solution • $35 vs. $125 in a typical modular solution • No Need to Manage & Order Multiple Board SKUs. 23
  • 24. STM32L475 IoT Node Board Status • Pre-release board. • Software, Firmware and documentation is under development. • Scheduled full package release in Q1 17. • For support use On Line Support http://www.st.com/content/st_com/en/support/online-support.html • Reference STM32L and STM32L475 Discovery IoT node in the subject. 24
  • 26. STM32CubeTM Introduction • STM32CubeTM includes: • A configuration tool, STM32CubeMX generating initialization code from user choices • Firmware offering, delivered per series (like STM32CubeF4) with: • An STM32 Abstraction Layer embedded software: STM32Cube HAL • A consistent set of Middleware: RTOS, USB, TCP/IP, Graphics, … 2626 STM32CubeMX STM32CubeF3 STM32CubeF2 STM32CubeF4 STM32CubeF1 STM32CubeF0 STM32CubeL1 STM32CubeL0
  • 27. Pinout Wizard Clock Tree wizard Peripherals & Middleware Wizard Power Consumption Wizard STM32CubeMX 2727
  • 28. STM32CubeMX Generates Initialization C Code based on user choices ! 2828
  • 29. STM32CubeMX MCU Selector • Filter by: • Series • Line • Package • Peripherals 29
  • 30. STM32CubeMX Pin-out configuration • Pinout from: • Peripheral tree • Manually • Automatic signal remapping • Management of dependencies between peripherals 30
  • 31. STM32CubeMX Clock tree • Immediate display of all clock values • Management of all clock constraints • Highlight of errors 31
  • 32. STM32CubeMX Peripheral configuration • Global view of used peripherals and middleware • Highlight of configuration errors • Manage: • GPIO • Interrupts • DMA 32
  • 33. Power consumption calculator • Power step definitions • Battery selection • Creation of consumption graph • Display of • Average consumption • Average DMIPS • Battery lifetime 33
  • 34. STM32Cube Firmware Components 34 Hardware Abstraction Layer API Boards Support Packages Drivers HAL level Examples Board Demonstrations Evaluation boards Discovery boards Nucleo boards Networking LwIP TCP/IP & Polar SSL File system FATFS Graphics STemWin USB Host & Device Middleware level Applications Middleware RTOS FreeRTOS F4 Family STM32F401 CMSIS Utilities STM32F405/7 STM32F429 STM32F439 HAL
  • 36. IAR License Installation • Open IAR • Go to Help->License Manager • Go to License->Offline Activation… • Use C:STM32IoTDKCloudSeminarIARActivationResponse.txt for the activation response. 36
  • 38. ST-Link Utility Installation • The ST-Link Utility allows typical flash program / erase / upload / download functions via the ST-LINK/V2 debugger, onboard the STM32L475 Discovery IoT node Board. It also installs the Windows device drivers necessary for the ST-LINK/V2 debugger. • Run the installer that can be found at: C:STM32IoTDKCloudSeminar SoftwareSTM32 ST-LINK Utility_v4.0.0.exe 38
  • 39. ST-Link Driver installation ST-Link + VCP ST-Link Status LED 39 • Connect USB ST-LINK to your PC • The board is powered thorough the ST-LINK. • The ST-Link Status LED will be steady when the ST-Link is recognized.
  • 40. Lab1: Getting Started with STM32CubeMX
  • 41. Create New Project • From your desktop open STM32CubeMX software. • Click New Project 41
  • 42. Select the Microcontroller • Under Series select STM32L4 • Under Lines select STM32L4x5 • Under Package select LQFP100 • Select STM32L475VGTx • Click “OK” 1 2 3 4 5 1 2 3 4 5 42
  • 43. GPIO selection • In this example we are going to use the LED2 present on the IoT DK board. • Use the find toolbar and type PB14. • Select PB14 and set it to GPIO_Output mode. 43 PB14
  • 44. GPIO Configuration • Select the Configuration tab • Select GPIO under System. • Select PB14. • Set the GPIO output level to High. • Click Ok. 44 1 2 3 4 1 2 3 4
  • 45. Project Settings • Open the project Settings (Alt + P). • Set the project name to Lab1. • Set the project location C:STM32IoTDKCloudSeminarHands_on • Set the IDE Toolchain to EWARM. • Click OK. 45 1 2 3 4 1 2 3 4
  • 46. Generate and Open the Project • Generate Code (Ctrl + Shift + G) • Click Open Project. 46
  • 47. Inside IAR EWARM 47 Files Window Project Window Build Button Debug Button
  • 48. Configure IAR to Show Line Numbers • Go to ToolsOptions • Select Editor • Check the Show line number • Click OK 48 1 2 3 4
  • 49. Edit main.c • Expand the file tree and open the main.c file • Add the following code inside the while(1) loop: HAL_Delay(100); /* Delay for 100ms */ HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14); 49
  • 50. Load and Run • Click the GREEN ARROW to Build the Project, Download and start the debugger. (Ctrl + D) • Click the triple-arrow GO button! (F5) • Enjoy the LED! 50
  • 52. What is BLE? • BLE technology • Short range wireless ISM 2.4 GHz • Optimized for ultra low power • <15 mA peak current • <50 uA average current • Fast connection procedure • Client server architecture • Low data throughput application • Security including privacy/authentication/authorization • Based on encryption AES128 • Master Role : Central Device (Scanning, Initiating Connection) • Slave Role : Peripheral Device (Advertising) 52
  • 53. The Bluetooth SMART Marks Overview • Ultra low power consumption being a pure low energy implementation • Months to years of lifetime on a standard coin cell battery • Classic Bluetooth + Bluetooth low energy on a single chip (small price delta) • These are the hub devices of the Bluetooth ecosystem 53
  • 54. Bluetooth SMART stack partitioning • The application collects & computes the data to be transmitted over BLE. • To transmit data , application use BLE stack services and characteristics capabilities thanks to standard or proprietary application profile. • All communication in low energy takes place over the Generic Attribute Profile (GAP). • PHY layer insures communication with stack & data (bits) transmission over the air 54
  • 55. BlueNRG BLE Solution - Available from ST • Single mode Bluetooth® SMART wireless network processor • 2.4GHz RF transceiver • Cortex-M0 microcontroller (running the BT MS stack) • AES 128-bit co-processor • Master and Slave Mode BLE (4.1) Network Processor. • On chip non-volatile Flash memory allows OTA BLE-stack upgrade. Stack qualified. • ICCRX 7.3mA • ICCTX 8.2mA @ 0 dBm • ICCSleep 1.7µA • ICCShutdown 2.5nA • QFN32: 5 x 5 x 1mm Integration Flexibility Low power Small size SPI Bus Binary Library Source Code Customer Code All trademarks and logos are the property of their respective owners. All rights reserved. They are used here only as conceptual examples • + STM32 Consumption & Size 55
  • 57. Goal • This lab is to make sure that your BlueNRG device has a unique name and MAC address. • This test demonstrates a way to drive a BlueNRG device and communicate with a smartphone and display environmental data. • The IoT DK will be used as server while the applet is a client. • You need to download the ST BlueMS application available on App store and google play. 57
  • 58. Open BlueNRG_Test Project • Now we are going to configure the BlueNRG_Test program to give the BlueNRG module a unique MAC address and Unique device name. The device name will be used later to identify your board. • Close the previous IAR project. • Double click on file located under C:STM32IoTDKCloudSeminarHands_onBlueNRG_TestEWARM. 58
  • 59. BlueNRG Module configuration • Open main.c file and replace the ‘X’, ‘X’ in the local_name table with your attendee number. • Replace the XX in the baddr table with your ID number. • Example: attendee number = 3 • Example: attendee number = 16 59
  • 60. Run the Test Program • Compile and load the project. You can do that by pressing Ctrl + D or using the Download and Debug button • The project will compile, load and then stop at the main function. • Click on the Go button to run the program (F5) 60
  • 61. Communicate with BlueMS App • Using your phone open the BlueMS app. • Click on START DISCOVERING. • Identify your device using the Device name BlueNRGXXX with XXX is the number you have entered during the board configuration. Click on your device name to connect to it. • You should see the pressure and humidity information. 1 2 3 1 2 3 61
  • 62. Debug the firmware 62 • Now we are going to set beak point to stop the program execution when a client is connected/disconnected to the device. • Keep the program running and open the sensor_service.c file. • Set a break point at line 423 and line 437. • To set break point, left click on the left side of the line where you want to set it.
  • 63. Debug the firmware • Now from your phone disconnect from the device: • For Android users Press the back button • For iOS users press the Devices button • Once you disconnect the program will hit the break point at line 437 and stop execution. • Resume the execution by pressing the Go button (F5). • Connect to the device from your phone application as we did on slide 44. • Now the program will hit the break point at line 423. 63
  • 65. ISM43362-M3G-L44-E/U • The ISM43362-M3G-L44-E/U is an embedded 2.4 GHz Wi-Fi module from Inventek. The Wi-Fi module hardware consists of a Broadcom BCM43362, an integrated antenna or optional external antenna, and a STM32F205 host processor that has a standard USB, SPI or UART interface capability. • The Wi-Fi has an integrated TCP/IP stack that only requires a simple AT command set to establish connectivity for your wireless product. 65
  • 66. Lab3: Wi-Fi Module Configuration
  • 67. Tera Term Configuration • First thing we need to configure Tera Term to communicate with ST-Link over the virtual com port. This is needed later during this lab to get the Wi-Fi module IP address. • Open Tera Term. • Select the STMicroelectronics STLink Virtual COM Port and click OK. • Open Setup->Serial port… • Set the Baud rate to 115200, 8 bit, Parity none, Stop 1 and Flow control none. 67
  • 68. Wi-Fi Module Configuration • In this lab we are going to configured the Wi-Fi MAC address and Wi-Fi SSID and password. • Close the previous IAR project. • Double click on file located under C:STM32IoTDKCloudSeminarHands_onWIFI_TestEWARM. 1. Open aws_iot_config.h file. 2. Update the Wi-Fi Module MAC0 address. Use your participant number found on your box. 3. Update the NETWORK_SSID “STM32_DevConTraining”. 4. Update the NETWORK_PSK “stm32iot”. 68 1 2 3 4 1 2 3 4
  • 69. Compile and Run the project • Compile and load the project. You can do that by pressing Ctrl + D or using the Download and Debug button • The project will compile, load and then stop at the main program. • Click on the Go button to run the program (F5) 69
  • 70. Verify Your Internet Connection • Open Tera Term window. • After obtaining an IP address, the board will send a ping command to www.google.com. You should see the ping command result displayed on the terminal. 70
  • 72. What is AWS IoT • The Amazon AWS IoT service enables secure, bidirectional communication between IoT devices and the cloud over MQTT, HTTP and WebSockets. • IoT devices are authenticated using AWS IoT service-provided X.509 certificates. Once a certificate is provisioned and activated it can be installed on a device. The device will then use that certificate to send all requests to AWS MQTT. 72
  • 73. AWS Security Overview 73 AWS IoT Services & Authentication Host processor Application AT Command STM32 TCP/IP Wi-Fi TLS MQTT Certs & Keys IoT Node
  • 74. What is MQTT • MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. • The design principles are to minimize network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium. Source: http://mqtt.org/ 74
  • 75. Lab 4: Connect to AWS IoT
  • 76. STM32 IoT Development Kit 76 ST-Link & VCP Wi-Fi User button STM32L475VGT6 ST-Link Status LED User LED
  • 77. Tera Term Configuration • First thing we need to configure Tera Term to communicate with ST-Link over the virtual com port. This is needed later during this lab to get the Wi-Fi module IP address. • Open Tera Term. • Select the STMicroelectronics STLink Virtual COM Port and click OK. • Open Setup->Serial port… • Set the Baud rate to 115200, 8 bit, Parity none, Stop 1 and Flow control none. 77
  • 78. Wi-Fi Module Configuration • Close the previous IAR project. • Double click on file located under C:STM32IoTDKCloudSeminarHands_onAWS_TestEWARM. • Open aws_iot_config.h file. 1. Update the Wi-Fi Module MAC0 address. Use your participant number found on your box. 2. Update the NETWORK_SSID “STM32_DevConTraining”. 3. Update the NETWORK_PSK “stm32iot”. 78
  • 79. Configure MQTT Parameters 1. Set the AWS_IOT_MQTT_CLIEN_ID to ThingXX with XX is your participant number. 2. Set the AWS_IOT_MY_THING_NAME to ThingXX with XX is your participant number. 3. Set the AWS_IOT_SBTOPIC_THING_NAME to ThingXX with XX is your participant number. • Example: attendee number = 16 79 1 2 3 1 2 3
  • 80. Compile and Run the project • Compile and load the project. You can do that by pressing Ctrl + D or using the Download and Debug button. • Click on the Go button to run the program (F5). • Open Tera Term console. • Wait until the IoT DK board gets and IP address and connects to AWS. • Press the user button (the blue button) and the board will start sending and receiving messages to/from AWS IoT. The User LED1 will toggle every time you press the user button. • Congratulation you are sending and receiving messages to/from AWS IoT. 80
  • 81. Lab 5: Connect to different MQTT Topic
  • 82. Change the Subscription Topic • Open the aws_iot_config.h file. • Set the AWS_IOT_SBTOPIC_THING_NAME to Thing0. • Compile, load and run the project (Ctrl + D, then F5). • Now your board is subscribed to the presenter publishing topic. The LED, on your board, will toggle every time the presenter presses the button on his board. • Example: attendee number = 16 82
  • 83. STM32L475 IoT Node Board Status • Pre-release board. • Software, Firmware and documentation is under development. • Scheduled full package release in Q1 17. • For support use On Line Support http://www.st.com/content/st_com/en/support/online-support.html • Reference STM32L and STM32L475 Discovery IoT node in the subject. 83
  • 84. Releasing Your Creativity with the new STM32 www.st.com/stm32 /STM32 @ST_World st.com/e2e 84