Ameba RTL8195AM+ALC5680 Smart Voice 2-Mic Development Kit User Guide for Baidu DuerOS

Similar documents
1. Introduction This document describes the use of CREATOR pro standard SDK to debug the program, the standard SDK provides IAR project for the user r

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

UM QN908x Quick Start. Document information. QN908x, Quick Start, Development Kit, QN9080 DK, QN9080 Development Kit

UM User Manual for LPC54018 IoT Module. Rev November Document information

AL582C-EVB-A0 Evaluation Board

PremierWave 2050 Enterprise Wi-Fi IoT Module Evaluation Kit User Guide

Intel Galileo gen 2 Board

Ameba-Z DEV01 User Manual. This document defines pin out of Ameba-Z DEV01 demo board. Realtek

AT Command Reference and Applications User s Guide

Developing a simple UVC device based on i.mx RT1050

AL361A-EVB-A1. Multi-channel Video Processor EVB. Datasheet. (HDMI/AHD-to-HDMI) 2017 by AverLogic Technologies, Corp. Version 1.0

WPJ344 Hardware Manual

Realtek Ameba-1 Power Modes

Freedom FRDM-KV31F Development Platform User s Guide

xpico 200 Series Evaluation Kit User Guide

mbed Kit User Guide of NQ62x daughter board

STM32 F4xx Discovery Board Setup Guide

Developing a Camera Application with i.mx RT Series

AL362B-EVB-A1. AHD-to-HDMI Quad Box Development Kit by AverLogic Technologies, Corp. Version 1.0

UM LPC54018 IoT module. Document information. LPC54018, OM40007, Amazon FreeRTOS, AWS, GT1216 LPC54018 IoT module user manual

A113X1 Development Kit

MIMXRT1020 EVK Board Hardware User s Guide

SABRE for Automotive Infotainment Quick Start Guide. Smart Application Blueprint for Rapid Engineering Based on the i.mx 6 Series

LPC2148 DEV BOARD. User Manual.

STM32 F7xx Discovery Board Setup Guide

ARDUINO PRIMO. Code: A000135

i.mx 6UltraLite Evaluation Kit Quick Start Guide s datasheet has been downloaded from at this pag

Keil TM MDK-ARM Quick Start for. Holtek s HT32 Series Microcontrollers

TWR-LS1021A Getting Started

Official Publication Date: 12/18/2018 Official Expiration Date: Until Next Release

Programming in the MAXQ environment

Freescale Semiconductor Inc. TWRWIFIGS1500MLAB. TWR-WIFI-GS1500M Lab Guide Rev. 1

ArduCAM CC3200 UNO board

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

Part Number Density Product Type Operation Temperature. W25Q80NESNIG 8Mb 1.2V Serial NOR Flash Memory Industrial (-40 C to +85 C)

Product Datasheet: DWM1001-DEV DWM1001 Module Development Board. Key Features and Benefits

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

BNO080 Development Kit for Nucleo Quick Start Guide

Hands on Experience with AVR32

Smart Plug Software Design Reference Manual

USB485. USB to RS485 Converter Card. User Manual for connecting with Windows Vista Version 1.01

USB-to-I2C Basic. Hardware User s Manual.

ZCRMZNICE01ZEMG Crimzon In-Circuit Emulator

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

LPC1788 Mio Board. User Manual. Revision 1.0 1

CoiNel Technology Solutions LLP. LPC2148 ARTIST Instruction Manual LPC2148 ARTIST. Instruction manual. Revision 1

Development Kit Manual. SIM5360_EVB_User Guide_V1.02

Boson Development Board <9hz Boson

)8-,768'HY.LW 2YHUYLHZ. )XMLWVX0LNURHOHNWURQLN*PE+ Am Siebenstein Dreieich-Buchschlag, Germany

QUICK START GUIDE VAB-630. Android EVK v

Ai-Thinker. ESP-01F Datasheet. Version V1 Copyright Copyright 2018 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved

User Guide SU60-SIPT Development Kit (DVK-SU60-SIPT) Version 1.0

Hands-On Workshop: ARM mbed : From Rapid Prototyping to Production

PBLN52832 DataSheet V Copyright c 2017 Prochild.

Getting Started with FreeRTOS BSP for i.mx 7Dual

Evaluation & Development Kit for Freescale PowerPC MPC5517 Microcontroller

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

GM8126 EVB. User Guide Rev.: 1.1 Issue Date: July 2011

