IoT (The Internet of Things) applications. It can be used with the DE series FPGA motherboard to expand board functions. The RFS2 uses a 2x20 GPIO to interface with the FPGA board. It has Wi-Fi, Classic Bluetooth (BT) and Bluetooth Low Energy(BLE) wireless communication capabilities;...
Page 5
Figure 1-1 The RFS2 Kit content RFS2 User Manual www.terasic.com December 13, 2021...
2x20 Pin GPIO connector. It can directly connect to the FPGA mainboard or indirectly connect to the FPGA board via a 40-pin IDC Cable. The pictures below show how the RFS2 daughter card is connected to various Terasic FPGA Boards:...
Page 7
Figure 1-3 Connect the RFS2 to DE10-Nano Figure 1-4 Connect the RFS2 to DE0-Nano RFS2 User Manual www.terasic.com December 13, 2021...
Page 8
Figure 1-5 Connect the RFS2 to DE0-CV Figure 1-6 Connect the RFS2 to DE0-Nano RFS2 User Manual www.terasic.com December 13, 2021...
Page 9
Figure 1-7 Connect the RFS2 to DE0-Nano-SoC Figure 1-8 Connect the RFS2 to DE1-SoC RFS2 User Manual www.terasic.com December 13, 2021...
Page 10
Figure 1-9 Connect the RFS2 to DE2-115 Figure 1-10 Connect the RFS2 to TR4 RFS2 User Manual www.terasic.com December 13, 2021...
Here are the addresses where you can get help if you encounter any problems: Terasic Technologies 9F., No.176, Sec.2, Gongdao 5th Rd, East Dist, Hsinchu City, 30070. Taiwan Email: support@terasic.com Tel.: +886-3-575-0880 Website: http://RFS2.terasic.com RFS2 User Manual www.terasic.com December 13, 2021...
Chapter 2 RFS2 Daughter Card This chapter will introduce the RFS2 daughter card included in the Kit. The daughter card is interfaced to FPGA mainboard by 2x20 GPIO interface. Except for the uart-to-usb chip, the card is powered from the FPGA mainboard. The 3.3V source in the 2x20 GPIO interface is sued to drive this daughter card.
2.2 Block Diagram of the RFS2 Daughter Card Figure 2-2 shows the block diagram of the RFS2 daughter card. 2x20 GPIO is interface of this daughter card. The sensors can be communicated with I2C interface. Besides I2C, the 9-axis sensor also can be communicated with SPI interface if hi-speed is required.
Figure 2-3 Major component layout on the RFS2 card 2.5 Interface for FPGA Host The RFS2 card is connected to the host FPGA through the JP1 - a 2x20 GPIO header as shown in Figure 2-4. VCC3P3 power is used to drive this daughter card. BT_UART_CTS and BT_UART_RST is reserved pins.
Page 15
Figure 2-4 2x20 GPIO Pinout RFS2 User Manual www.terasic.com December 13, 2021...
Chapter 3 RTL Example Designs This chapter will demonstrate how the FPGA to communicate with the RFS2 daughter card in RTL code. 3.1 Query Current Time through Wi-Fi This section describes how to the Wi-Fi signal is transmitted via the ESP32-WROOM-32E Wi-Fi module on the RFS2 daughter card.
Page 17
Please follow the procedures below to setup the demonstration, as shown in Figure 3-2. 1. Connect the RFS2 daughter card to the GPIO0 of DE10-NANO board. 2. Plug in 5 V DC to DE10-NANOConnect the host PC to the USB connector (J9) on DE2-115 via USB cable.
Page 18
Please follow the procedures below to setup the demonstration, as shown in Figure 3-4 1. Connect the RFS2 daughter card to the GPIO of DE10-Lite board. 2. Connect the host PC to the USB connector (J9) on DE10-Lite via USB cable.
It can also upload the data which are pre-stored in the FPGA to the mobile phone and display on the Bluetooth debugging APP. Block Diagram Figure 3-5 shows the function block diagram Demonstration of reading and writing data via RFS2 User Manual www.terasic.com December 13, 2021...
Page 20
Step3:AT+BLEGATTSSRVCRE\r\n Step4:AT+BLEGATTSSRVSTART\r\n Step5:AT+BLENAME="Terasic_RFS2"\r\n Step6:AT+BLEADVDATA="201060D09546572617369635f52465332"\r\n Step7:AT+BLEADVSTART\r\n Step8:AT+BLESPPCFG =1,1,6,1,5\r\n Step9:AT+BLESPP\r\n Step10:Terasic_ESP32E\r\n Step11:+++ Step12:\r\n This demo can be realized on DE10-NANO and DE10-Lite. Please follow the steps below for running the demo on these two boards. RFS2 User Manual www.terasic.com December 13, 2021...
Page 21
Please follow the procedures below to setup the demonstration as shown in Figure 3-6. 1. Connect the RFS2 daughter card to the GPIO0 of DE10-NANO board. 2. Plug in 5V DC to DE10-NANO. 3. Connect the host PC to the USB connector (J13) on DE10-NANO via USB cable.
Page 22
LED[3] is light on and the other three LED (LED[2:0]) doesn’t light. It means the Bluetooth setup is ready for the RFS2 board and user can use the debugging APP of the mobile phone to connect to the Bluetooth of the RFS2.
Page 23
Figure 3-9 Open the Bluetooth debugging app o Write data into the FPGA board: When the app is connected to the RFS2 board through Bluetooth, find the “Writable” site and press the “” to enter the write function (See Figure 3-10).
Page 24
Observe the LED7~LED4, the 4 LED will show the hex number of the app just transmitted (See Figure 3-12). Figure 3-10 Open the Bluetooth debugging app Figure 3-11 Write data into FPGA RFS2 User Manual www.terasic.com December 13, 2021...
Page 25
Press the KEY1 button on the DE10-Nano board, then a string “Terasic_ESP32E” will be send to the debug app from the FPGA board (See Figure 3-15). Figure 3-13 Read string from FPGA RFS2 User Manual www.terasic.com December 13, 2021...
Page 26
Figure 3-14 Read string from FPGA Figure 3-15 Read string from FPGA Demonstration Setup for DE10-LITE Please follow the procedures below to setup the demonstration as shown in Figure 3-16. RFS2 User Manual www.terasic.com December 13, 2021...
Page 27
1. Power off the DE10-LITE board. 2. Connect the RFS2 daughter card to the GPIO connector of the DE10-Lite board. 3. Power on the DE10-LITE board. 4. Execute the batch file “ test.bat” under the demo_batch folder of DE10_LITE_BluetoothSPP_Slave project.
Figure 3-18 Display data on DE10-Lite 3.3 Sensor Measurement This part consists of three independent I2C controllers. Each of the I2C controllers is responsible for retrieving the measurement of corresponding sensor on RFS2 daughter card. The three sensors RFS2 User Manual www.terasic.com...
Page 29
Sensor Measurement demonstration. Figure 3-19 Function block diagram of sensor measurement HC1000: It controls the HDC1000 IC on RFS2 daughter card via I2C bus. It can retrieve the measurement of humidity and temperature from the slave address 0x80. The values of humidity and temperature can be represented in decimal after conversion in percentage and degrees, respectively.
Page 30
Quartus Project Information For DE10-NANO Mainboard Tool Quartus Prime Standard Edition V20.1.1 Project Directory Demonstrations\DE10_Nano\DE10_NANO_RFS2_SENSOR_RTL Demo Batch File Demonstrations\DE10_Nano\DE10_NANO_RFS2_SENSOR_RTL \demo_batch For DE10-Lite Mainboard Tool Quartus Prime Standard Edition V20.1.1 RFS2 User Manual www.terasic.com December 13, 2021...
Page 31
Please follow the procedures below to setup the demonstration, as shown in the Figure 3-22. 1. Connect the RFS2 daughter card to the GPIO0 of DE10-NANO board. 2. Plug in 5 V DC to DE10-NANO. 3. Connect the host PC to the USB connector (J13) on DE10-NANO via USB cable.
Page 32
Figure 3-22. 1. Connect the RFS2 daughter card to the GPIO of DE10-Lite board. 2. Connect the host PC to the USB connector (J3) on DE10-Lite via USB cable. 3. Please make sure Quartus Prime has been installed on the host PC.
This demo will use the UART interface on the RFS2 board to perform a data loopback example with host PC. User needs to connect the USB to UART port of RFS2 to the host with a USB cable first. When the UART interface on the RFS2 board receives the data transmitted from the host serial terminal program and it will be send to the FPGA, the received data will be processed in the FPGA then return the serial terminal program of the host through the UART interface of RFS2.
Page 34
Connect the host PC to the USB connector (J13) on DE10-NANO via USB cable. Connect the host PC to the USB connector (J2) on RFS2 via USB cable. Please make sure Quartus II has been installed on the host PC.
Page 35
PC) and baud rate to 115200 bps. Type any word to the serial terminal program and it will show on the serial terminal program. Figure 3-24 Demo setup with DE10-NANO Figure 3-25 Demo setup with DE10-NANO RFS2 User Manual www.terasic.com December 13, 2021...
2. Connect the host PC to the USB connector (J3) on DE10-Lite via USB cable. 3. Connect the host PC to the USB connector (J2) on RFS2 via USB cable. 4. Please make sure Quartus II has been installed on the host PC.
Page 37
The firmware download interface of ESP32-WROOM-32E is the UART0 port. The FPGA is configured to connect the USB-to-UART signal (from mini USB connector (J2) of RFS2) to the UART0 port of ESP32, so user can download firmware from the mini USB connector (J2).
Page 38
3. Connect the host PC to the Mini USB connector (J13) on DE10-Nano via an Mini USB cable. 4. Connect the host PC to the Mini USB connector (J2) on RFS2 via a Mini USB cable. 5. Execute the batch file “ test.bat” under the demo_batch folder to configure FPGA. When configured is done, LED0 and LED1 of the FPGA mainboard are lighten.
Page 39
12. In this moment, firmware is download successfully. Power off the FPGA mainboard and restore JP2 jumper of RFS2 to position 1-2. Figure 3-28 Setup RFS2 on DE10-Nano Figure 3-29 ESP32 DOWNLOAD TOOL Query Dialog RFS2 User Manual www.terasic.com December 13, 2021...
Page 40
Figure 3-30 ESP32 Download Tool Configure RFS2 User Manual www.terasic.com December 13, 2021...
Page 41
Figure 3-31 Firmware Download in SYNC status RFS2 User Manual www.terasic.com December 13, 2021...
Page 42
3. Connect the host PC to the USB connector (J3) on DE10-Lite via an USB cable. 4. Connect the host PC to the Mini USB connector (J2) on RFS2 via a Mini USB cable. 5. Execute the batch file “ test.bat” under the demo_batch folder to configure FPGA. When configured is done, LED0 and LED1 of the FPGA mainboard are lighten.
Page 43
11. When firmware download is finished, users will see “FINISHED” status on GUI, as shown in Figure 3-33. 12. In this moment, firmware is download successfully. Power off the FPGA mainboard and restore JP2 jumper of RFS2 to position 1-2. Figure 3-34 Setup RFS2 on DE10-Lite RFS2 User Manual www.terasic.com...
Chapter 4 Nios II Based Example Designs This chapter will demonstrate how the FPGA to communicate with the RFS2 daughter card based on Nios II processor. 4.1 Wi-Fi Client This demonstration shows how clients use timing web server and query the internet time through the Wi-Fi function of the ESP32-WROOM-32E module on the RFS2 daughter card.
Page 45
Figure 4-2. 1. Connect the RFS2 daughter card to the GPIO-0 connector of the DE10-Nano board. 2. Make sure the jumper is located at pin 1-2 on the JP2 of RFS2 daughter card. RFS2 User Manual www.terasic.com December 13, 2021...
Page 46
7. The UTC(Universal Time Coordinated) time will be display on the nios2-terminal as shown in Figure 4-3. 8. Optional, users can use a USB cable to connector the Mini USB Connector (J2) on RFS2 to your PC to see the ESP32-WROOM-32E firmware log. Figure 4-2 Setup WiFi Client Demo on DE10-Nano RFS2 User Manual www.terasic.com...
Page 47
7. The UTC(Universal Time Coordinated) time will be display on the six 7-segement as shown Figure 4-5. 8. Optional, users can use a USB cable to connector the Mini USB Connector (J2) on RFS2 to your PC to see the ESP32-WROOM-32E firmware log. RFS2 User Manual www.terasic.com...
The web server provides the LED control interface as shown in Figure 4-6. Users can click the blue led text to lighten/un-lighten the LEDs on the FPGA main board. RFS2 User Manual www.terasic.com December 13, 2021...
Page 49
ESP32-WROOM-32E module via AT command defined by ESP32-WROOM-32E. Besides, the 2-pin UART0 port on ESP32-WROOM-32E module is connected to the RFS2 on-board UART-TO-USB port in RTL code, so users can see the firmware log if debug is required.
Page 50
Gecko) CriOS/55.0.2883.79 Mobile/13F69 Safari/601.1.46 In this demonstration, the request message is classified as five types according to the requested resource. The request message type can be determined by only parsing the first line string in the RFS2 User Manual www.terasic.com December 13, 2021...
Page 51
1. Connect the RFS2 daughter card to the GPIO-0 connector of the DE10-Nano board. 2. Make sure the jumper is located at pin 1-2 on the JP2 of RFS2 daughter card. 3. Connect a USB cable between the host PC and the USB connector (J13) on the DE10-Nano.
Page 52
8. Click led_on and led_off the control the LED on FPGA as shown in Figure 4-6. 9. Optional, users can use a USB cable to connector the Mini USB Connector (J2) on RFS2 to your PC to see the ESP32-WROOM-32E firmware log. Figure 4-8 Setup WiFi Web Server Demo on DE10-Nano Figure 4-9 WiFi Web Server listen at port 80 ...
8. Click led_on and led_off the control the LED on FPGA as shown in Figure 4-6. 9. Optional, users can use a USB cable to connector the Mini USB Connector (J2) on RFS2 to your PC to see the ESP32-WROOM-32E firmware log. Figure 4-10 Setup WiFi Web Server Demo on DE10-Lite 4.3 Bluetooth Classic SPP...
Page 54
Demonstration Setup for DE10-Lite Please follow the procedures below to setup the demonstration.. 1. Prepare two DE10-Lite boards and two RFS2 cards and plug the RFS2 into the GPIO header on the DE10-Lite. 2. See Figure 4-11, using USB cable to connect both the DE10-Lite boards and host PC. Note,...
Page 55
FPGA on the DE10-Lite board and configure the ESP32 module to run the SPP slave mode. 4. Make sure the SPP slave AT command had been send into the ESP32 module (See Figure 4-12). RFS2 User Manual www.terasic.com December 13, 2021...
Page 56
ESP32 module to run the SPP master mode. 6. The SPP master AT command will be configure to the ESP32 module on the another DE10-Lite board (see Figure 4-13). Figure 4-13 Set the master SPP AT command RFS2 User Manual www.terasic.com December 13, 2021...
Page 57
“1” number for the string for example from “[0] LoopBack” to “[1] LoopBack”. And the modified string will be send to slave board. Then the boards on both sides will repeat step 7~8 to send data back and forth as shown in Figure 4-15. RFS2 User Manual www.terasic.com December 13, 2021...
Page 58
Demonstration Setup for DE10-Nano Please follow the procedures below to setup the demonstration as shown in Figure 4-16. 1. Prepare two DE10-Nano boards and two RFS2 cards and plug the RFS2 into the GPIO-0 connector on the DE10-Nano board. 2. See Figure 4-16, using USB cable to connect both the DE10-Nano boards and host PC.
Figure 4-16 Setup Demo on DE10-Nano board 4.4 Sensor Measurement The RFS2 is equipped with three sensors; an ambient light sensor,a humidity and temperature sensor, and a 9-axis motion tracking sensor. The APM-16D24 is a light-to-digital ambient light photo sensor whose intensity converts light into a digital signal output capable of I2C interface. The...
Page 60
Block Diagram Figure 4-17 shows the function block diagram of the RFS2 three-sensor demonstration. The system requires a 50 MHz clock input from the board. Three I2C_OPENCORES controllers are used to communicate with the APM-16D24, HDC1000 and ICM-20948 chips, respectively. The Nios II processor is used to configure the sensors, read the measured values, and show the measured values on the Nios II terminal.
Page 61
Quartus Prime Standard Edition V20.1.1 Project Directory Demonstrations\DE10_Nano\DE10_NANO_RFS2_SENSOR Demo Batch File Demonstrations\DE10_Nano\DE10_L NANO_RFS2_SENSOR \demo_batch For DE10-Lite Mainboard Tool Quartus Prime Standard Edition V20.1.1 Project Directory Demonstrations\DE10_Lite\DE10_LITE_RFS2_SENSOR Demo Batch File Demonstrations\DE10_Lite\DE10_LITE_RFS2_SENSOR \demo_batch Demonstration Setup for DE10-Nano RFS2 User Manual www.terasic.com December 13, 2021...
Page 62
1. Make sure Quartus Prime v16.1 or later is installed on your PC. 2. Connect the RFS2 daughter card to the 2x20 GPIO-0 connector on the DE10-Nano board. 3. Connect a USB cable between the host PC and the USB connector (J13) on the DE10-Nano.
Page 63
1. Make sure Quartus Prime v16.1 or later is installed on your PC. 2. Connect the RFS2 daughter card to the 2x20 GPIO connector on the DE10-Lite board. 3. Connect a USB cable between the host PC and the USB connector (J3) on the DE10-Lite.
Page 64
Figure 4-20 Setup Sensor demo on DE10-Lite Figure 4-21 Report measured sensor values on DE10-Lite RFS2 User Manual www.terasic.com December 13, 2021...
Need help?
Do you have a question about the RFS2 and is the answer not in the manual?
Questions and answers