QN9020 Quick Start Guide

AN11664
QN9020 Quick Start Guide
Rev. 1 — 5 June 2015
Application note
Document information
Info
Content
Keywords
Mini DK, SDK, installation, working mode, download, NVDS configuration,
connect, GPIO configuration
Abstract
This application note discusses the use of the QN9020 mini
development kit (Mini DK) for evaluating and developing Bluetooth
Low Energy (BLE) solutions based on QN902X.
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Revision history
Rev
Date
Description
v.1
20150605
Initial release
Contact information
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
2 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
1. Introduction
1.1 Overview
The QN9020 Mini Development Kit (Mini DK) is designed for evaluating and developing
Bluetooth Low Energy (BLE) solutions based on QN902X. The purpose of this document
is to give an overview of the hardware and software included in the QN9020 Mini DK. For
more detailed information on BLE technology and software platform for QN9020, refer to
“QN9020 Software Developers Guide”.
1.2 System requirements
1.2.1 System requirements
The QN9020 Mini DK has the following system requirements:
• a computer running with Windows XP, Windows 7 or Windows 8
• a computer with a minimum of 2 USB ports
Note: OS X (Mac) is not supported.
1.2.2 External resources
• Keil MDK-ARM
• JLink software
2. Contents of kit
2.1 Hardware
The QN9020 Mini DK contains the following hardware components:
• Mini DK board
• BLE dongle
• USB cable
The hardware components are shown in Figure 1.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
3 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 1.
Hardware components of DK
Note: Mini DK can also be used for software development for QN9021. There is a
difference between the GPIO for the QN9021 and the QN9020. For details, refer to the
data sheet at http://www.nxp.com/documents/data_sheet/QN902X.pdf.
2.2 Software
The Software Development Kit (SDK) is named as QBlue-1.x.xx-setup.exe. After ordering,
visit SDK customer support website https://www.collabnet.nxp.com to obtain the latest
SDK package.
3. Getting started
3.1 System overview
The system consists of three parts (see Figure 2):
• Mini DK board: It is used for developing Bluetooth Low Energy (BLE) applications
based on QN9020. It comprises on-board RF matching circuit and antenna, power
supply, GPIO connector, buttons and LEDs. The JLink On-Board (OB) debugger is
used to bridge QN9020 SWD and UART interface to PC, download program and
debug from PC.
• BLE dongle: It is a Bluetooth Low Energy (BLE) device controlled by the QTool
running on a PC. It works with the Mini DK as a pair for evaluation and debugging. It is
connected to a PC via USB.
• QBlueStudio: It is a software tool chain to work with the Mini DK and BLE dongle.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
4 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
GPIO
MINI DK
PC
(QBlueStudio)
RESET
UART
QN9020
SWD
BUTTON1
BUTTON2
LED1
LED2
virtual UART
virtual UART
JLink OB
(ATSAM3U2C)
CR2032
USB
PORT
USB
PORT
USB
DONGLE
POWER
aaa-018401
Fig 2.
System model
3.2 Software installation
Before connecting the Mini DK Board to the computer, install Keil MDK-ARM or IAR,
QBlue-x.x.x-setup.exe and Setup_JLink_Vxxx.exe. Keil is used in this document to show
the instructions.
3.2.1 Keil MDK-ARM
Keil MDK-ARM can be downloaded and installed from the URL:
https://www.keil.com/download/product; see Figure 3. Version 4.5 or newer is
recommended.
Fig 3.
Download Keil MDK-ARM
3.2.2 QBlue-x.x.x-setup.exe
Install released SDK package QBlue-x.x.x-setup.exe.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
5 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
3.2.3 JLink software
Download and install Setup_JLink_Vxxx.exe (Version 4.6.6 or newer is recommended)
from www.segger.com based on the development environment (see Figure 4). All Mini DK
boards have their individual Segger ID (serial number) labeled at the back.
Fig 4.
Location for JLink software
Note: The JLink software also contains a USB driver for JLink-OB.
3.3 Hardware Setup
3.3.1 Hardware Connection
Refer to “QN9020 Mini DK User Guide” for the usage of the Mini DK board.
3.3.2 Driver installation
Virtual COM Port (VCP) drivers make the USB device appear as an additional COM port
on the PC. Application software accesses the USB device in the same way as it would
access a standard COM port.
3.3.2.1
Driver for JLink-OB
Driver for JLink-OB is included in JLink software (see Section 3.2.3). It is installed
automatically while installing the JLink software.
3.3.2.2
Driver for BLE Dongle
Refer to Application Note AN-104 for detailed installation. It can be downloaded from FTDI
website http://www.ftdichip.com/Support/Documents/AppNotes.htm
This guide helps with the installation of the FTDI’s Combined Driver Model (CDM) driver
for the Microsoft Windows operating system.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
6 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 5.
Driver location for BLE dongle
Installed drivers can be verified by checking the device manager in Windows OS (see
Figure 6). Two COM ports are added to the list. One is the USB Serial Port (COM4)
indicating the BLE Dongle. The other is a JLink CDC UART Port (COM5) for the JLink-OB
on Mini DK board. The COM port number can be different for each computer. Therefore, it
is always a good practice to check the ports with regards to the hardware connected.
Note: Ensue that the correct COM port number is used when downloading code and
during evaluation using QTool. COM port assignments can be checked in the device
manager.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
7 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 6.
COM port of BLE dongle and JLink-OB
3.4 Working mode
QN9020 provides a flexible platform for wireless applications. It supports two working
modes, Wireless SoC mode and Network processor mode. For detailed information
related to the working modes, refer to QN9020 Software Developers Guide.
3.4.1 Wireless SoC mode
In the Wireless SoC mode, link layer, host protocol, profiles and application run on
QN9020. Figure 7 shows how QN9020 is used in SoC mode. Application examples use
the SoC mode.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
8 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
APPLICATION
GAP, GATT
LE PROFILES
SMP
ATT
L2CAP
LINK LAYER
PHY
QN9020
aaa-018406
Fig 7.
Wireless SoC mode
3.4.2 Network processor mode
In the Network processor mode, the link layer, host protocols and profiles run on QN9020
whereas the application runs on the external processor. The two components
communicate via Easy ACI (Easy Application Controller Interface) over UART, provided in
QN9020 SDK. For details, refer to the QN9020 Easy ACI Programming Guide.
APPLICATION MCU
APPLICATION
APPLICATION CONTROL INTERFACE
GAP, GATT
LE PROFILES
SMP
ATT
L2CAP
LINK LAYER
PHY
QN9020
aaa-018407
Fig 8.
AN11664
Application note
Network processor mode
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
9 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
MCU
HOST
Easy ACI
QN9020
Controller
aaa-018408
Fig 9.
Easy ACI interface
4. Components of QBlue SDK
When QBlue SDK is installed and executed, it opens a GUI (see Figure 11) referred to as
QBlueStudio. The GUI has links to various tools, BLE example codes, driver codes and
detailed software/hardware guides.
4.1 SDK folder structure
Once installed, a folder is created in the main directory. The installation folder contains
various subfolders as shown in Figure 10.
Fig 10. Qblue installation folder
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
10 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
4.1.1 BinFiles
This folder contains all binary files for sample applications provided in SDK.
4.1.2 Documents
Documents related to QN9020 SDK are found here.
4.1.3 Projects
This folder contains source code and project file in Keil and IAR for various BLE example
applications.
4.1.4 Tools
This folder contains all tools with GUI in SDK to support application development.
4.2 Software components
QBlue SDK provides a GUI for users. Figure 11 shows the start page after launching
QBlue.
Fig 11. QBlue start page
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
11 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
4.2.1 Tools
1. QTool: QTool is a PC tool that controls the BLE dongle. It allows the user to set up a
connection between the BLE USB dongle and the other BLE device.
A detailed user manual for the QTool can be found in the software documentation
(QTool User Manual).
2. QBlueISPStudio: QBlueISPStudio is a tool to download application binary file, data file
or NVDS configuration file into QN90xx series of BLE devices. Refer to QBlue ISP
Studio Manual for more information.
3. QBlueNVDSConfigurator: It is a tool to add, edit and delete NVDS configuration data
for BLE application development based on QN9020 platform. Refer to QBlue NVDS
Configurator Manual for details.
4. QBlueDriverTools: It is a PC tool to make it easier to write peripheral driver code for
BLE application development based on the QN9020 platform. Refer to QN902x Driver
Tools Manual for further details.
5. Qn9020DevDBforIDE: This tool is used to add device database for QN9020 series
chip into IDE, including ARM Keil MDK-ARM and IAR. Refer to QN9020DevDBforIDE
User Manual.
4.2.2 Documents
Software Doc in the documents area leads directly to a software document folder
described in Section 4.1.2.
4.2.3 Project
Projects area consists of three parts namely:
• BLE example: linked to the BLE folder under the Projects folder; see Section 4.1.3.
• Driver example: linked to the Driver folder under the Projects folder; see
Section 4.1.3.
• Example bin files: linked to the BinFiles folder; see Section 4.1.1.
4.2.4 Support
It consists of links to website support pages to get support.
• Homepage - http://www.nxp.com/products/microcontrollers/product_series/
• Contact NXP support - http://www.nxp.com/support.html
5. Quick start with Demo
The QN9020 Mini DK board can be shipped with some pre-loaded profile. A proximity
profile is used here as an example to demonstrate how to start with QBlue quickly. The
proximity demo enables an interactive connection with BLE Dongle acting as a BLE
master and Mini DK board as a slave.
Note: All Mini DK boards, are in a deep sleep mode when powered-up. It means that the
debug ports do not respond. To debug or start advertising and eventually connect, press
Button1 on the Mini DK.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
12 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.1 Download file
5.1.1 Steps to download file with QBlueISPStudio
5.1.1.1
Step 1:
Start QBlue.
5.1.1.2
Step 2:
Click ‘QBlueISPStudio’ on QBlue start page; see menu in Figure 12.
Fig 12. Setting ISP studio
5.1.1.3
Step 3:
Select UART interface and the correct COM port. Use the COM Port for JLink CDC UART
port.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
13 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.1.1.4
Step 4:
Click “Open file” under Application to locate the bin file and choose “proxr.bin”. The demo
bin files provided in QBlue SDK are located in C:\QBlue\QBlue-1.3.6\BinFiles.
Fig 13. Proximity bin file
5.1.1.5
Step 5:
Click the “Start” button and then press the “RESET” button on the board (see Figure 14).
The bin file is downloaded to board automatically, once the “RESET” button is released. If
the download is successful, a message pops up; see Figure 15.
Fig 14. RESET button
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
14 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 15. Download successful
If the bin file download fails, a message pops up (see Figure 16). If this occurs, perform
the following:
1. Check the USB connection and whether LED1 and LED2 are ON.
2. Whenever the Start button is used to download files, press the RESET button on the
Mini DK board to switch the board into boot mode, and then release it.
3. Make sure that the COM port setting is correct on the system. The setting can be
found in device manager (see Figure 6).
Fig 16. Failure message
For more information about the QBlueISPStudio tool, refer to the QBlue ISP Studio
Manual.
5.1.2 Download file in Keil
Keil can also be used to download the compiled bin file. If QN9020 is in sleep mode while
programming, press BUTTON1 or BUTTON2 to wake up Mini DK. Figure 17 and
Figure 18 show the error messages that pop up when QN9020 is in sleep mode and the
user is trying to program through Keil.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
15 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 17. Failure note
Fig 18. Failure note
5.2 Configure BLE device
Use NVDS configurator tool and configure the BLE device address, name, etc. This
configuration data is stored in the NVDS area of flash. The NVDS configurator makes it
easier to add, edit and delete the configuration data. The tool is also used to burn the
configuration data to target chip, or dump it from the chip. For more information on this
tool, refer to the QBlue NVDS Configurator Manual.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
16 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.2.1 Steps to configure BLE device
5.2.1.1
Step 1:
Click QBlueNVDSConfigurator button on QBlue start page to get NVDS configurator
started; see Figure 19.
Fig 19. Start NVDS configurator
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
17 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.2.1.2
Step 2:
Choose the corresponding UART COM port and click connect button on the “Connect”
dialog (see Figure 20).
Fig 20. Set connection in NVDS
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
18 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.2.1.3
Step 3:
Press RESET button on the Mini DK board and then release it to connect the board (see
Figure 14). Once connected, it shows configurable items (see Figure 21).
Fig 21. NVDS configurator main window
The values can be changed according to specific requirement. However, the default value
is recommended.
Table 1.
AN11664
Application note
Important items
Items
Description
Bluetooth device address
48-bit bluetooth device address.
Device name
name of the BLE device to differentiate from other Bluetooth
devices.
Clock Drift
while using 32.768 kHz crystal oscillator, set it according to
the specification of crystal used; recommended value is 100
ppm, to have margin for load variation and temperature
change; while using 32 kHz RC oscillator, set it to 500 ppm.
External wake-up time
/Oscillator wake-up time
900 s (0x384) is recommended by default; while using 32 K
low-power mode, it should be set as 3000 s (0xBB8).
XCSEL
cap load of 16 MHz crystal oscillator; default value is 0x11;
adjust according to the specific PCB design and crystal used
in real applications.
ADC scale/ADC VCM
both parameters are for ADC and their values may be
different for each chip; values are tested and calibrated while
manufacturing.
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
19 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.2.1.4
Step 4:
Click value field of device name record and change the device name (see Figure 22).
Fig 22. Change device name
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
20 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.2.1.5
Step 5:
Click Burn button and write parameters back to QN9020 (see Figure 23).
Fig 23. Burn configuration
5.3 Connection
When the Mini DK board is powered-on or reset, it is in deep sleep mode. In this mode,
LED2 is ON. The following are the LED indications:
• LED1 ON: It indicates that the application is connected. If it is flickering, it means that
it is advertising.
• LED2 ON: It indicates that QN9020 is in the deep sleep state.
5.3.1 Steps to set up the connection between the Mini DK board and BLE dongle
5.3.1.1
Step 1:
Press BUTTON1 as shown in Figure 24, to take the board into advertising state and make
it discoverable. The LED1 now starts flickering. The flashing frequency depends on the
advertising interval. For the first 30 seconds, the application uses a short advertising
interval. After 30 seconds, LED1 flashing frequency will be lower as the advertising
interval has increased to around 1 sec. If BUTTON1 is pressed again, the application
stops advertising and LED1 stops flashing. The application is back to deep sleep state.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
21 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 24. BUTTON1
5.3.1.2
Step 2:
Step 2: Start QTool from QBlue start page. Figure 25 shows the message that pops up for
communication setting.
Fig 25. Connection setting in QTool
5.3.1.3
Step 3:
Select the correct COM port for BLE Dongle. It can be checked with the device manager.
Press ‘Open’ button in the dialog box. Figure 26 shows the resultant window. The device
representing BLE Dongle would be in idle state by default.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
22 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 26. QTool opened
5.3.1.4
Step 4:
Select the item in Devices. It shows the Settings area.
5.3.1.5
Step 5:
To switch it to advertising mode, press BUTTON1 on Mini DK board and press scan
button shown in Figure 26. The discovered devices are now shown in Devices area.
5.3.1.6
Step 6:
To initiate a connection, select the Mini DK from the scan result and click the Connect
button in Settings block (see Figure 27).
Fig 27. Connection in QTool
The role of BLE Dongle changes to master and the Mini DK board acts as slave. The state
of both devices is connected as shown in Figure 28.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
23 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 28. Devices connected
5.4 Function operation
Various interactions between Mini DK board and BLE Dongle can be performed when
connected.
5.4.1 Find me
Steps to simulate “to find the Mini DK board”:
5.4.1.1
Step 1:
Click “Client” tab and “PROXM” tab in Settings area (see Figure 29).
Fig 29. PROXM app discovered
5.4.1.2
Step 2:
To make discovered services editable, click the Enable button.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
24 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
5.4.1.3
Step 3:
Set the alert level in the Immediate Alert Service area to Medium or High.
5.4.1.4
Step 4:
Click “Write” button. The Mini DK board sounds an alert with the help of a Buzzer.
Proximity alerts are indicated using the Buzzer. The volume of the buzzer indicates the
type of alert.
5.4.2 Disconnect
1. Click “disconnect” button in “Connection to peer” tab (see Figure 28). The device
disconnects with no response.
2. If the two devices are moved away from each other, the RF link may break. In such a
case, the Mini DK board responds with an alert.
5.4.3 Others
When buzzer is ON, press BUTTON2 to turn-off the buzzer.
6. Advanced application development
According to specific requirement, it may be necessary to add some peripheral functions
such as Button, LED and Buzzer. Useful tools are provided to help with implementation. It
is easier to implement specific functions observing the sample codes in QBlue SDK.
6.1 Add driver file
Suppose that it is required to implement button control, which needs GPIO definition. It is
easy to implement it by using the Keil development tool. By default, there is a folder
named “driver” at C:\QBlue\QBlue-x.x.x\Projects\BLE\src. All peripheral function source
codes are included here. The relevant driver files can be added to the project in Keil, as
shown in Figure 30.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
25 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 30. Adding a driver file
To study how to use the peripheral functions, open the dedicated peripheral driver files,
typically located in “C:\QBlue\QBlue-x.x.x\Projects\Driver”. Open the required project and
directly download to the Mini DK board. Modify it according to the specific requirements.
Fig 31. Adding a driver file
Double-click “gpio.uvproj” and open it using Keil (see Figure 32).
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
26 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
Fig 32. GPIO example
The main function is in gpio_example.c.
6.2 GPIO MUX Configuration
The GPIO pins are shared with digital or analog peripherals such as SPI, UART, I2C, and
ADC. The function of IO can be configured in QBlueQriverTools, which generates the
source code for the specific assignment of GPIO pins.
1. Change GPIO function
a. Open “QBlueDriverTool” and choose “IO” icon as shown below.
b. Select P2.6, and P2.6 as PWM function.
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
27 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
c. After the setting is completed, click button OK at the bottom right of the
“QBlueDriverTools” window. The source code is generated automatically as shown
below.
2. Add PWM function to Project
Open “system.c” which is located at “C:\QBlue\QBlue-x.x.x\Projects\BLE\prj_proxr\src” by
default.
Find “P26_GPIO_10_PIN_CTRL” in function “SystemIOCfg” and replace it with
“P26_PWM1_PIN_CTRL”. Save this file.
After adding above code to current project, compile the project, and download it to
Mini DK board to confirm the functionality.
Note:
1. For more information about how to enable related module, refer to example code at
“C:\QBlue\QBlue-x.x.x\Projects\Driver\adc\keil”.
2. For more information on “QBlueDriverTools”, refer to QBlue Driver Tools Manual.
7. Trouble shooting
1. Bin file download failed while using QBlueISPStudio (see Section 5.1.1.5).
2. Bin file download failed while using Keil: Set the board in active mode and download
again (see Section 5.1.2).
3. Error messages pop up while downloading application to Mini DK board: Press
BUTTON1 or BUTTON2 to wake up the board and download again
(see Section 5.1.2).
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
28 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
8. Abbreviations
Table 2.
Abbreviations
Acronymn
Description
DK
Development kit
SoC
System on Chip
BLE
Bluetooth Low Energy
SMP
Security Management Protocol
GPIO
General Purpose Input Output
ACI
Application Control Interface
EACI
Easy Application Control Interface
ISP
In System Programming
SPI
Serial Port Interface
SWD
Serial Wire Debug
UART
Universal Asynchronous Receiver/Transmitter
9. References
Released with SDK:
•
•
•
•
•
•
QN9020 Easy ACI Programming Guide
QBlue QTool User Manual
QBlue ISP Studio Manual
QBlue NVDS Configurator Manual
QBlue Driver Tools Manual
QN9020DevDBforIDE User Manual
Released in Customer Support Website:
• QN9020 Software Developers Guide
• QN9020_Mini_DK_User_Guide
Others:
1. http://www.keil.com/uvision/debug.asp
2. https://www.segger.com
3. https://www.keil.com
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
29 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
10. Legal information
10.1 Definitions
Draft — The document is a draft version only. The content is still under
internal review and subject to formal approval, which may result in
modifications or additions. NXP Semiconductors does not give any
representations or warranties as to the accuracy or completeness of
information included herein and shall have no liability for the consequences of
use of such information.
10.2 Disclaimers
Limited warranty and liability — Information in this document is believed to
be accurate and reliable. However, NXP Semiconductors does not give any
representations or warranties, expressed or implied, as to the accuracy or
completeness of such information and shall have no liability for the
consequences of use of such information. NXP Semiconductors takes no
responsibility for the content in this document if provided by an information
source outside of NXP Semiconductors.
In no event shall NXP Semiconductors be liable for any indirect, incidental,
punitive, special or consequential damages (including - without limitation - lost
profits, lost savings, business interruption, costs related to the removal or
replacement of any products or rework charges) whether or not such
damages are based on tort (including negligence), warranty, breach of
contract or any other legal theory.
Notwithstanding any damages that customer might incur for any reason
whatsoever, NXP Semiconductors’ aggregate and cumulative liability towards
customer for the products described herein shall be limited in accordance
with the Terms and conditions of commercial sale of NXP Semiconductors.
Right to make changes — NXP Semiconductors reserves the right to make
changes to information published in this document, including without
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
to the publication hereof.
Suitability for use — NXP Semiconductors products are not designed,
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
malfunction of an NXP Semiconductors product can reasonably be expected
to result in personal injury, death or severe property or environmental
damage. NXP Semiconductors and its suppliers accept no liability for
inclusion and/or use of NXP Semiconductors products in such equipment or
applications and therefore such inclusion and/or use is at the customer’s own
risk.
design. It is customer’s sole responsibility to determine whether the NXP
Semiconductors product is suitable and fit for the customer’s applications and
products planned, as well as for the planned application and use of
customer’s third party customer(s). Customers should provide appropriate
design and operating safeguards to minimize the risks associated with their
applications and products.
NXP Semiconductors does not accept any liability related to any default,
damage, costs or problem which is based on any weakness or default in the
customer’s applications or products, or the application or use by customer’s
third party customer(s). Customer is responsible for doing all necessary
testing for the customer’s applications and products using NXP
Semiconductors products in order to avoid a default of the applications and
the products or of the application or use by customer’s third party
customer(s). NXP does not accept any liability in this respect.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
authorization from competent authorities.
Evaluation products — This product is provided on an “as is” and “with all
faults” basis for evaluation purposes only. NXP Semiconductors, its affiliates
and their suppliers expressly disclaim all warranties, whether express, implied
or statutory, including but not limited to the implied warranties of
non-infringement, merchantability and fitness for a particular purpose. The
entire risk as to the quality, or arising out of the use or performance, of this
product remains with customer.
In no event shall NXP Semiconductors, its affiliates or their suppliers be liable
to customer for any special, indirect, consequential, punitive or incidental
damages (including without limitation damages for loss of business, business
interruption, loss of use, loss of data or information, and the like) arising out
the use of or inability to use the product, whether or not based on tort
(including negligence), strict liability, breach of contract, breach of warranty or
any other theory, even if advised of the possibility of such damages.
Notwithstanding any damages that customer might incur for any reason
whatsoever (including without limitation, all damages referenced above and
all direct or general damages), the entire liability of NXP Semiconductors, its
affiliates and their suppliers and customer’s exclusive remedy for all of the
foregoing shall be limited to actual damages incurred by customer based on
reasonable reliance up to the greater of the amount actually paid by customer
for the product or five dollars (US$5.00). The foregoing limitations, exclusions
and disclaimers shall apply to the maximum extent permitted by applicable
law, even if any remedy fails of its essential purpose.
Translations — A non-English (translated) version of a document is for
reference only. The English version shall prevail in case of any discrepancy
between the translated and English versions.
Applications — Applications that are described herein for any of these
products are for illustrative purposes only. NXP Semiconductors makes no
representation or warranty that such applications will be suitable for the
specified use without further testing or modification.
10.3 Trademarks
Customers are responsible for the design and operation of their applications
and products using NXP Semiconductors products, and NXP Semiconductors
accepts no liability for any assistance with applications or customer product
I2C-bus — logo is a trademark of NXP Semiconductors N.V.
AN11664
Application note
Notice: All referenced brands, product names, service names and trademarks
are the property of their respective owners.
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
30 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
11. Tables
Table 1.
Important items . . . . . . . . . . . . . . . . . . . . . . . . .19
Table 2.
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12. Figures
Fig 1.
Fig 2.
Fig 3.
Fig 4.
Fig 5.
Fig 6.
Fig 7.
Fig 8.
Fig 9.
Fig 10.
Fig 11.
Fig 12.
Fig 13.
Fig 14.
Fig 15.
Fig 16.
Fig 17.
Fig 18.
Fig 19.
Fig 20.
Fig 21.
Fig 22.
Fig 23.
Fig 24.
Fig 25.
Fig 26.
Fig 27.
Fig 28.
Fig 29.
Fig 30.
Fig 31.
Fig 32.
Hardware components of DK. . . . . . . . . . . . . . . . .4
System model . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Download Keil MDK-ARM . . . . . . . . . . . . . . . . . . .5
Location for JLink software . . . . . . . . . . . . . . . . . .6
Driver location for BLE dongle . . . . . . . . . . . . . . . .7
COM port of BLE dongle and JLink-OB . . . . . . . . .8
Wireless SoC mode . . . . . . . . . . . . . . . . . . . . . . . .9
Network processor mode . . . . . . . . . . . . . . . . . . . .9
Easy ACI interface . . . . . . . . . . . . . . . . . . . . . . . .10
Qblue installation folder . . . . . . . . . . . . . . . . . . . .10
QBlue start page . . . . . . . . . . . . . . . . . . . . . . . . . 11
Setting ISP studio . . . . . . . . . . . . . . . . . . . . . . . .13
Proximity bin file. . . . . . . . . . . . . . . . . . . . . . . . . .14
RESET button . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Download successful . . . . . . . . . . . . . . . . . . . . . .15
Failure message . . . . . . . . . . . . . . . . . . . . . . . . .15
Failure note . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Failure note . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Start NVDS configurator. . . . . . . . . . . . . . . . . . . .17
Set connection in NVDS . . . . . . . . . . . . . . . . . . .18
NVDS configurator main window . . . . . . . . . . . . .19
Change device name . . . . . . . . . . . . . . . . . . . . . .20
Burn configuration . . . . . . . . . . . . . . . . . . . . . . . .21
BUTTON1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Connection setting in QTool . . . . . . . . . . . . . . . . .22
QTool opened . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Connection in QTool . . . . . . . . . . . . . . . . . . . . . .23
Devices connected . . . . . . . . . . . . . . . . . . . . . . .24
PROXM app discovered . . . . . . . . . . . . . . . . . . .24
Adding a driver file . . . . . . . . . . . . . . . . . . . . . . . .26
Adding a driver file . . . . . . . . . . . . . . . . . . . . . . . .26
GPIO example . . . . . . . . . . . . . . . . . . . . . . . . . . .27
AN11664
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 5 June 2015
© NXP Semiconductors N.V. 2015. All rights reserved.
31 of 32
AN11664
NXP Semiconductors
QN9020 Quick Start Guide
13. Contents
1
1.1
1.2
1.2.1
1.2.2
2
2.1
2.2
3
3.1
3.2
3.2.1
3.2.2
3.2.3
3.3
3.3.1
3.3.2
3.3.2.1
3.3.2.2
3.4
3.4.1
3.4.2
4
4.1
4.1.1
4.1.2
4.1.3
4.1.4
4.2
4.2.1
4.2.2
4.2.3
4.2.4
5
5.1
5.1.1
5.1.1.1
5.1.1.2
5.1.1.3
5.1.1.4
5.1.1.5
5.1.2
5.2
5.2.1
5.2.1.1
5.2.1.2
5.2.1.3
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
System requirements . . . . . . . . . . . . . . . . . . . . 3
System requirements . . . . . . . . . . . . . . . . . . . . 3
External resources . . . . . . . . . . . . . . . . . . . . . . 3
Contents of kit . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . 4
System overview . . . . . . . . . . . . . . . . . . . . . . . 4
Software installation . . . . . . . . . . . . . . . . . . . . . 5
Keil MDK-ARM . . . . . . . . . . . . . . . . . . . . . . . . . 5
QBlue-x.x.x-setup.exe . . . . . . . . . . . . . . . . . . . 5
JLink software. . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . 6
Hardware Connection . . . . . . . . . . . . . . . . . . . . 6
Driver installation . . . . . . . . . . . . . . . . . . . . . . . 6
Driver for JLink-OB . . . . . . . . . . . . . . . . . . . . . . 6
Driver for BLE Dongle. . . . . . . . . . . . . . . . . . . . 6
Working mode. . . . . . . . . . . . . . . . . . . . . . . . . . 8
Wireless SoC mode . . . . . . . . . . . . . . . . . . . . . 8
Network processor mode . . . . . . . . . . . . . . . . . 9
Components of QBlue SDK . . . . . . . . . . . . . . 10
SDK folder structure . . . . . . . . . . . . . . . . . . . . 10
BinFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Software components . . . . . . . . . . . . . . . . . . . 11
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Quick start with Demo . . . . . . . . . . . . . . . . . . . 12
Download file . . . . . . . . . . . . . . . . . . . . . . . . . 13
Steps to download file with QBlueISPStudio . 13
Step 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Step 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Step 3: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Step 4: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Step 5: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Download file in Keil . . . . . . . . . . . . . . . . . . . . 15
Configure BLE device . . . . . . . . . . . . . . . . . . . 16
Steps to configure BLE device . . . . . . . . . . . . 17
Step 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Step 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Step 3: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2.1.4
5.2.1.5
5.3
5.3.1
5.3.1.1
5.3.1.2
5.3.1.3
5.3.1.4
5.3.1.5
5.3.1.6
5.4
5.4.1
5.4.1.1
5.4.1.2
5.4.1.3
5.4.1.4
5.4.2
5.4.3
6
6.1
6.2
7
8
9
10
10.1
10.2
10.3
11
12
13
Step 4: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 5: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connection. . . . . . . . . . . . . . . . . . . . . . . . . . .
Steps to set up the connection between the
Mini DK board and BLE dongle . . . . . . . . . . .
Step 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 3: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 4: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 5: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 6: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Function operation . . . . . . . . . . . . . . . . . . . . .
Find me . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 2: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 3: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 4: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Disconnect . . . . . . . . . . . . . . . . . . . . . . . . . . .
Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advanced application development . . . . . . .
Add driver file . . . . . . . . . . . . . . . . . . . . . . . . .
GPIO MUX Configuration. . . . . . . . . . . . . . . .
Trouble shooting . . . . . . . . . . . . . . . . . . . . . . .
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . .
References. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Legal information . . . . . . . . . . . . . . . . . . . . . .
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . .
Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . .
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . .
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
21
21
21
21
22
22
23
23
23
24
24
24
24
25
25
25
25
25
25
27
28
29
29
30
30
30
30
31
31
32
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section ‘Legal information’.
© NXP Semiconductors N.V. 2015.
All rights reserved.
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Date of release: 5 June 2015
Document identifier: AN11664