Nuvoton 4T 8051-based Microcontroller NuTiny-SDK-N78E715 User Manual

QUICK START GUIDE ALTA DS 4K. Android EVK v

Emulating Dual SPI Using FlexIO

USER GUIDE 1 INTRODUCTION 2 GENERAL DESCRIPTION. A) Mbed enabled MCU Board. B) Shield Board. Quad SPI Evaluation Kit

Hands-On Workshop: ARM mbed

Kinetis SDK v Release Notes for KV5x Derivatives

AT91SAM9RL64 Hands-on 03: Deploy an application thanks to the AT91SAM9RL64 BootROM loaders and at91bootstrap

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

SABRE Board for Smart Devices

User Manual. LPC-StickView V1.1. for LPC-Stick. Contents

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

EZ-USB FX3 Development Kit Guide

Ai-Thinker. ESP-12S Datasheet. Version V0. Copyright 2018 ESP-12S WIFI MODULE V0. Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved

Get Started SUPPORT WARRANTY. Visit the i.mx community at

HARDWARE REFERENCE IMM-NRF51822

Quick Start Guide. SABRE Platform for Smart Devices Based on the i.mx 6 Series

Avnet Zynq Mini Module Plus Embedded Design

Getting started with the FP-SNS-ALLMEMS1 Bluetooth low energy and sensors software expansion for STM32Cube

How to Enable Boot from HyperFlash and SD Card

ARROW ARIS EDGE Board User s Guide 27/09/2017

ST25DV-DISCOVERY. Discovery kit for the ST25DV04K dynamic NFC/RFID tag. Features

MIMXRT1050 EVK Board Hardware User s Guide

OK335xS Users Manual Part I - Introduction

CoLinkEx_LPC11C14 EVB Kit User Guide

Nuvoton 1T 8051-based Microcontroller NuTiny-SDK-N76E885 User Manual

MYD-IMX28X Development Board

ISMART Inventek Systems Module Arduino Test. Product Brief

RK3036 Kylin Board Hardware Manual V0.1

Freescale MKW40Z IEEE Software Quick Start Guide

ESPino - Specifications

Quick Start Guide. TWR-KV10Z32 Development Kit for Kinetis KV1x Family TOWER SYSTEM

Adesto Serial Flash Demo Kit: Quick Start Guide

SN32F100 Series QUICK START. SN32F100 Series SN32F107 SN32F108 SN32F109. SONiX TECHNOLOGY CO., LTD Page 1 Version 3.1

Getting Started with STK200 Dragon

User Manual Firmware Update

MIMXRT1050 EVK Board Hardware User s Guide

BIG8051. Development system. User manual

Quick Start Guide. USB Packet Sniffer/Dongle for Kinetis MKW22D and MKW24D Wireless MCUs USB-KW24D512

Transcription:

Ameba RTL8195AM+ALC5680 Smart Voice 2-Mic Development Kit User Guide for Baidu DuerOS Realtek Semiconductor Corp. No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan Tel.: +886-3-578-0211. Fax: +886-3-577-6047 www.realtek.com.tw

COPYRIGHT 2017 Realtek Semiconductor Corp. All rights reserved. No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form or by any means without the written permission of Realtek Semiconductor Corp. DISCLAIMER Realtek provides this document as is, without warranty of any kind, neither expressed nor implied, including, but not limited to, the particular purpose. Realtek may make improvements and/or changes in this document or in the product described in this document at any time. This document could include technical inaccuracies or typographical errors. TRADEMARKS Realtek is a trademark of Realtek Semiconductor Corporation. Other names mentioned in this document are trademarks/registered trademarks of their respective owners. USING THIS DOCUMENT This document is intended for the hardware and software engineer s general information. Though every effort has been made to ensure that this document is current and accurate, more information may have become available subsequent to the production of this guide. In that event, please contact your Realtek representative for additional information that may help in the development process. i

