10
1 RTL8189EM Driver for Synergy Application Note Version 1.0

RTL8189EM Driver for Synergy Application Note · The RTL8189EM Driver for Synergy is a Realtek8189 Wi-Fi Driver implemented for Renesas Synergy™ Software Package(SSP). This RTL8189EM

  • Upload
    vudiep

  • View
    233

  • Download
    0

Embed Size (px)

Citation preview

1

RTL8189EM Driver for Synergy

Application Note

Version 1.0

June 8, 2017

3

1. Introduction

The RTL8189EM Driver for Synergy is a Realtek8189 Wi-Fi Driver implemented for Renesas Synergy™ Software Package(SSP). This RTL8189EM Driver enables features and functions of Realtek8189 Wi-Fi chipset on SK-S7G2 Starter Kit through GSPI interface.

This RTL8189EM Driver contains binary demo applications built for SK-S7G2 Starter Kit including:

• Build with Renesas e2studio v5.4.0.023

• SSP v1.3.2 and HAL peripheral library

• RTL8189EM Add-on module

• Integrated with Express Logic ThreadX RTOS and NetX TCP/IP.

Please check the following diagram of RTL8189EM Driver for Synergy

Diagram 1

2. RTL8189EM Features

• IEEE 802.11b/g/n compatible WLAN

• 802.11e QoS Enhancement (WMM)

4

• 802.11i(WPA, WPA2). Open shared key and pair-wise authentication services

3. RTL8189EM +S7G2 System Configuration

The demo system is integrated with the following system, software and toolchain components:

• The RTL8189EM Driver for Synergy -

• Windows 10 Development PC

• RTL8189EM board +SK-S7G2 board

• e2studio 5.4.0.023

• SSP v1.3.2

• J-Link ARM GDB Debugger

5

4. Install the RTL8189EM+S7G2 project 4.1 Synergy Gallery Registration

RTL8189EM+S7G2 project installation uses the Renesas e2studio toolchain. Use the following links to register on Renesas Synergy Gallery, then download, install and activate e2studio:

• http://am.renesas.com/products/embedded_systems_platform/synergy/gallery/index.jsp

• https://synergygallery.renesas.com/auth/login

• https://synergygallery.renesas.com/

4.2 Download, Install and Activate e2studio

• https://synergygallery.renesas.com/isde

• https://synergygallery.renesas.com/ssp

• Click 'Create a Developer/Product License'

4.3 Hardware Setup

The RTL8189EM+S7G2 demo kit uses the Synergy SK-S7G2.

Refer to Reference [1] Renesas SK-S7G2 Quick Start Guide for details. Unpack the kit

and cable the board as shown in Figure 1.

- Connect the RTL8189EM to port J14 PMOD B.

- Connect the antenna to RTL8189EM.

- Connect a micro USB cable to port J5 for the serial console.

- Connect a micro USB cable to port J19 for the debugger and powering up SK-S7G2

6

Figure 1: RTL8189EM Board and SK-S7G2 board

7

4.4 Configuring WiFi Framework Components in e2 studio

Refer to the steps below for creating and configuring a new project.

• Copy the Renesas.Synergy_wifi_rtl8189em.1.3.2.pack file to the Packs folder of the e2studio folder. Example: C:\Renesas\e2_studio\internal\projectgen\arm\Packs.

• Start the Synergy Project wizard in e2 studio by clicking File >> New >> Synergy Project.

• Change the Synergy license file used to the evaluation license that is provided with this package.

• Choose SSP v1.3.2, as BSP is provided in the SSP pack.

o Choose “S7G2 SK”

• Create project with your desired Project Template.

• Choosing Blinky with ThreadX will give you a project with ThreadX already added.

• Switch to Threads tab.

• Add thread to system if one is not already present.

• Add NetX through New Thread Stacks button.

o Add “NetX IP Instance”

• Add sf_wifi_nsal_nx underneath the NetX Network Driver.

• Add your desired Synergy WiFi Framework component under the NSAL layer.

4.5 Thread Pane setup & Pin Configurations

• Create a new thread from thread pane

• Make sure to remove DTC driver for transmission and reception.

• Set the r_sci_spi properties as shown in below image.

• In g_sf_wifi0 properties, set the Reset and slave select pins.

• Go to Pins tab.

• Set up the SPI pins

8

4.6 Installing Thermostat_App_with_WIFI_RTL8189EM_SSP132

project using e2 studio

• Copy the Renesas.Synergy_wifi_rtl8189em.1.3.2.pack file to the Packs folder of the e2studio folder. Example: C:\Renesas\e2_studio\internal\projectgen\arm\Packs.

• Refer to the Synergy SSP Import Guide for importing the Thermostat_App_with_WIFI_RTL8189EM_SSP132 project.

4.7 Run the Thermostat_App_with_WIFI_RTL8189EM_SSP132

demo application

After completing the above steps, compile and run the application.

• To access the command console from the computer, install TeraTerm (or equivalent

serial terminal emulator) and open the terminal with the appropriate COM port

configured. The default configuration for the terminal is 9600-8-N-1.

• To access the menu type ? as shown in Figure 2.

Figure 2: Help Menu

• Scan for the available networks using ‘scan’ command.

• Provision the WiFi module to the desired network using the SSID, password and security type as shown in the Figure 3.

• Open the browser and enter the IP address acquired. Note: Make sure that the PC is connected to the same WiFi network as the one provisioned on the board.

• The Green LED on the board can be controlled from the ‘LED CONTROL’ Tab on the browser.

• Time and Date can be set using the setting tab on the SK-S7G2.

• Pushing the S4 button on the SK-S7G2 board increments the ‘Button Pushed Count’ on the browser as shown in Figure 4.

9

Figure 3: Connecting to WiFi

Figure 4: SK-S7G2 Control using the browser

5. Reference documents • SSP_v1.3_installation_guide.pdf

• Synergy Project Import Guide.pdf

• r11um0017eu0590_synergy_netx_http.pdf

• r11um0004eu0590-synergy-netx.pdf

• ThreadX_Users_Manual_Software_r11um0006eu0500_synergy.pdf

• r11um0050eu0100-synergy-wifi-addon-usage.pdf

Synergy WiFi Demo>setup_prov rea-guestwifi xxxxxxxx wpa2

Wifi settings saved in flash

Synergy WiFi Demo>connect

Provisioning Wifi Module

Wifi device provision successful

Waiting for IP address.

DHCP Assigned IP: 192.168.0.12

IP configured

Synergy WiFi Demo>

10