GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project •...

4
1VV0301460, Rev 1.1 Copyright © 2017 Telit. All rights reserved. GS2K SKB and Host MCU Interface Quick Start Guide Supports GS2000 Modules This Quick Start Guide will walk you through the steps required to set up and demonstrate the Host MCU interfaced with GS2K SKB. 1 Hardware Connection SKB Pinout for UART You will need the following items: Host MCU Reference Project GS2000 based module EVB/SKB hardware USB to mini-USB Cable USB to micro-USB Cable S2W binary from SDK builder tool IAR embedded work bench version 7.70.1.11471 STM32 NUCLEO-F767ZI The connection interface between HOST MCU (ST32F767ZI) and GS2000 module with UART interface is explained as below: External Reset Functionality (mandatory) UART Interface with Hardware Flow Control Debug Prints using UART Note: For pinout of ST32F767, refer to the Nucleo-F767ZI User manual. Functionality (ST Board) ST Board Pin GainSpan Module Pin GPIO_OUT PE14 EXT_RESET_N Functionality (ST Board) ST Board Pin GainSpan Module Pin USART6 Rx PG9 UART0_Tx USART6 Tx PG14 UART0_Rx USART6 CTS PG15 UART0_RTS USART6 RTS PG8 UART0_CTS Functionality (ST Board) ST Board Pin TTL Cable Pin UART2 Tx PA2 UART_Tx (Pin no 5) UART2 Rx PA3 UART_Rx (Pin no 4) GND GND GND (Pin no 1) Nucleo-F767ZI Pinout for UART Final Setup: . Note: While programming the GS module on SKB, please make sure the Jumper 18 settings are as shown in the above image. Note: The Jumper 18 settings must be set as shown in the above image. Similar connections can be established using SPI interface, refer to GS2K SKB and Host MCU Interface Application Note for further details.

Transcript of GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project •...

