Go to Cloud (G2C) click · Page 4 Introduction to Go to Cloud (G2C) click Go to Cloud (G2C) click...
Transcript of Go to Cloud (G2C) click · Page 4 Introduction to Go to Cloud (G2C) click Go to Cloud (G2C) click...
U S E R M A N U A L
Go to Cloud (G2C) click
The WiFi IoT gateway Click board™ which connects your IoT devices with the Click Cloud service provided by Mikroelektronika. Simple and reliable.
Page 2
Nebojsa MaticCEO
I want to express my thanks to you for being interested in our products
and for having confidence in Mikroelektronika.
The primary aim of our company is to design and produce high quality
electronic products and to constantly improve the performance thereof in
order to better suit your needs.
To our valued customers
Table of Contents
Introduction to Go to Cloud (G2C) click 4
mikroBUS™ pins 7
Onboard indicators and LED indicators 8
Pins description 8
UART interface – configuration 9
Boot-up sequence 10
Firmware update 12
Page 4
Introduction to Go to Cloud (G2C) click Go to Cloud (G2C) click is composed of two main components:
∫ MK64FN1M0VDC12, a 32-bit ARM® Cortex® M4 microcontroller, from NXP
∫ ESP WROOM-02, a Wi-Fi connector module, from Espressif systems
The ESP-WROOM-02 is used as the connector module which can establish a link with the Click cloud service over the Internet.
It is an all-in-one solution, with the complete Wi-Fi stack on-board, which allows a very simple operation. This feature, along
with the proven reliability, small form-factor, and low count of components it requires, makes the ESP WROOM-02 module
an ideal solution for using it on the Go to Cloud (G2C) click.
The ESP-WROOM-02 module uses the UART communication interface, and it can be controlled by using simple AT
commands. However, the MK64FN1M0VDC12 MCU is added too, introducing an additional application layer, exposing
only a set of commands that allow connection with the Click Cloud, reducing the possibility of errors and failures due
to wrongly set connection parameters and simplifying HOST MCU application. The MCU is also used to drive status
LEDs, which are used to indicate a successful connection to the Internet, a successful connection with the Click Cloud
service, as well as some other types of indication.
Page 5
Figure 2: MK64FN1M0VDC12 MCU
Figure 1: ESP-WROOM-02
Finally, there is a micro USB connector, which is used to update the firmware of the Go to Cloud (G2C) click. The
firmware update is simple, error-proof, and straight-forward. More information about the update procedure can be
found in this manual.
Page 6
VCC-3.3
VOUT-3.3 VOUT-3.3 VOUT-3.3
IO14
IO12
IO13
IO15
IO2
ESP_RST
ESP_TXD
ESP_RXD
C3 10µF
VCC-3.3
VOUT-3.3
ESP_EN
LD1PWR
18 18
17 17
16 16
15 15
14 14
13 13
12 12
11 11
10 109
8
7
6
5
4
3
2
1
GND
IO0
IO2
IO15
IO13
IO12
IO14
EN
3.3V
IO4
RXD
TXD
GND
IO5
RST
TOUT
IO16
GND
ESP-WROOM-02
U2
JTA
G_T
CLK
JTA
G_T
DI
JTA
G_T
DO
JTA
G_T
MS
MCU_RST
MCU_RST
UA
RT0
_RTS
UA
RT0
_CTS
UA
RT0
_RX
UA
RT0
_TX
ESP_
TXD
ESP_
RXD
ESP_RST
ESP_EN
UART0_TXUART0_RX
UART0_CTS
JTAG_TMSJTAG_TCLKJTAG_TDOJTAG_TDI
VOUT-3.3 VOUT-3.3
MCU_RST
R610k
R710k
R810k
R910k
R1410k
R1510k
C4 0.10µF
C20.10µF
UART0_RTS
Y232.768kHz
C812pF
C912pF
LD3STAT
STA
TUS_
LED
LD4CONN
CONN_LED
CO
NN
_LED
R11k
R31k
12345678910
J1
VCC-5V
VCC-5V
STATUS_LED
IO0
IO0
R1310k
IO15
IO13
R41k
C3
D11E11F11
E1 D1
D2
C1
C2
B1
A9
A10
A1
B2
A2
A3
B3
D3
D4
A4
B4
C4
A6
A5
B5
D5
B6
C5
C6
D6
A7
A8
D7
C7
B7
L2L1K2K1
E2
E7F7
A11C11
K10L10
H2H1
L6G7E6F3G4H7
K3H4E4E3
F4
L11K11
L7B11
G2G1F2F1
J2J1
H10
MK64FN1M0VDC12
J11H11G11G10G9G8
E10D10C10B10E9D9C9F10F9F8E8B9D8C8
AD
C0_
SE16
/CM
P1_I
N2/
AD
C0_
SE21
AD
C1_
SE16
/CM
P2_I
N2/
AD
C0_
SE22
NCNCPTE0PTE1/LLWU_P0
PTA4/LLW
U_P3D
AC
0_O
UT/
CM
P1_I
N3/
AD
C0_
SE23
VR
EF_O
UT/
CM
P1_I
N5
CM
P0_I
N5/
A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CC-5V
12345ID
D+D-
VBUS
GND
6
CN1
TVS1 TVS2
R11 27
R12 27
R101M
LD2USB
VCC-3.3
VCC-USB
VCC-USB
R21k
GP0GP1
GP0 GP1
D1PMEG3010ER,115
D2
PMEG3010ER,115
Y1
12MHz
C612pF
C712pF
Figure 3: Main Schematic
Page 7
mikroBUS™ pins
An additional JTAG interface in the form of 2x5 pin header is used only during the production phase for the upload of
the initial firmware and it should not be used by the user, as it may lead to malfunction of the Go to Cloud (G2C) click
due to an internal firmware damage.
Page 8
Onboard indicators and LED indicators
NOTE: The Go to Cloud (G2C) click requires both 3.3V and 5V for a proper operation.
Pins description: ∫ RST - Hardware reset - (INPUT) This pin is used to reset the MCU. This pin is internally pulled up to a HIGH logic level. Driving
this pin to a LOW logic level for 50 ms, a reset function will be performed. After each reset cycle, the complete boot sequence
of the Go to Cloud (G2C) click is repeated.
Page 9
∫ CTS - Clear to send [1] - (INPUT) A LOW logic level on this pin means that HOST MCU
is ready to receive data sent from Go to Cloud (G2C) click.
∫ RTS - Request to send [1] - (OUTPUT) A LOW logic level on this pin means that the Go to Cloud (G2C) click
is ready to accept incoming data from the host MCU. There is also a secondary function of this pin: if set to a HIGH
logic level during the boot-up sequence, the five-second bootloader timeout will be completely skipped, allowing for
a faster start of the Go to Cloud (G2C) click. More information about the secondary function of this pin is provided in the
Boot-up section of this manual.
∫ GP0, GP1 - General purpose pins [1] - (INPUT) A LOW logic level on this pin means that HOST MCU
is ready to receive data sent from Go to Cloud (G2C) click.
[1] The current version of the firmware (ver.F091) does not have these options implemented yet, but they are planned to be added in future updates.
UART interface – configuration:
∫ Baud rate: 57600
∫ Data bits: 8∫ Parity: NO
∫ Stop bit: 1
Page 10
The complete control of the Go to Cloud (G2C) click is done over the UART interface, by using AT commands. The list
of the available AT commands, along with the explanation and example for each of them can be found in the
AT Command Manual.
The Go to Cloud (G2C) click firmware accepts AT commands, which can be sent over the UART interface pins of
the mikroBUS™, either from a terminal application on a personal computer (with the addition of the USB-to-UART
adapter) or from the host MCU. When transmitting the AT command string, a timing interval between consecutive
characters should not exceed 5 seconds. The timing interval greater than 5 seconds is considered as the EOL for any
AT command (end-of-line), and the received command will be parsed as such.
More information about all the available AT commands with the detailed explanation can be found in the AT Command Manual.
UART interface – configuration:
After the power-on, the Go to Cloud (G2C) click will start in the bootloader mode, which will be terminated after 5
seconds. During these 5 seconds, the MK64F MCU onboard the Go to Cloud (G2C) click will be visible to the USB
HID Bootloader application, allowing its firmware to be updated. When the connection with the USB HID Bootloader
application is established, it will take over the control of the Go to Cloud (G2C) click and will keep it in the bootloader
Page 11
mode. If there is no response from the USB HID Bootloader application while the Go to Cloud (G2C) click is in the
bootloader mode, the normal operation of the Go to Cloud (G2C) click will be resumed and the MK64F MCU will not be
visible for the USB HID Bootloader application anymore.
After a connection with the USB Bootloader application is established, the STAT LED will be turned on and it will stay
that way as long as the bootloader mode is active. Leaving the bootloader mode will be indicated by the CONN LED,
which will blink once, while the STAT LED will be turned off.
The bootloader mode will be automatically initiated after each power-on event, leading to a five-second startup delay.
To skip the bootloader mode completely and boot-up directly into the normal mode, the CTS pin can be set to a HIGH
logic level after the restart, for at least 100ms. This prevents the five-second delay during the power on if the firmware
update was not intended, shortening the boot-up time before the Go to Cloud (G2C) click is ready to be used.
During the boot-up sequence, the default configuration values will be restored from the internal non-volatile memory.
More details about storing and restoring the default configuration parameters can be found in the AT Command
Manual.
The end of the boot-up sequence will be indicated by a single blink of both the STAT and CONN LEDs, simultaneously.
NOTE: After leaving the bootloader, a delay of at least 3 seconds has to be made, allowing the connector module to reboot properly.
Page 12
Firmware update
Figure 4: USB HID Bootloader connected to the Go to Cloud (G2C) click
The Go to Cloud (G2C) click is shipped with the latest
version of firmware. However, the firmware will be
continuously improved in the future. Therefore, the Go to
Cloud (G2C) click has a firmware update option, in a form
of a micro USB connector (CN1) and an implementation
of the HID bootloader within the firmware itself.
To properly update the firmware, please use the provided
micro USB connector (CN1) with the HID bootloader
application and a proper firmware file. The JTAG 2x5-pin
header (J1) is not to be used for uploading the update
since it can destroy the base firmware and render the
G2C click inoperable. It is used only for the initial firmware
update during the production. The Go to Cloud (G2C) click
is shipped with this header unpopulated.
The firmware update can be done by using the USB HID
Bootloader application. After a USB cable is connected to
the micro USB connector on the Go to Cloud (G2C) click,
the application will detect the onboard MK64F MCU, as
displayed on the picture below:
Page 13
Note that there is a five seconds timeout interval during which the Go to Cloud (G2C) click operates in a firmware update
mode as explained in the Boot-up sequence section of this manual. After this, the Go to Cloud (G2C) click is restarted and
will continue running in a normal mode, completely skipping the bootloader, and will be undetectable for the HID bootloader
application. If this happens, it is necessary to disconnect the USB cable and connect it again, initiating another five seconds
interval.
After the MCU of the Go to Cloud (G2C) click is detected as on the picture above, an appropriate HEX file with a proper
firmware version should be selected by clicking on the Browse for HEX button. This will open a file selection window, where
you can browse for the updated firmware file with the .hex extension. Once selected, the programming process can be
started by clicking the Begin uploading button. The programming process should take up to 60 seconds. If it takes longer, or
the process is interrupted during the update, it should be repeated from the beginning.
Page 14
DISCLAIMERAll the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any other copyright material. No part of this manual, including product and software described herein, may be reproduced, stored in a retrieval system, translated or transmitted in any form or by any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or local use, but not for distribution. Any modification of this manual is prohibited. MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or conditions of merchantability or fitness for a particular purpose. MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this manual at any time without prior notice, if necessary.
HIGH RISK ACTIVITIES
The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities.
TRADEMARKS
The MikroElektronika name and logo, mikroC, mikroBasic, mikroPascal, Visual TFT, Visual GLCD, mikroProg, Ready, MINI, mikroBUS™, EasyPIC, EasyAVR, Easy8051, Click boards™ and mikromedia are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are only used for identification or explanation and to the owners’ benefit, with no intent to infringe.The FTDI Chip® and Windows® logos and product names are trademarks of FTDI Chip and Microsoft® in the U.S.A. and other countries.
Copyright © 2019 MikroElektronika. All Rights Reserved.
If you want to learn more about our products, please visit our
website at www.mikroe.comIf you are experiencing some problems with any of our
products or just need additional information, please place
your ticket at www.mikroe.com/supportIf you have any questions, comments or business proposals,
do not hesitate to contact us at [email protected]
Designed by Mikroelektronika Ltd.