usi Azure User manual

Azure Sphere Module
User Guide V1.0 Daniel Tu
FAE
WCS/WP1
Jun. 3rd, 2020

© USI. All rights reserved.
Outline
MT3620 Setup
Nordic nRF52 BLE Setup
BLE-based Wi-Fi setup sample
Private Ethernet sample
Nordic BLE DFU
Additional
- FTDI Programming Configuration
- FCC/IC Cert Statement
1

© USI. All rights reserved.
Azure Sphere Carrier Board
MT3620_Guardian Rev:0.3
2
BLE External Antenna
WiFi External Antenna

© USI. All rights reserved.
MT3620 Interface
3
LED MT3620 GPIO
APP RED GPIO45
APP GREEN GPIO46
APP BLUE GPIO47
WIFI RED GPIO48
WIFI GREEN GPIO14
WIFI BLUE GPIO11
BUTTON MT3620 GPIO
S2 GPIO12
S3 GPIO13
MT3620_Guardian Rev:0.2

© USI. All rights reserved.
MT3620 Interface
4
RS232 :
RS485 Full Duplex :
RS485 Half Duplex :
Link Pin1 and Pin2 of JR8.
(GPIO2 need pull high)
Link JP13
JR8 MT3620 GPIO
PIN 1 GPIO67_MOSI3_RTS3_CLK3
PIN 2 (SP336E RS232 RTS/
RS485 Enable)
PIN 3 GPIO2
Link Pin2 and Pin3 of JR8
Link Pin1 and Pin2 of JR8.
(GPIO2 pull High for TX, pull low for RX )
Link JP13
Link JP14

© USI. All rights reserved.
MT3620 UART Function
MT3620 UART Description
ISU0 For Ethernet(ENC28J60) using
ISU1 Header J32 pin 13,14,15,16
ISU2 FTDI(FT4232HQ) Port-A
ISU3 RS232/RS485 (SP336E)
ISU4 Nordic BLE nRF52 UART function
5

© USI. All rights reserved.
MT3620 Setup Steps
Follow steps let Visual Studio can download and run debugger to Azure
Sphere (MT3620)
Install Azure Sphere SDK and Tools
Verify Azure Sphere SDK Installation
Verify TAP-Windows Adapter Configuration
Create tenant and claim your device
Connect to Wi-Fi
Prepare MT3620 for development and debugging
Azure Sphere Application
Build and Run High-level Application
Set Up Hardware For Real-time App
Build a real-time capable application
6

© USI. All rights reserved.
Install FTDI driver
https://www.ftdichip.com/Drivers/VCP.htm
Install Visual Studio 2019 Enterprise, Professional, or Community version
16.04 or later; or Visual Studio 2017 version 15.9 or later.
https://visualstudio.microsoft.com/
Install the Azure Sphere SDK Preview for Visual Studio
https://aka.ms/AzureSphereSDKDownload
Azure Sphere SDK only support on Windows 10, version 1607 Update or later
Read Microsoft Installation Guide for more details.
https://docs.microsoft.com/en-us/azure-sphere/install/install-sdk
Install Azure Sphere SDK and Tools
7

© USI. All rights reserved.
After install SDK, connect the MT3620 guardian board to the PC by USB.
Open Device Manager and look for TAP-Windows Adapter V9.
And three new COM ports. The numbers on your COM ports may be
different from those in the figure.
Verify Azure Sphere SDK Installation
8
Reference : https://docs.microsoft.com/en-us/azure-sphere/install/install-sdk

© USI. All rights reserved.
Check the Network connection Azure Sphere (TAP-Windows Adapter V9)
is connected.
Right-click on Azure Sphere and check it’s properties are as shown below:
Verify TAP-Windows Adapter Configuration
9