TABLE OF CONTENT 1. Overview... 5 2. ALC5680 Evaluation Board... 5 2.1. Board Information... 5 2.2. Hardware Description... 6 2.2.1. Power... 6 2.2.2. Control... 6 2.2.3. Audio interface... 6 2.2.4. Reset... 6 2.2.5. Microphone... 6 2.2.6. Speaker... 7 2.2.7. SPI flash... 7 2.3. Pin Out... 7 2.4. Setup and Connect to Realtek Ameba DEV... 8 2.5. Reference Schematics... 9 3. Ameba Evalution Board... 11 3.1. System requirements... 11 3.2. Hardware block diagram... 11 3.3. Pin out reference... 12 3.4. Antenna hardware setup... 13 3.5. Peripherals support... 13 3.5.1. Pin function table setup... 14 3.5.2. Peripheral Descriptions... 14 3.6. Hardware configuration... 15 3.6.1. CMSIS-DAP... 15 3.6.2. J-Link/JTAG... 16 3.6.3. DAP mode... 17 4. Ameba Software Environment Setup... 19 4.1. Introduction... 19 4.2. How to get IAR... 19 4.3. Debugger Setting... 19 4.4. Debugger Setting... 19 4.4.1. CMSIS-DAP... 19 4.4.2. J-Link/JTAG... 20 4.5. How to build and download code... 22 4.6. How to use sample code... 24 5. ALC5680 Firmware upgrade by Ameba... 25 5.1. Environment Setup... 25 5.2. Generate the ALC5680 DSP bin file... 26 5.3. Open the TFTP server... 26 5.4. Upgrade ALC5680 DSP firmware... 27 5.4.1. Program Ameba f/w... 27 5.4.2. Connect Ameba to AP... 27 5.4.3. Upgrade ALC5680 DSP f/w through TFTP... 28 5.5. Verify the voice trigger and lineout function... 29 6. Patch DuerOS to Ameba SDK... 29 6.1. Download Ameba SDK... 29 6.2. Download DuerOS Patch... 30 6.3. Patch DuerOS to SDK... 30 ii

Figures Figure 1 ALC5680 EVK TOP view and board information... 5 Figure 2 ALC5680 EVK BOTTOM view... 6 Figure 3 ALC5680 EVK pinout... 7 Figure 4 ALC5680 EVK setup with Ameba EVK and MIC board... 8 Figure 5 ALC5680 EVK setup with Powered Speakers... 8 Figure 6 ALC5680 EVK reference schematics... 10 iii

REVISION HISTORY Revision Release Date Summary 1.0 2017/6/30 release 4

1. Overview This document describes the features of the ALC5680 evaluation board, including board information, hardware description, pin out, connections with Realtek Ameba RTL8195 Arduino Wireless Board, schematics and firmware upgrade flow. This ALC5680 evaluation board is designed to interface with Realtek Ameba RTL8195 Arduino Wireless Board and shipped with Realtek Ameba RTL8195 Arduino Wireless Board as one package for easily building the prototypes of voice-enpowered IoT application. 2. ALC5680 Evaluation Board 2.1. Board Information ALC5680 Microphone module with two mics Stereo Line out SPI Flash LED indicated by Wake Word 小度小度 Figure 1 ALC5680 EVK TOP view and board information 5

Figure 2 ALC5680 EVK BOTTOM view 2.2. Hardware Description 2.2.1. Power ALC5680 evaluation board is powered by Realtek Ameba RTL8195 Arduino Wireless Board by J22. 2.2.2. Control The ALC5680 is controlled by Ameba via I2C interface at J21. 2.2.3. Audio interface The audio interface between ALC5680 and Ameba is I2S at J21. 2.2.4. Reset SW1 at ALC5680 evaluation board is used to hardware reset ALC5680 and also signal Ameba by J19. 2.2.5. Microphone Microphone module is connected to ALC5680 evaluation board via JM3. 6

2.2.6. Speaker A powered Speaker connected to ALC5680 evaluation board via PH1. 2.2.7. SPI flash 4M byte (32M bit) SPI flash is on board and firmware upgrade is supported. 2.3. Pin Out Figure 3 ALC5680 EVK pinout 7

2.4. Setup and Connect to Realtek Ameba DEV Figure 4 ALC5680 EVK setup with Ameba EVK and MIC board Connect to Powered Speakers Connect to +5V Power Supply by USB cable Figure 5 ALC5680 EVK setup with Powered Speakers 8

2.5. Reference Schematics 9

Figure 6 ALC5680 EVK reference schematics 10

3. Ameba Evalution Board 3.1. System requirements Windows PC (XP, Vista, 7) USB type A to Micro-B USB cable x 1 RS-232 to UART board(debug) x 1, JTAG cable x1 (option) 3.2. Hardware block diagram IC: RTL8195AM Module HDK version: HDK-AM95A03_1V0 DEV HDK version: RTL-AMEBA_DEV01_1v1 NFC Antenna Wi-Fi external ANT connector Wi-Fi PCB Antenna Ameba reset button J-TAG J22 RTL8195AM UART J21 DAP J20 DAP+DC +serial port USB Host DC 5V J19 DAP update 11 DAP reset Mode button button

