Azure Sphere Module User Guide V1.0 Daniel Tu FAE WCS/WP1 Jun.
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 WiFi External Antenna BLE External Antenna 2 © USI. All rights reserved.
MT3620 Interface MT3620_Guardian Rev:0.2 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 3 © USI. All rights reserved.
MT3620 Interface RS232 : Link Pin2 and Pin3 of JR8 RS485 Full 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 RS485 Half Duplex : Link Pin1 and Pin2 of JR8. (GPIO2 pull High for TX, pull low for RX ) Link JP13 Link JP14 4 © 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 Azure Sphere SDK and Tools Install FTDI driver Install Visual Studio 2019 Enterprise, Professional, or Community version 16.04 or later; or Visual Studio 2017 version 15.9 or later. https://www.ftdichip.com/Drivers/VCP.htm 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.
Verify Azure Sphere SDK Installation 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. Reference : https://docs.microsoft.com/en-us/azure-sphere/install/install-sdk 8 © USI. All rights reserved.
Verify TAP-Windows Adapter Configuration 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: 9 © USI. All rights reserved.
Create tenant and claim your device 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: Type the following command to create a tenant. azsphere tenant create --name azsphere login --newuser For Example : azsphere tenant create –name “USITenant” Claim your device.
Connect to WiFi Add your Wi-Fi network to the device by using the azsphere device wifi add command as follows: azsphere device wifi add --ssid --psk MT3620 do not support WEP.
Prepare development and debugging 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: Getting device capability configuration for application development.
Azure Sphere Application 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. 13 © USI. All rights reserved.
Build and Run High-level Application 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": "\Hardware\ usi_mt3620_bt_evb" "AzureSphereTargetHardwareDefinition": "usi_mt3620_bt_evb.
Build and Run High-level Application Add GPIO pin Samples/GPIO/GPIO_HighLevelApp/GPIO_HighLevelApp/app_manifest.json GPIO 45 is LED APP RED "Gpio": [ "$SAMPLE_BUTTON_1", "$MT3620_GPIO45 " ] Modify LED GPIO Samples/GPIO/GPIO_HighLevelApp/GPIO_HighLevelApp/main.c blinkingLedGpioFd = GPIO_OpenAsOutput(MT3620_GPIO45, GPIO_OutputMode_PushPull, GPIO_Value_High); Ensure that your board is connected to your PC by USB. Then select GDB Debugger (HLCore) from the menu bar or press F5.
Set Up Hardware For Real-time App 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.
Build a real-time capable application-1 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.
Build a real-time capable application-2 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. 18 © USI. All rights reserved.
Nordic nRF52 BLE Setup 19 © USI. All rights reserved.
Nordic nRF52 Setup Steps Follow steps download and run debugger to Nordic nRF52 OS: Linux /Mac OS Install GCC Install nRF5 Command Line Tools Download nRF52 SDK SEGGER J-Link connect to MT3620 EVB by SWD interface Build and download sample Start Debugger 20 © USI. All rights reserved.
Install GCC Download and install GCC https://gcc.gnu.org/ In Ubuntu OS, you can type below command: $ sudo apt-get install gcc Download gcc-arm-none-eabi-6-2017-q2-update https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads Extract gcc-arm-none-eabi-6-2017-q2-update.tar.bz2 to /usr/local/ Path : /usr/local/gcc-arm-none-eabi-6-2017-q2-update/ 21 © USI. All rights reserved.
Install nRF5 Command Line Tools Download and install nRF5 Command Line Tools https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF5-Command-LineTools Untar nRF5 Command Line Tools and set to $PATH Add nRF5 Command Line Tools path to .bash_profile. $ echo export PATH=“< nRF5 Command Line Tools path >:$PATH" >> ~/.bash_profile 22 © USI. All rights reserved.
Download nRF52 SDK Azure Sphere Combo Module BLE Chip: Nordic 52832 Download nRF52 SDK (Current only support SDK 15.2.0) https://infocenter.nordicsemi.com/index.jsp https://developer.nordicsemi.com/nRF5_SDK/ Unzip nRF52 SDK 15.2.0 23 © USI. All rights reserved.
J-Link connect to Guardian Board SEGGER J-Link connect to MT3620 guardian board by SWD interface VCC,GND,SWDIO,SWCLK 24 © USI. All rights reserved.
Build and download sample Entry SDK sample path (Here use saadc sample on nRF52832) nRF52832 : pca10040 $ cd examples/peripheral/saadc/pca10040/blank/armgcc Build and Download sample $ make flash You should see output similar to the following: DONE nrf52832_xxaa Flashing: _build/nrf52832_xxaa.hex nrfjprog -f nrf52 --program _build/nrf52832_xxaa.hex --sectorerase Parsing hex file. Erasing page at address 0x0. Erasing page at address 0x1000. Erasing page at address 0x2000.
Start Debugger - 1 1. Download and install J-Link Software and Documentation pack https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack 2. Modify saadc/pca10040/blank/config/sdk_config.h Modify to #define NRF_LOG_BACKEND_RTT_ENABLED 1 3. Build and Download sample $ make flash 26 © USI. All rights reserved.
Start Debugger - 2 Create a new terminal and type below command: $ JLinkExe -device nRF52 -speed 4000 -if SWD -autoconnect 1 You should see output similar to the following: SEGGER J-Link Commander V6.40 (Compiled Oct 26 2018 15:07:23) DLL version V6.40, compiled Oct 26 2018 15:07:12 Connecting to J-Link via USB...O.K. Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41 Hardware version: V1.00 Device "NRF52" selected.
Start Debugger - 3 Create a new terminal and type below command: $ JLinkRTTClient The debug message will show on terminal 28 © USI. All rights reserved.
Nordic nRF52 GPIO PIN Define Nordic nRF52 GPIO pin define with MT3620 nRF52 GPIO MT3620 GPIO P0_02/AIN0 BT_PA_EN(GPIO_21) P0_03/AIN1 BT_LNA_EN(GPIO_20) P0_04/AIN2 GPIO_04_BT (J34 EVB pin out) P0_05/AIN3 GPIO_05_BT (J34 EVB pin out) P0_07 BT_FW_EN(DFU)(GPIO_23) P0_09 NFC1 (J28 EVB pin out) P0_10 NFC2 (J28 EVB pin out) P0_21/RST BT_nRST(GPIO_22) P0_25(UART_RTS) GPIO74_MT_CTS4 (ISU4:[UART_Id]8) P0_26(UART_TX) GPIO73_MT_RX4 (ISU4:[UART_Id]8) P0_27(UART_CTS) GPIO72_MT_RTS4 (ISU4:[U
Config to Internal RC Oscillator Azure Sphere Combo Module BLE chip use internal RC oscillator. Please set this config for BLE app. In Nrf52App/pca10040/s132/config/sdk_config.h #define NRFX_CLOCK_CONFIG_LF_SRC 0 #define NRF_SDH_CLOCK_LF_SRC 0 #define NRF_SDH_CLOCK_LF_RC_CTIV 16 #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 4 #define NRF_SDH_CLOCK_LF_ACCURACY 1 30 © USI. All rights reserved.
BLE-based Wi-Fi setup sample 31 © USI. All rights reserved.
BLE-based Wi-Fi setup sample This sample demo how to setup MT3620 WIFI by Nordic nRF52 BLE .For more detail, please refer: https://github.com/Azure/azure-spheresamples/tree/master/Samples/WifiSetupAndDeviceControlViaBle Follow below step to configure for MT3620 Guardian Board 32 © USI. All rights reserved.
Nordic nRF52 App Modify Nordic SDK path In Nrf52App/usi_evb/s132/armgcc/Makefile SDK_ROOT := Modify to internal RC oscillator In Nrf52App/usi_evb/s132/config/sdk_config.h #define NRFX_CLOCK_CONFIG_LF_SRC 0 #define NRF_SDH_CLOCK_LF_SRC 0 #define NRF_SDH_CLOCK_LF_RC_CTIV 16 #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 4 #define NRF_SDH_CLOCK_LF_ACCURACY 1 Reference : https://github.
Build and download BLE Sample J-Link connect to MT3620 Guardian Board by SWD interface Entry BLE Sample folder $ cd azure-spheresamples/Samples/WifiSetupAndDeviceControlViaBle/Nrf52App/usi_evb/s132/armgcc/ Download Nordic nRF5_SDK_15.2.0 s132 softdevice $ make flash_softdevice Build and Download sample $ make flash 34 © USI. All rights reserved.
Build and Run sample Run the Azure Sphere app Start Visual Studio and go to File>Open>CMake to open Samples\WifiSetupAndDeviceControlViaBle\AzureSphere_HighLevelApp\CMakeLists.txt Edit the AzureSphereTargetHardwareDefinitionDirectory and AzureSphereTargetHardwareDefinition fields for USI MT3620 EVB(usi_mt3620_bt_evb) in the CMakeSettings.json Modify GPIO Pin for Guardian Board LED In AzureSphere_HighLevelApp/WifiSetupAndDeviceControlViaBle/app_manifest.
Run Windows sample Run the Windows 10 companion app on your PC Start a separate instance of Visual Studio. Open WifiSetupAndDeviceControlViaBle/WindowsApp/WifiSetupAndDeviceControlViaBle.sln Build and debug the application (F5). For more details please refer to https://github.com/Azure/azure-spheresamples/tree/master/Samples/WifiSetupAndDeviceControlViaBle 36 © USI. All rights reserved.
Nordic BLE DFU 37 © USI. All rights reserved.
External MCU update This External MCU update solution demo how you might deploy an update to an external MCU(Nordic BLE Chip) device using Azure Sphere. For more detail, please refer: https://github.com/Azure/azure-sphere-samples/tree/master/Samples/ExternalMcuUpdate Follow below step to configure for MT3620 Guardian Board 38 © USI. All rights reserved.
Nordic nRF52 Bootloader J-Link connect to MT3620 EVB by SWD interface Entry BLE Sample folder $ cd azure-sphere-samples/Samples/ExternalMcuUpdate/Binaries/ Follow below step to download Nordic nRF5_SDK_15.2.0 bootloader $ nrfjprog -f nrf52 --eraseall $ nrfjprog -f nrf52 --program usi_evb_Softdevice_Bootloader.hex --sectorerase $ nrfjprog -f nrf52 --reset 39 © USI. All rights reserved.
Nordic nRF52 Blinky App Follow below to build Blinky app FW https://github.com/Azure/azure-spheresamples/tree/master/Samples/ExternalMcuUpdate#build-and-deploy-your-own-appfirmware-for-the-nrf52 Blinky app must config to internal RC oscillator nRF5_SDK_15.2.0_9412b96/examples/ble_peripheral/ble_app_blinky/pca10040/s132/config/s dk_config.
Build and Run High-level Application Start Visual Studio and go to File>Open>CMake to open Samples\ExternalMcuUpdate\AzureSphere_HighLevelApp\CMakeLists.t xt Edit the AzureSphereTargetHardwareDefinitionDirectory and AzureSphereTargetHardwareDefinition fields in the CMakeSettings.json file. For example: "AzureSphereTargetHardwareDefinitionDirectory": "\Hardware\ usi_mt3620_bt_evb" "AzureSphereTargetHardwareDefinition": "usi_mt3620_bt_evb.json “ https://github.
Private Ethernet Sample 42 © USI. All rights reserved.
Build and install sample Package and deploy the board configuration image for the Microchip ENC286J60 Ethernet chip, command : azsphere image package-board-config --preset lan-enc28j60-isu0-int5 --output enc28j60-isu0int5.imagepackage azsphere device sideload deploy --imagepackage enc28j60-isu0-int5.imagepackage Note: This board configuration uses ISU0 (I2C/SPI/UART port 0) on the MT3620, which is also used by other samples.
Reference FTDI FT_PROG https://www.ftdichip.com/Support/Utilities.htm#FT_PROG FTDI Driver https://www.ftdichip.com/Drivers/VCP.htm Azure Sphere Hardware Designs https://github.com/Azure/azure-sphere-hardware-designs/tree/master/P-MT3620RDB-1-0 Azure Sphere https://docs.microsoft.com/en-us/azure-sphere/ Visual Studio https://visualstudio.microsoft.com/ Azure Sphere Samples https://github.com/Azure/azure-sphere-samples Nordic Development Tools https://www.nordicsemi.
Additional 45 © USI. All rights reserved.
FTDI FT_PROG programming tool The FTDI interface chip provides a set of pins that must be connected to a small EEPROM that is used to store manufacturer’s details and a serial number. After board assembly, this information is programmed into the EEPROM over USB using a software tool provided by FTDI, https://www.ftdichip.com/Support/Utilities.htm#FT_PROG Download and install FT_PROG in the default location to your Computer. FT_PROG default location (C:\Program Files(x86)\FTDI\FT_Prog\) 46 © USI.
Download configuration file https://github.com/Azure/azure-sphere-hardwaredesigns/tree/master/P-MT3620RDB-1-0 Download MT3620 standard configuration file MT3620_Standard_Interface.xml => Right Click => Save File 47 © USI. All rights reserved.
FTDI EEPROM programming Ensure that the MT3620 dev kit is the only development board attached to the host PC. Open a command prompt (for example, cmd.exe) and change to the folder where you saved the MT3620_Standard_Interface.xml Type the following command: To verify that programming was successful, enter: 48 © USI. All rights reserved.
FCC Certification Statement-1 Federal Communication Commission Interference Statement This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules.
FCC Certification Statement-2 FCC Caution: Any changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate this equipment. This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. This device meets all the other requirements specified in Part 15E, Section 15.407 of the FCC Rules.
FCC Certification Statement-3 2.6 RF exposure considerations This equipment complies with FCC mobile radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with a minimum distance of 20cm between the radiator & your body. If the module is installed in a portable host, a separate SAR evaluation is required to confirm compliance with relevant FCC portable RF exposure rules. 2.
FCC Certification Statement-4 2.10 Additional testing, Part 15 Subpart B disclaimer This transmitter module is tested as a subsystem and its certification does not cover the FCC Part 15 Subpart B (unintentional radiator) rule requirement applicable to the final host. The final host will still need to be reassessed for compliance to this portion of rule requirements if applicable. As long as all conditions above are met, further transmitter test will not be required.
IC Certification Statement-1 Industry Canada statement This device complies with ISED’s licence-exempt RSSs. Operation is subject to the following two conditions: this device may not cause interference, and this device must accept any interference, including interference that may cause undesired operation of the device. Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts de licence.
IC Certification Statement-2 This radio transmitter (IC: 10293A-AS01 / Model: AS-01) has been approved by ISED to operate with the antenna type listed below with maximum permissible gain indicated. Antenna types not included in this list, having a gain greater than the maximum gain indicated for that type, are strictly prohibited for use with this device.
IC Certification Statement-3 Caution: The local network device user guide should include specific instructions on the above restrictions, including: the device for operation in the band 5150–5250MHz is only for indoor use to reduce the potential for harmful interference to co-channel mobile satellite systems; for devices with detachable antenna(s), the maximum antenna gain permitted for devices in the bands 5250-5350MHz and 5470-5725MHz shall be such that the equipment still complies with the e.i.r.p.
IC Certification Statement-4 This device is intended only for OEM integrators under the following conditions: (For module device use) 1) The antenna must be installed such that 20 cm is maintained between the antenna and users, and 2) The transmitter module may not be co-located with any other transmitter or antenna. As long as 2 conditions above are met, further transmitter test will not be required.
IC Certification Statement-5 Label and compliance information The final product must be labeled in a visible area with the following: "Contains IC: 10293A-AS01". The grantee's IC ID can be used only when all IC compliance requirements are met. Étiquette et informations de conformité Le produit final doit être étiqueté dans une zone visible avec les éléments suivants: "Contient IC: 10293AAS01".
Thank You www.usiglobal.com © USI. All rights reserved.