© USI. All rights reserved.
Sign in to Azure Sphere, using a Microsoft account:
azsphere login
If you've never logged in to Azure Sphere before, add the --newuser parameter along
with your Microsoft account email address:
azsphere login --newuser <email-address>
Type the following command to create a tenant.
azsphere tenant create --name <my-tenant>
For Example : azsphere tenant create –name “USITenant”
Claim your device.
azsphere device claim
You should see output like this:
Create tenant and claim your device
Reference : https://docs.microsoft.com/en-us/azure-sphere/install/claim-device
Claiming attached device ID
'ABCDE082513B529C45098884F882B2CA6D832587CAAE1A90B1CEC4A376EA2F22A96C4E7E1FC4D2AFF5633B68
DB68FF4420A5588B420851EE4F3F1A7DC51399ED' into tenant ID 'd343c263-4aa3-4558-adbb-d3fc34631800'.
Successfully claimed device ID Command completed successfully in 00:00:05.5459143.
10

© USI. All rights reserved.
Add your Wi-Fi network to the device by using the azsphere device wifi
add command as follows:
azsphere device wifi add --ssid <yourSSID> --psk <yourNetworkKey>
MT3620 do not support WEP.
Check the status of the WiFi connection
azsphere device wifi show-status
The following example shows successful results for a secure WPA2 connection:
Connect to WiFi
Reference : https://docs.microsoft.com/en-us/azure-sphere/install/configure-wifi
SSID : NETGEAR21
Configuration state : enabled
Connection state : connected
Security state : psk
Frequency : 2442
Mode : station
Key management : WPA2-PSK
WPA State : COMPLETED
IP Address : 192.168.1.15
MAC Address : 52:cf:ff:3a:76:1b
Command completed successfully in 00:00:01.3976308.
11

© USI. All rights reserved.
Make sure that your Azure Sphere device is connected to your PC, and
your PC is connected to the internet.
In an Azure Sphere Developer Command Prompt window, type the
following command:
azsphere device enable-development
You should see output similar to the following:
Prepare development and debugging
Getting device capability configuration for application development.
Downloading device capability configuration for device ID
'ABCDE082513B529C45098884F882B2CA6D832587CAAE1A90B1CEC4A376EA2F22A96C4E7E1FC4D2AFF5633B68DB68FF4420A5588B420851EE4F3F1A7DC51399ED'.
Successfully downloaded device capability configuration.
Successfully wrote device capability configuration file 'C:\Users\user\AppData\Local\Temp\tmpD732.tmp'.
Setting device group ID 'a6df7013-c7c2-4764-8424-00cbacb431e5' for device with ID
'ABCDE082513B529C45098884F882B2CA6D832587CAAE1A90B1CEC4A376EA2F22A96C4E7E1FC4D2AFF5633B68DB68FF4420A5588B420851EE4F3F1A7DC51399ED'.
Successfully disabled over-the-air updates.
Enabling application development capability on attached device.
Applying device capability configuration to device.
Successfully applied device capability configuration to device.
The device is rebooting.
Installing debugging server to device.
Installation started.
Application development capability enabled.
Successfully set up device
'ABCDE082513B529C45098884F882B2CA6D832587CAAE1A90B1CEC4A376EA2F22A96C4E7E1FC4D2AFF5633B68DB68FF4420A5588B420851EE4F3F1A7DC51399ED' for application
development, and disabled over-the-air updates.
Command completed successfully in 00:00:17.1861625.
12

© USI. All rights reserved.
Azure Sphere devices can run two types of applications:
High-level applications run containerized on the Azure Sphere OS
Real-time capable applications (RTApps) run on bare metal or with a
real-time operating system (RTOS) on the real-time cores
A high-level application is required for every Azure Sphere device; RTApps
are optional.
Azure Sphere Application
13