3.3. Pin out reference 12

3.4. Antenna hardware setup I-PEX/U.FL connector: R206 External antenna: R207 PCB antenna: R208 R 20 R20 R20 3.5. Peripherals support Debug UART: GPIOB_[0..1] JTAG: GPIOE_[0..4] 13

3.5.1. Pin function table setup Multiple functions are supported by group setup. For example: GPIOA_6(Rx), GPIOA_7(Tx), GPIOA_3(RTS) and GPIOA_5(CTS) are used if UART0 function. GPIOA_3(RTS) and GPIOA_5(CTS) can not be used as other functions. For example: GPIOC_0, GPIOC_1, GPIOC_2, GPIOC_2, GPIOC_3 are used if PWM is occupied. GPIOC_1(PWM1) and GPIOC_2(PWM2) can not be used as other functions. UART SPI SDIO Debug console I2C JTAG UART SPI I2S PWM NOTE1: PH = Pull-High, HI = High-impedance NOTE2: GPIOA_1 needs external Circuit to do the pull high control; others pull control can be done by register setting (including GPIOA_1 s PD). 3.5.2. Peripheral Descriptions UART SPI Baud rate UART_LOG 38400 Hz UART0 4 MHz UART2 4 MHz Clock rate SPI0_Master 20.8 MHz SPI0_Slave_TRx 4.1 MHz SPI1_Master 41.6 MHz SPI1_Slave_TRx -- 14

I2C Standard mode Fast mode High-speed mode Clock rate 0~100 kb/s <400 kb/s <3.4Mb/s 3.6. Hardware configuration 3.6.1. CMSIS-DAP RTL-AMEBA_DEV01 supports CMSIS-DAP debugger. It requires installing serial to USB driver at first. Serial to USB driver can be found in tools\serial_to_usb\mbedwinserial_16466. Connect board to the PC with micro-usb cable. 15

3.6.2. J-Link/JTAG Weld JTAG and log UART connectors to HDK board and connect with pitch 2.54mm 2x5pins connector. It is recommended to weld the connector on the bottom side. Users can connect extension boards from top side. JTAG 5V DC UART Dupont Line or 2.54mm 2x5 pins connector. Power On(Disable DAP mode) Holding TGT_NRESET button (J24, red-circled) then press Pdn button (J13, blur-circled). 16

Release the button after power on. J2 J1 J1 3.6.3. DAP mode In DAP mode, the DAP firmware can be updated. Holding TGT_NRESET button (J24, red-circled) then press nreset button (J17, blur-circled). Then the DAP mode window will show up. 17

J2 J1 J1 DAP window will show up when entering DAP mode. 18

4. Ameba Software Environment Setup 4.1. Introduction This chapter illustrates how to build Realtek low power Wi-Fi software under IAR SDK environment. 4.2. How to get IAR IAR provides an IDE environment for code building, downloading, and debugging. Please check IAR Embedded Workbench on http://www.iar.com/, and trail version is available. It requires IAR version greater than v7.20 which supports CMSIS-DAP. 4.3. Debugger Setting This board supports both CMSIS-DAP debugger and J-Link. 4.4. Debugger Setting This board supports both CMSIS-DAP debugger and J-Link. 4.4.1. CMSIS-DAP Ameba Device Board 2V0 supports CMSIS-DAP debugger. It requires installing serial to USB driver at first. Serial to USB driver can be found in tools\serial_to_usb\mbedwinserial_16466. Connect board to the PC with micro-usb cable. After installation, connect the board to PC, and then there should be mbed Serial Port shown in Device Manager. 19

4.4.2. J-Link/JTAG The board is configured as CMSIS-DAP mode. To use J-Link debugger, please follow the next procedures. Hardware Configuration Weld JTAG and log UART connectors to HDK board and connect with pitch 2.54mm 2x5pins connector. It is recommended to weld the connector on the bottom side. p.s. J-Link is supported on RTL-AMEBA_DEV_3V0 2.54mm 2x5pins connector (or use Dupont Line) IAR Setting 20

Change setting of IAR project from CMSIS-DAP to J-Link/J-Trace in Project Options Debugger Setup Driver, and Selecting OK to finish and enjoy JTAG debugging. Power On Please not that for some J-Link debugger, it may require disabling CMSIS-DAP. There are two kinds of method to disable CMSIS-DAP function. One is holding button (red-circled) then plugging power to disable CMSIS-DAP function. Release the button after power on. The other is holding button (red-circled) and then press button (yellow-circled) to disable CMSIS-DAP function. If CMSIS-DAP function is disabled successfully, LEDs (D4 and D5) will not be shined. 21

