Realtek AmebaPro RTL8715AD User manual

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
1
Amazon Kinesis Video Streams Producer
on AmebaPro –Getting Started Guide
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

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
2
COPYRIGHT
© 2019 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
Please Read Carefully:
Realtek Semiconductor Corp., (Realtek) reserves the right to make corrections, enhancements, improvements and other changes to its
products and services. Buyers should obtain the latest relevant information before placing orders and should verify that such information is
current and complete.
Reproduction of significant portions in Realtek data sheets is permissible only if reproduction is without alteration and is accompanied by all
associated warranties, conditions, limitations, and notices. Realtek is not responsible or liable for such reproduced documentation. Information
of third parties may be subject to additional restrictions.
Buyers and others who are developing systems that incorporate Realtek products (collectively, “Customers”) understand and agree that
Customers remain responsible for using their independent analysis, evaluation and judgment in designing their applications and that
Customers have full and exclusive responsibility to assure the safety of Customers' applications and compliance of their applications (and of all
Realtek products used in or for Customers’ applications) with all applicable regulations, laws and other applicable requirements. Designer
represents that, with respect to their applications, Customer has all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that might
cause harm and take appropriate actions. Customer agrees that prior to using or distributing any applications that include Realtek products,
Customer will thoroughly test such applications and the functionality of such Realtek products as used in such applications.
Realtek’s provision of technical, application or other design advice, quality characterization, reliability data or other services or information,
including, but not limited to, reference designs and materials relating to evaluation kits, (collectively, “Resources”) are intended to assist
designers who are developing applications that incorporate Realtek products; by downloading, accessing or using Realtek’s Resources in any
way, Customer (individually or, if Customer is acting on behalf of a company, Customer’s company) agrees to use any particular Realtek
Resources solely for this purpose and subject to the terms of this Notice.
Realtek’s provision of Realtek Resources does not expand or otherwise alter Realtek’s applicable published warranties or warranty disclaimers
for Realtek’s products, and no additional obligations or liabilities arise from Realtek providing such Realtek Resources. Realtek reserves the
right to make corrections, enhancements, improvements and other changes to its Realtek Resources. Realtek has not conducted any testing
other than that specifically described in the published documentation for a particular Realtek Resource.
Customer is authorized to use, copy and modify any individual Realtek Resource only in connection with the development of applications that
include the Realtek product(s) identified in such Realtek Resource. No other license, express or implied, by estoppel or otherwise to any other
Realtek intellectual property right, and no license to any technology or intellectual property right of Realtek or any third party is granted herein,
including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination,
machine, or process in which Realtek products or services are used. Information regarding or referencing third-party products or services does
not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of Realtek Resources may require a license
from a third party under the patents or other intellectual property of the third party, or a license from Realtek under the patents or other
Realtek’s intellectual property.
Realtek’s Resources are provided “as is”and with all faults. Realtek disclaims all other warranties or representations, express or implied,
regarding resources or use thereof, including but not limited to accuracy or completeness, title, any epidemic failure warranty and any implied
warranties of merchantability, fitness for a particular purpose, and non-infringement of any third party intellectual property rights.
Realtek shall not be liable for and shall not defend or indemnify Customer against any claim, including but not limited to any infringement claim
that related to or is based on any combination of products even if described in Realtek Resources or otherwise. In no event shall Realtek be
liable for any actual, direct, special, collateral, indirect, punitive, incidental, consequential or exemplary damages in connection with or arising
out of Realtek’s Resources or use thereof, and regardless of whether Realtek has been advised of the possibility of such damages. Realtek is not
responsible for any failure to meet such industry standard requirements.
Where Realtek specifically promotes products as facilitating functional safety or as compliant with industry functional safety standards, such
products are intended to help enable customers to design and create their own applications that meet applicable functional safety standards
and requirements. Using products in an application does not by itself establish any safety features in the application. Customers must ensure
compliance with safety-related requirements and standards applicable to their applications. Designer may not use any Realtek products in life-
critical medical equipment unless authorized officers of the parties have executed a special contract specifically governing such use. Life-critical
medical equipment is medical equipment where failure of such equipment would cause serious bodily injury or death. Such equipment
includes, without limitation, all medical devices identified by the U.S.FDA as Class III devices and equivalent classifications outside the U.S.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
3
Customers agree that it has the necessary expertise to select the product with the appropriate qualification designation for their applications
and that proper product selection is at Customers’own risk. Customers are solely responsible for compliance with all legal and regulatory
requirements in connection with such selection.
Customer will fully indemnify Realtek and its representatives against any damages, costs, losses, and/or liabilities arising out of Designer’s non-
compliance with the terms and provisions of this Notice.
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
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.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
5
1.2 PCB Layout Overview
The PCB layout of AmebaPro is shown in Fig 1-1.
Fig 1-1 Demo board −PCB layout (2D)
1.3 LOGUART
The LOGUART is shown in Fig 1-2.
Fig 1-2 Demo board –LOGUART

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
6
1.4 JTAG/SWD
The SWD interface is shown in Fig 1-3.
Fig 1-3 Demo board –JTAG/SWD
Note: If using 2V0、2V1 version AmebaPro. Please check SW7 pin 3 switch to ON before connection.
1.5 Image Sensor
There is an image sensor socket as shown in Fig 1-4.
Fig 1-4 Demo board –image sensor

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
7
1.6 Requirement for Project Building
Supported IDE/toolchain: IAR, GCC
IAR Embedded Workbench - IAR Systems:
Please use IAR version 8.3 (There may be some compiler problems with v8.4)
GCC toolchain:
Linux: asdk-6.4.1-linux-newlib-build-3026-x86_64
Cygwin: asdk-6.4.1-cygwin-newlib-build-2778-i686

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
8
2Set Up an AWS Account and Create an Administrator
Before you use Kinesis Video Streams for the first time, refer AWS official guide to complete the following tasks:
(https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-account.html)
Sign Up for AWS (unless you already have an account)
Create an Administrator IAM User
Create an AWS Account Key
2.1 Sign Up for AWS
If you already have an AWS account, you can skip this step.
When you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up for all services in AWS, including Kinesis Video
Streams. When you use Kinesis Video Streams, you are charged based on the amount of data ingested into, stored by, and consumed from the
service. If you are a new AWS customer, you can get started with Kinesis Video Streams for free.
To create an AWS account
1. Open https://portal.aws.amazon.com/billing/signup.
2. Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.
Write down your AWS account ID because you need it for the next task.
2.2 Create an Administrator IAM User
When you sign up for AWS, you provide an email address and password that is associated with your AWS account. This is your AWS account
root user. Its credentials provide complete access to all of your AWS resources.
Note:
For security reasons, we recommend that you use the root user only to create an administrator, which is an IAM user with full permissions to
your AWS account. You can then use this administrator to create other IAM users and roles with limited permissions. For more information, see
IAM Best Practices and Creating an Admin User and Group in the IAM User Guide.
To create an administrator and sign into the console
1. Create an administrator in your AWS account. For instructions, see Creating Your First IAM User and Administrators Group in the IAM
User Guide.
2. As an administrator, you can sign in to the console using a special URL. For more information, see How Users Sign in to Your Account in
the IAM User Guide.
The administrator can create more users in the account. IAM users by default don't have any permissions. The administrator can create users
and manage their permissions. For more information, see Creating Your First IAM User and Administrators Group.
2.3 Create an AWS Account Key
You will need an AWS Account Key to access Kinesis Video Streams programmatically.
To create an AWS Account Key, do the following:
1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.
2. Choose Users in the navigation bar, and choose the Administrator user.
3. Choose the Security credentials tab, and choose Create access key.
4. Record the Access key ID. Choose Show under Secret access key, and then record the Secret access key.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
9
3Configure AmebaPro for Amazon KVS
3.1 Download Source Code from Github
Open source link: https://github.com/HungTseLee/KVS_WebRTC_on_AmebaPro and select main branch for get newest source code. The stable
version could be found by choosing specific tag.
3.1.1 Cloning the Repository by Git Command
On GitHub, navigate to the main page of the repository, and check its web URL.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
10
Open a terminal on PC and run the command to download the whole project, including the libraries in submodule.
$ git clone --recurse-submodules https://github.com/HungTseLee/KVS_WebRTC_on_AmebaPro.git
If you already have a checkout, run the following command to sync submodules recursively:
$ git submodule update --init --recursive
If there is GCC makefile error like: "No rule to make target …", it may mean that some codes have not been downloaded correctly.
Please run the above command again to download the missing codes.
3.2 Choose Image sensor
Please check image sensor module name is correct in “sensor.h”located in \project\realtek_amebapro_v0_example\inc
For example, if I use the sensor model IMX307, the SENSOR_USE should be defined as SENSOR_IMX307.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
11
3.3 Set Access Key ID and Secret Access Key on AmebaPro
After getting Access key ID and Secret access key in chapter 2.3, enter the key pair and stream name in file: sample_config.h
(SDK_path/component/common/example/kvs_producer/sample_config.h)
Additionally, you can change the kvs region by modifying AWS_KVS_REGION. The default region is us-east-1.
3.4 Enable KVS Producer Demo
All examples provided by RTK exist in folder: SDK_path/component/common/example. Please open platform_opts.h (SDK_path/project/
realtek_amebapro_v0_example/inc/platform_opts.h) to specify the example to run.
For example, if users want to use KVS Producer with multi-media framework on AmebaPro, compile flag
CONFIG_EXAMPLE_KVS_PRODUCER_MMF should be set to 1, which means
#define CONFIG_EXAMPLE_KVS_PRODUCER_MMF 1
Now you can start to compile AmebaPro Amazon KVS
How to modify the video parameter in producer multi-media example? See 9.1 Modify the Video Parameter
Note:
For more information of multi-media framework on AmebaPro, please see the following document:
https://github.com/HungTseLee/KVS_WebRTC_on_AmebaPro/blob/main/doc/AN0301%20Realtek%20AmebaPro%20multimedia%20framewo
rk%20v2.en.pdf
We will recommend to use the multi-media framework example, since it will be easier to integrate the example with other application.
However, if you don’t want to use the multi-media framework for KVS producer example, you can use the following demo alternatively:
#define CONFIG_EXAMPLE_KVS_PRODUCER 1

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
12
4Compile AmebaPro Amazon KVS Project
4.1 IAR Embedded Workbench Build Environment Setup
AmebaPro use the newest Big-Little architecture. Since the big CPU will depend on the setting of small CPU, it is necessary to compile the
small CPU before the big CPU.
4.1.1 Compile Little CPU
step 1. Open SDK/project/realtek_amebapro_v0_example/EWARMRELEASE/Project_lp.eww.
step 2. Confirm application_lp in WorkSpace, right click application_lp and choose “Rebuild All” to compile.
step 3. Make sure there is no error after compile.
4.1.2 Compile Big CPU
step 1. Open SDK/project/realtek_amebapro_v0_example/EWARMRELEASE/Project_is.eww.
step 2. Confirm application_is in WorkSpace, right click application_is and choose “Rebuild All” to compile.
step 3. Make sure there is no error after compile.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
13
4.1.3 Generating Image (Bin)
After compile, the images partition.bin, boot.bin, firmware_is.bin and flash_is.bin can be seen in the EWARM-RELEASE\Debug\Exe.
flash_is.bin links partition.bin, boot.bin and firmware_is.bin. Users need to choose flash_is.bin when downloading the image to board by
Image Tool.
4.2 Compile Program with GCC Toolchain
If using Linux environment or Cygwin on windows, follow the instructions below to build the project
$ cd project/realtek_amebapro_v0_example/GCC-RELEASE
Build the library and the example by running make in the directory
$ make -f Makefile_amazon_kvs all
If somehow it built failed, you can try to type $ make -f Makefile_amazon_kvs clean and then redo the make procedure.
After successfully build, there should be a directory named “application_is” created under GCC-RELEASE/ directory.
The image file flash_is.bin is located in ”application_is” directory.
If the application code is modified and need to build again, you just need to build the application project:
$ make -f application.is.amazon_kvs.mk all -j4
Note:
If there is compile error with shell script in "component/soc/realtek/8195b/misc/gcc_utility/", you may need to run following command
$ dos2unix component/soc/realtek/8195b/misc/gcc_utility/*

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
14
5Using Image Tool to Download Image
The tool ImageTool.exe can be find in project\tools\AmebaPro\Image_Tool\ImageTool.exe
5.1 Introduction
As show in the following figure, Image Tool has two tab pages:
Download: used as image download server to transmit images to AmebaPro through UART
Generate: concat separate images and generate a final image
Fig 5-1 ImageTool UI
5.2 Environment Setup
5.2.1 Hardware Setup
The hardware setup is shown in Fig 5-2.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
15
Fig 5-2 Hardware setup
5.2.2 Software Setup
Execute ImageTool.exe from location project\tools\AmebaPro\Image_Tool\ImageTool.exe
5.3 Download
5.3.1 Enter the Download Mode to Ready
Image tool use UART to transmit image to AmebaPro board. Before performing image download function, AmebaPro need to enter
UART_DOWNLOAD mode first. Please follow below steps to get AmebaPro into UART_DOWNLOAD mode:
step 1. Connect LOGUART with FT pin by jumper cap.
step 2. Connect USB->UART to PC by using micro-USB wire.
step 3. Switch“1”to ON from SW7(2V0、2V1) or Switch“2”to ON from SW7(1V0)
step 4. Push reset button.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
16
5.3.2 Download the Image to Flash
To download image through Image Tool, device need to enter UART_DOWNLOAD mode first.
Steps to download flash are as following:
step 1. Application will scan available UART ports. Please choose correct UART port. Please close other UART connection for the target UART
port.
step 2. Choose desired baud rate between computer and AmebaPro.
step 3. Choose target flash binary image file “flash_xx.bin”
step 4. Check Mode is “1. Program flash”
step 5. Click “Download”
step 6. Progress will be shown on progress bar and result will be shown after download finish.
step 7. Switch“1”to OFF from SW7(2V0、2V1) or Switch“2”to OFF from SW7(1V0)
step 8. Push reset button to start the program.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
17
6Using J-Link to Download Image and Debug (GCC)
If under linux environment, using J-link to download image to EVB will be recommended.
AmebaPro supports J-Link for code download and enter debugger mode with GCC. The settings for J-Link debuggers are described below. Here,
we will use segger j-link to demonstrate how to download image via SWD interface.
6.1 J-Link with SWD Interface
Note that if you are using Virtual Machine as your platform, please make sure the USB connection setting between VM host and client is
correct so that the VM client can detect the device.
The external SWD interface requires two pins: bidirectional SWDIO signal and a clock, SWCLK, which can be input or output from the device.
Note:
If using 2V0
、
2V1 version AmebaPro. Please check SW7 pin 3 switch to ON before connection.
if using SWD, please check four pin (VTref[VDD]、TMS[SWDIO]、TCLK[SWCLK] and TDO[SWO]) connected to EVB correctly.
Reminder:
The JTAG pin names are incorrect on AmebaPro 2V0
、
2V1. Please follow the diagram in the following figure to connect AmebaPro to
JTAG/SWD debugger.
6.2 Linux J-Link GDB Server
For J-Link GDB server, please check http://www.segger.com and download “J-Link Software and Documentation Pack”
(https://www.segger.com/downloads/jlink). We suggest using Debian package manager to install the Debian version:
$ dpkg -i JLink_Linux_V698e_x86_64.deb
After the installation of the software pack, there should be a tool named “JLinkGDBServer” under JLink directory. Take Ubuntu 16.04 as
example, the JLinkGDBServer can be found at /opt/SEGGER/JLink/ directory. Please open a new terminal and type following command to start
GDB server. Note that this terminal should NOT be closed if you want to download software or enter GDB debugger mode.
$ /opt/SEGGER/JLink/JLinkGDBServer -device cortex-m33 -if SWD

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
18
The started J-Link GDB server should looks like above figure. Please make sure the TCP/IP port is 2331 which should be the same as default
setting in component\soc\realtek\8195a\misc\gcc_utility\rtl_gdb_flash_write.txt
On the project terminal you should type below command before you using J-Link to download software or enter GDB debugger:
$ make -f Makefile_amazon_kvs setup GDB_SERVER=jlink
6.3 Windows J-Link GDB Server
Besides the hardware configuration, it also requires installing J-Link GDB server. For Windows, please check http://www.segger.com and
download “J-Link Software and Documentation Pack” (https://www.segger.com/downloads/jlink). After the installation of the software pack,
you should see a tool named “J-Link GDB Server”. Execute the J-Link GDB Server tool and choose the target device to Cortex-M33 and target
interface to SWD to start GDB server:

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
19
The started J-Link GDB server should looks like below figure. And this window should NOT be closed if you want to download software or enter
GDB debugger mode.
On the Cygwin terminal you should type below command before you using J-Link to download software or enter GDB debugger:
$ make -f Makefile_amazon_kvs setup GDB_SERVER=jlink
6.4 Download Image to Flash
After building the project in GCC, check that image exists in ”application_is” directory.
Then, go back to project/realtek_amebapro_v0_example/GCC-RELEASE and run the command:
$ make -f Makefile_amazon_kvs flash
Now, the image is being downloaded to EVB.
Press the reset button on the EVB to run the example after downloading.
Note:
If there is no response after run the command above, quit the GDB mode and press the reset button on EVB. Try the command again.
6.5 Enter GDB Debugger
type below command to enter GDB debug mode:
$ make -f Makefile_amazon_kvs debug
For further information about GDB debugger and its commands, please check https://www.gnu.org/software/gdb/ and
https://sourceware.org/gdb/current/onlinedocs/gdb/.

Ameba-Pro KVS Getting Started Guide
Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
20
7KVS Producer Demo
7.1 Get Device Log
Install Tera Term or other terminal emulator to get device log
Fig 7-1 Hardware setup
The serial port is same with ImageTool that get from 5.3.2 or use device manager to get the right serial port of device.
7.2 Run KVS Producer Demo
Default setting of SDK may not enable Producer demo, so please refer to Ch 3.3 to check whether KVS Producer Demo is enabled. Once the
AmebaPro EVB has rebooted, the application will automatically start run Producer demo and put media to KVS.
7.2.1 Connect to WIFI AP
In order to run the example, AmebaPro should connect to the network. It can be achieved by run the AT command in uart console. Please refer
to the steps below:
ATW0=<WiFi_SSID> : Set the WiFi AP to be connected
ATW1=<WiFi_Password> : Set the WiFi AP password
ATWC : Initiate the connection
Other Realtek Computer Hardware manuals
Popular Computer Hardware manuals by other brands

TC-Helicon
TC-Helicon PERFORM-VK quick start guide

Supermicro
Supermicro X11OPi user manual

NXP Semiconductors
NXP Semiconductors Androidi.MX 8M Mini quick start guide

Pioneer
Pioneer RG-2 operating instructions

Noctua
Noctua NH-D9 DX-3647 4U installation manual

Wintech
Wintech TDS560USB PLUS installation guide