© USI. All rights reserved.
Download https://github.com/Azure/azure-sphere-samples
Start Visual Studio and go to File>Open>CMake to open
Samples\GPIO\GPIO_HighLevelApp\CMakeLists.txt
Edit the AzureSphereTargetHardwareDefinitionDirectory and
AzureSphereTargetHardwareDefinition fields in the CMakeSettings.json file. For
example:
"AzureSphereTargetHardwareDefinitionDirectory": "<path to cloned samples>\Hardware\
usi_mt3620_bt_evb"
"AzureSphereTargetHardwareDefinition": "usi_mt3620_bt_evb.json “
https://github.com/Azure/azure-sphere-samples/tree/master/Hardware
Build and Run High-level Application
14
Reference : https://docs.microsoft.com/en-us/azure-sphere/install/qs-blink-application

© USI. All rights reserved.
Add GPIO pin
Samples/GPIO/GPIO_HighLevelApp/GPIO_HighLevelApp/app_manifest.json
GPIO 45 is LED APP RED
Modify LED GPIO
Samples/GPIO/GPIO_HighLevelApp/GPIO_HighLevelApp/main.c
Ensure that your board is connected to your PC by USB. Then select GDB Debugger
(HLCore) from the menu bar or press F5.
LED APP on the MT3620 guardian board begins blinking red. Push button S2 to cycle the
blink interval between three possible values. By default, the Output window shows
output from Device Output
Build and Run High-level Application
15
"Gpio": [ "$SAMPLE_BUTTON_1", "$MT3620_GPIO45 " ]
blinkingLedGpioFd =
GPIO_OpenAsOutput(MT3620_GPIO45, GPIO_OutputMode_PushPull, GPIO_Value_High);

© USI. All rights reserved.
Make sure that your Azure Sphere device is connected to your PC, and
your PC is connected to the internet.
Right-click the Azure Sphere Developer Command Prompt shortcut and
select More>Run as administrator. When the window opens, issue the
following command:
azsphere device enable-development --enablertcoredebugging
Use USB to UART Converter for HelloWorld_RTApp_MT3620_BareMetal
sample to display output
Connect GND on the USB to UART Converter to Header J32, pin 1 (GND)
on the MT3620 guardian board.
Connect RX on the USB to UART Converter to Header J32, pin 18
(IO0_TXD) on the MT3620 guardian board.
On the PC, start the terminal emulator and open a 115200-8-N-1 terminal
to the COM port that the adapter uses.
Set Up Hardware For Real-time App
16
Reference : https://docs.microsoft.com/en-us/azure-sphere/install/qs-real-time-application

© USI. All rights reserved.
Download https://github.com/Azure/azure-sphere-samples
Start Visual Studio. On the File menu, select Open>CMake... and navigate
to the folder that contains the sample
HelloWorld\HelloWorld_RTApp_MT3620_BareMetal .
If CMake generation does not start automatically, select the
CMakeLists.txt file.
In the Visual Studio Output window, the CMake output should show the
messages CMake generation started. and CMake generation finished.
On the CMake menu (if present), click Build All. If the menu is not present,
open Solution Explorer, right-click the CMakeLists.txt file, and select Build.
The output location of the Azure Sphere application appears in the
Output window.
Build a real-time capable application-1
17

© USI. All rights reserved.
On the Select Startup Item menu, select GDB Debugger (RTCore).
Press F5 to deploy the application.
The connected terminal emulator should display output from the
HelloWorld_RTApp_MT3620_Baremetal program. The program sends the
following words at one-second intervals:
Tick
Tock
Use the debugging options in Visual Studio to set breakpoints, inspect
variables, and try other debugging tasks.
Build a real-time capable application-2
18

© USI. All rights reserved.
Nordic nRF52 BLE Setup
19
This manual suits for next models
1
Table of contents
Other usi Control Unit manuals
Popular Control Unit manuals by other brands

Burkert
Burkert 2101 quick start

Honeywell
Honeywell SILENT KNIGHT SK-Control-6 Installation and maintenance instructions

Graco
Graco 77X542 instructions

ABB
ABB REF542plus Installation and commissioning

GWF
GWF MP-RCM-H200 quick start guide

Franke
Franke AQUALINE AQRM551 Installation and operating instructions