GOWIN GW1NRF Bluetooth FPGA Module User Guide

June 6, 2024
GOWIN

GOWIN GW1NRF Bluetooth FPGA Module User Guide

Testing GW1NRF4 Development Board Functionality

Step 1: Download and Install

Computer

Smartphone/Tablet

  • Alpwise i-BLE App in iOS App Store or Google Play Store

Step 2: Program and Test FPGA

  1. Plug in DK-BLE-CEIT-ASSEM Development Board
  2. Ensure drivers install and jumpers are set properly
  3. Open GOWIN Programmer (Start → Gowin → Gowin Programmer)
  4. Scan for devices
  5. Click ‘Scan Device’ icon
  6. Select ‘GW1NRF-4B’ and click ‘OK’
  7. Set FPGA bitstream to program
  8. Double click the blank cell under ‘FS File’ for the GW1NRF device
  9. Access Mode: Embedded Flash Mode
  10. File name: (Navigate to GW1NRF4_FPGA_BLINK_1_21_2020.fs)
  11. Click Save
  12. Click ‘Program/Configure’ icon
  13. Observe blue LED blinking from successful FPGA programming

Step 3: Program BLE and MCU

  1. Start → Programs → Gowin Semiconductor → GW1NRF Config Editor.
  2. Select Driver: Jtag.
  3. Select ‘Read from Device’.
  4. File → Upload Patch.
  5. Navigate to ‘findme_MCU_GPIO7.emp’.
  6. Select Driver: Jtag.
  7. Destination: IRAM.
  8. Check boxes ‘Reset After Upload’ & ‘Check for Test Mode’.
  9. Click Upload; Red LED should turn on after upload.
    Program BLE

Step 4: Test BLE and MCU

  1. Open the Alpwise i-BLE App on your smartphone or tablet.
  2. Click ‘Play Bluetooth low energy’.
  3. Click ‘GW1NRF FindMe’ from the list of Bluetooth devices.
  4. Click the ‘Find Me’ Profile.
  5. Push ‘No Alert’ → Red LED on the board should turn off.
  6. Push ‘High Alert’ → Red LED on the board should turn on.
    Test BLE

Creating an GW1NRF MCU and FPGA Project

Step 1: Setup Synopsys Metaware Lite

1. Download and get license for Metaware Lite
https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi
2. Install Metaware Lite
3. Start → Programs → Gowin Semiconductor → ‘Setup Project Files’

Step 2: Setup Metaware Lite for GW1NRF4

  1. Start → Programs → Synopsys Inc → MetaWare Lite IDE P-2019.09-1
  2. Create an Eclipse workspace path and click ‘OK’
  3. Click ‘Create a New Workspace’
  4. Specify the following path: ‘C:\ProgramData\GW1NRFsdk’
  5. Click ‘OK’; Metaware Lite will reopen
  6. Run the scrip of the C:\ProgramData\GW1NRFsdk\sw\ide_project.bat’
  7. File → Import → General, Existing Projects
  8. Select Root Directory: ‘C:\ProgramData\GW1NRFsdk\sw’
  9. Click ‘Finish’

Note!

Metaware compiler version 11.8 in Metaware 2020.03 introduced new optimizations impacting functionality of GW1NRF SDK. On temporary basis, the workaround proposed is to modify include file “platform.h” in directory <libs/em_hw_api/includes>. The external reference to gPlatform_Config declaration should be changed:

From:
_extern const volatile Platform_Configuration_t gPlatformConfig;

To:
_extern volatile Platform_Configuration_t gPlatformConfig;

Step 3: Compile MCU C Code

  1. Navigate in Project Explorer to sw  projects  findme  findme.c
  2. On line 153 change the alert LED to GPIO 0 #define GPIO_FINDME_ALERT_LED ( 0 )
  3. Project  Build All (if there is any error run ‘clean’)

Note!

There is some path issue with the BLESW_EM9304FOTA path in the GW1NRF SoC SDK Install.

MCU and FPGA Connectivity
FPGA Connectivity

FPGA Constraint File 10 Name

| MCU 10 Name
---|---
p17|

GPIO 0

p18

| GPIO 1
p19|

GPIO 2

p20

| GPIO 3
p22|

GPIO 4

Step 4: Synthesize and Load FPGA Design

  1. Open GOWIN EDA

  2. Open the ‘fpga_led_blink’ project

  3. Observe led.v
    led.v creates a counter that controls an out ‘led’. The counter runs when input ‘enable’ is active high.

  4. Observe led.cst

  5. ‘enable’ is set to connect to p17, which is connected to MCU GPIO 0 based on the table in the previous slide

  6. ‘led’ is connected to package pin 8; this is connected to the blue led on the development board

  7. Clock the ‘Process’ tab in GOWIN EDA; right click on ‘Place & Route’ and select ‘Rerun All’

Resulting Design
Resulting Design

Now, we use Alpwise i-BLE App to control enable of a counter design in the FPGA. The enable turns the LED off or allows it to blink with the counter inside the FPGA.

Load and test MCU and FPGA designs

  1. Load FPGA file:

  2. *\GW1NRF_Getting_Started_v1\fpga_led_blink\impl\pnr\fpga_project.fs

  3. Same procedure as “Testing GW1NRF4 Development Board Functionality → Step 2: Program and Test FPGA”

  4. Load MCU elf file:

  5. C:\ProgramData\GW1NRFsdk\sw\projects\findme\findme.elf

  6. Same procedure as “Testing GW1NRF4 Development Board
    Functionality → Step 4: Test BLE and MCUStep 2: Program and Test FPGA”

  7. Test control of the FPGA led via BLE

  8. Run Alpwise i-BLE App

  9. Same procedure as “Testing GW1NRF4 Development Board Functionality → Step 4: Test BLE and MCUStep 2: Program and Test FPGA”

  10. led should be off or blinking based on the alert state in the Alpwise App.

Support and Feedback

Gowin Semiconductor provides customers with comprehensive technical support. If you have any questions, comments, or suggestions, please feel free to contact us directly by the following ways.
Website: www.gowinsemi.com
E-mail:[email protected]

Revision History

Date Version Description
4/3/2020 1.0E Initial version published.
11/10/2020 1.1E “Step 2: Setup Metaware Lite for GW1NRF4” in the section of

“Creating an GW1NRF MCU and FPGA Project” updated.
3/19/2021| 1.2E| The note information in the section of “Creating an GW1NRF MCU and FPGA Project” updated.

Copyright©2021 Guangdong Gowin Semiconductor Corporation. All Rights Reserved.

No part of this document may be reproduced or transmitted in any form or by any denotes, electronic, mechanical, photocopying, recording or otherwise, without the prior written consent of GOWINSEMI.

Disclaimer

GOWINSEMI® , LittleBee® , Arora, and the GOWINSEMI logos are trademarks of GOWINSEMI and are registered in China, the U.S. Patent and Trademark Office, and other countries. All other words and logos identified as trademarks or service marks are the property of their respective holders, as described at www.gowinsemi.com. GOWINSEMI assumes no liability and provides no warranty (either expressed or implied) and is not responsible for any damage incurred to your hardware, software, data, or property resulting from usage of the materials or intellectual property except as outlined in the GOWINSEMI Terms and Conditions of Sale. All information in this document should be treated as preliminary. GOWINSEMI may make changes to this document at any time without prior notice. Anyone relying on this documentation should contact GOWINSEMI for the current documentation and errata.

Logo

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

GOWIN User Manuals

Related Manuals