Note: To reset main chip, it is recommended to press Reset button (green-circled) instead of re-plugged in the power cable. 4.5. How to build and download code Step 1: Open IAR Workbench Step 2: To open project, click File Open Workspace Step 3: Select Project.eww in project\project_name_xxxx\ewarm-release Step 4: To build project, click Project Rebuild All 22

Step 5: To download code, Click Project Download Download active application. After firmware download, click reset button to reboot the system 23

How to debug Set Break point. To debug or trace code step by step, click Project Download and Debug. 4.6. How to use sample code There are several peripheral example code under folder project\project_name_xxxx\ example_sources \, you can copy & paste the example s inc and src to project folder. Ex. To use i2c example code, you can copy src and inc from project\project_name_xxxx\example_sources\i2c\. 24

5. ALC5680 Firmware upgrade by Ameba 5.1. Environment Setup To make sure that the network is connection for each other. Please follow steps to confirm it. Connect PC to AP: either Ethernet or Wi-Fi connecting is ok. Connect Ameba+DSP to AP using AT commands. ATW0=SSID ATW1=password ATWC ATW? to show IP information: PC can ping Ameba 25

Ameba can ping PC 5.2. Generate the ALC5680 DSP bin file Put the DSP dat file in DSP_fw_combine_one_tool folder. Change your file name into All_in_one.dat. Run alc_fw_upgrade.bat in the same path. Generate alc_fw_upgrade.bin The binary data will add 12 bytes in file. Please see the below picture. 5.3. Open the TFTP server Execute TFTP Browse the alc_fw_upgrade.bin (file name cannot be changed) Reminding to turn off firewall of PC or allow the TFTP tool running. 26

5.4. Upgrade ALC5680 DSP firmware 5.4.1. Program Ameba f/w Enable the flag and modify the relative parameter. 1. Enable the example flag in platform_opt.h as below 2. Modify the TFTP server IP in example_alc_fw_dsp_upgrade.c 3. We will check whether the DSP firmware is in the flash, if the firmware exists, it will not be updated. If you want to force upgrade the firmware then set the follow defines flag. (You need to disable the flag when you finish the DSP upgrade or it will force upgrade again).we recommends that you can add a button or use at command to replace the force upgrade. 4. After compiler is finish, we burn the file into ameba flash. 5.4.2. Connect Ameba to AP Network Connection: AN0025 Realtek at command can be reference. #ATW0=SSID #ATW1=passphrase #ATWC 27

#ATW? to show IP information: 5.4.3. Upgrade ALC5680 DSP f/w through TFTP If we connect to the AP router the upgrade procedure will start. Erasing the flash firstly. It will take several seconds. Upgrading DSP f/w: Checking CRC: 28

Process done: 5.5. Verify the voice trigger and lineout function Run the i2s_alc5680_voice_recognition peripheral example to verify the function. Please notice that the AM8711 don t have led response action, the led control pin is for AM8195. 1) Say the Wake word, you will see the led flashing and print the voice IRQ log. 2) If you want to hear the voice from line out, you need to plug the earphone or speaker to phone jack. 6. Patch DuerOS to Ameba SDK 6.1. Download Ameba SDK You can download the newest ameba SDK sdk-ameba-v4.0a_without_nda.zip from the following URL: 29

https://www.amebaiot.com.cn/ameba-sdk-download/ 6.2. Download DuerOS Patch You can download the DuerOS patch 4.0a_patch_dueros(v01).zip from the following URL: https://www.amebaiot.com.cn/ameba-sdk-faq/ 6.3. Patch DuerOS to SDK Unzip sdk-ameba-v4.0a_without_nda.zip and 4.0a_patch_dueros(v01).zip, and copy all the files under the 4.0a_patch_dueros(v01) directory to the sdk-ameba-v4.0a_without_nda directory. Open the IAR project, sdk-ameba-v4.0a_without_nda\project\realtek_ameba1_va0_example\ EWARM-RELEASE\Project.eww, then build and download the image to Ameba1 as described in Chapter 4. Detailed description, you can refer to the document UM0150 Realtek Ameba dueros user guide.cn.pdf of the 4.0a_patch_dueros(v01) directory. 30