Page 1: GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project • To build the project. (Project>Make). • To program the Host MCU (Project>

1VV0301460, Rev 1.1

Copyright © 2017 Telit. All rights reserved.

GS2K SKB and Host MCU InterfaceQuick Start GuideSupports GS2000 Modules

This Quick Start Guide will walk you through the steps required toset up and demonstrate the Host MCU interfaced with GS2K SKB.

1 Hardware Connection

SKB Pinout for UART

You will need the following items:

• Host MCU Reference Project• GS2000 based module EVB/SKB hardware• USB to mini-USB Cable• USB to micro-USB Cable• S2W binary from SDK builder tool• IAR embedded work bench version 7.70.1.11471• STM32 NUCLEO-F767ZI

The connection interface between HOST MCU (ST32F767ZI) and GS2000 module with UART interface is explained as below:

External Reset Functionality (mandatory)

UART Interface with Hardware Flow Control

Debug Prints using UART

Note:For pinout of ST32F767, refer to the Nucleo-F767ZI User manual.

Functionality (ST Board) ST Board Pin GainSpan Module PinGPIO_OUT PE14 EXT_RESET_N

Functionality (ST Board) ST Board Pin GainSpan Module PinUSART6 Rx PG9 UART0_TxUSART6 Tx PG14 UART0_Rx

USART6 CTS PG15 UART0_RTSUSART6 RTS PG8 UART0_CTS

Functionality (ST Board) ST Board Pin TTL Cable PinUART2 Tx PA2 UART_Tx (Pin no 5)UART2 Rx PA3 UART_Rx (Pin no 4)

GND GND GND (Pin no 1)

Nucleo-F767ZI Pinout for UART

Final Setup:

.

Note: While programming the GS module on SKB, please make sure the Jumper 18 settings are as shown in the above image.

Note: The Jumper 18 settings must be set as shown in the above image.Similar connections can be established using SPI interface, refer to GS2K SKB and Host MCU Interface Application Note for further details.

Page 2: GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project • To build the project. (Project>Make). • To program the Host MCU (Project>

1VV0301460, Rev 1.1

Copyright © 2017 Telit. All rights reserved.

2 Build the Host MCU Package

2a Build the Reference Project

Step 1 Open the IAR Workbench version 7.70 or greater.

Step 2 Import the Host Reference Application Report.<package directory>\Reference Host Drivers\ST\STF767ZI\Cloud-Demo\build\Host MCU.eww

File>Open>Workspace

Step 3 Check the configuration to be enabled for the build in preInclude.h<package directory>\Reference Host Drivers\ST\STF767ZI\Cloud-Demo\build\preInclude.h

Note:

1. If GS2000 based EVB are used, remove the macro for SKB # define GS2200_SKB

2. At any point of time, only one interface should be active (either UART or SPI).

2b Build the Project• To build the project.

(Project>Make).

• To program the Host MCU(Project> Download and De-bug)

2c Program the Host MCU

The path for the Host MCU Reference Project is as follows:

<package directory>\Reference Host Drivers\ST\STF767ZI\Cloud-Demo\

Page 3: GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project • To build the project. (Project>Make). • To program the Host MCU (Project>

1VV0301460, Rev 1.1

Copyright © 2017 Telit. All rights reserved.

Step 8 Browse to and select the Super Block file, named super-block… and select the Current FW Version file name gs2200…,located at “\Embedded”.

Click “Erase and Program” button and wait for the programming utility to indicate it has finished module programming.

5 Reference Application 1 MQTT with Telit Cloud ConnectivityThis application connects the GS2000 device to the Telit Cloud using MQTT and transfers the Light value (read from SKB) to the Telit Cloud.

This application is enabled in Host Application by enabling the macro “APP_MQTT_TELIT_CLOUD” in <preinclude.h>.

3 Program the GS Module

Step 1 Plug the mini-USB cable, one end of the USB port to GS2200 SKB USB and the other end of the USB port to the com-puter or laptop.

Step 2 Ensure that the Power Measurement Switch SW6 is in the “ACTIVE” Position.

Step 3 Switch SKB power switch to the ‘ON’ position and check if the green LED near the switch is illuminated.

Step 4 Press and hold down both the PROGRAM and RESTORE buttons, simultaneously press and release the RESET button to put the GS2200 SKB into flash programming mode. Now release the PROGRAM and RESTORE buttons.

Step 5 Launch the GainSpan Serial Flash Programmer GUI utility from "\Tools\GS_programming_tool\gs2k_flashprogram.exe".

Step 6 Select UART, the port assigned to the SKB, 921600 baud.

Step 7 Click Check Connection -if the status reported is Con-nection OK, proceed or else repeat steps 2 through 6 carefully veri-fying the UART settings are correct and ensure the button pressing sequence is exactly as described.

The debug log is logged in UART terminal.Tera Term is used to cap-ture these debug logs.

HOST MCU Configuration:

The current Host Configuration for the hardware is as below:

-CPU Clock: 160 MHz

UART

- Baud Rate: 115200

- Word Length: 8

- Parity Bit: 0

- Stop Bit: 1

- Hardware Flow-Control: Yes

Method 1:

Step 1 This step is needed if the GS2000 device is not provi-sioned.The provisioning can be done by two different procedures:

a. AUTONCM

o Enable the “AutoNCM” macro in <preinclude.h>

o Enter the AP connection details for the flowing macros.

(GS_CLIENT_SSID and GS_CLIENT_PASSPHRASE)o Build the Host MCU Project, download and run the

source.

b. Verified Provisioning

o Enable the “APP_VERIFIED_PROV” macro in<preinclude.h>

o Build the Host MCU Project, download and run thesource

o The GS2000 device comes up as Limited AP mode

(SSID: GS_PROV_)o The Tera Term logs “Do verified provisioning from the

Mobile APP”.

o Now in the smart phone, connect to this SSID and startprovisioning.

o Once provisioning is done, the GS2000 devicereboots.

4 Debug Log

Page 4: GS2K SKB and Host MCU 1 Hardware Connection€¦ · (either UART or SPI). 2b Build the Project • To build the project. (Project>Make). • To program the Host MCU (Project>

1VV0301460, Rev 1.1

Copyright © 2017 Telit. All rights reserved.

For additional information, refer to the following links:

1. STM32 Nucleo-144 development board with STM32F767ZI MCU- http://www.st.com/content/ccc/resource/technical/document/

user_manual/group0/26/49/90/2e/33/0d/4a/da/DM00244518/files/DM00244518.pdf/jcr:content/translations/en.DM00244518.pdf

2. CubeMx Tool for STM32F7 MCU- http://www.st.com/content/st_com/en/products/embedded-soft-

ware/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef7.html

3. STM32F 767ZI datasheet- http://www.st.com/content/st_com/en/products/microcontrol-

lers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f7-series/stm32f7x7/stm32f767zi.html

Step 2 Once GS2000 device is Provisioned, the GS2000 device connects to the AP and then MQTT connection is estab-lished to transfer the Light values. The MQTT connection is estab-lished based on following parameters in <preinclude.h>

• TELIT_HOST_NAME• MQTT_SERVER_PORT• MQTT_CLIENT_I.• MQTT_CLIENT_USER_NAME• MQTT_CLIENT_PASSWORD

Method 2:

In case, if the GS2000 device is already provisioned

1. Enable only “APP_MQTT_TELIT_CLOUD” in <preinclude.h>.2. Build the Host MCU Project, download and run the source.

3. The GS2000 device connects to the AP and then the MQTT

connection is established to transfer the Light values.

4. The MQTT connection is established based on the following

parameters in <preinclude.h>

• TELIT_HOST_NAME• MQTT_SERVER_PORT• MQTT_CLIENT_ID• MQTT_CLIENT_USER_NAME• MQTT_CLIENT_PASSWORD

2 HTTP with Telit Cloud ConnectivityThis application connects the provisioned GS2000 device to the Telit Cloud using HTTP and transfer the Temperature value to the Telit Cloud. This application is enabled in Host Application by enabling the macro “APP_HTTP_TELIT_CLOUD” in <preinclude.h>

Method 1:

• Build the Host MCU Project, download and run the sourceb. Verified Provisioning

• Enable the “APP_VERIFIED_PROV” macro in <prein-clude.h>

• Build the Host MCU Project, download and run the source• The GS2000 device comes up as Limited AP mode

(SSID: GS_PROV_)• The Tera Term logs “Do verified provisioning from the

Mobile APP”• Now in the smart phone, connect to this SSID and start

provisioning.• Once provisioning is done, the GS2000 device reboots.

Step 2 Once GS2000 device is Provisioned, the GS2000 device boots in station mode, connects to the AP and then HTTP connec-tion is established to transfer the Temperature values. The HTTP connection is established based on following parameters in <prein-clude.h>

• TELIT_HOST_NAME

• HTTPS_PORT

• DATE

• TIME

Method 2:

In case, if the GS2000 device is already provisioned,

1. Enable only “APP_HTTP_TELIT_CLOUD” in <preinclude.h>. 2. Build the Host MCU Project, download and run the source.

3. The GS2000 device boots in station mode, connects to the AP

and then HTTP connection is established to transfer the Tem-

perature values.

4. The HTTP connection is established based on following parame-

ters in <preinclude.h>

• TELIT_HOST_NAME

• HTTPS_PORT

• DATE

• TIME

Step 1 This step is needed if GS2000 device not Provisioned.The provisioning can be done by 2 different procedures:

a. AUTONCM

• Enable the “AutoNCM” macro in <preinclude.h>• Enter the AP connection details for the flowing macros

(GS_CLIENT_SSID and GS_CLIENT_PASSPHRASE)

Technical and Product SupportFor any clarification, technical and product support, pleaseemail to Telit Technical Support at:[email protected]

We recommend adding “Wi-Fi” in subject of the email. For exam-ple, the subject of email can be “Wi-Fi: Association failing”, “Wi-Fi: SPI Driver Issue”.Also, in description of your email, please provide details aboutthe issue, product, module and use case including software firm-ware version, module version and type, application being used,customizations done to application, use case and issue fre-quency and ability to recreate it.

Information