CS110/CS110P Lab 10

IMPORTANT: Read the FAQ from @168 before posting on Piazza!

Your Tasks

 Registered in CS110PNot Registered in CS110P
Registered in CS110Complete this labComplete this lab
Not Registered in CS110Complete this lab to get Longan Nano board, but this lab is UNSCORED for you.At your convenience

Objective of this lab

  1. Install software and driver (Windows Only) to download provided firmware into the Longan Nano.
  2. Get a Longan Nano board from TA.
  3. Check if the Longan Nano board and its peripheral is working.

Task 1: Install Necessary Software (Windows Version)

Overview

Our Longan Nano board uses DFU protocol to receive firmware from PC. Therefore, you need to first install the DFU tool, then download the firmware into Longan Nano.

Install DFU Tool

Download and install the Longan development kit for CA1 from here (Link valid until June 20, 2025). The downloaded compressed archive contains installation guide (readme.md).

Inflate longan-dev-kit-ca1-windows-version-20250403.7z, follow steps 5 and 6 in readme.md to install DFU driver AND DFU tool.

Note: there is a chance that your computer crushes into bluescreen when the Longan Nano enters DFU mode. See Piazza post @168 for more detail.

Note: the default filter for the DFU tool selects .hex files instead of .bin. If you cannot see .bin files, this is the most likely cause.

Check Procedure

None.

Task 1: Install Necessary Software (Linux Version)

Overview

Our Longan Nano board uses DFU protocol to receive firmware from PC. Therefore, you need to use dfu-util we provided to download the firmware into Longan Nano. Just place this file into anywhere and it should be fine. You do not need to install other software.

Note: You may need to give the dfu-util execution permission.

For users with Intel/AMD CPU, download dfu-util from here. For M1 Mac users, refer to @165.

Check Procedure

None.

Task 2: Download Sample Firmware to Longan Nano (Windows Version)

Longan Nano Basics

Refer to Sipeed Official Website for Longan Nano Basics.

Download Sample Firmware

Download the sample firmware from here.

Enter DFU mode (on Longan Nano)

  1. Hold BOOT0 button (and do not release)
  2. Hold RESET button (and do not release)
  3. Release RESET button
  4. Release BOOT0 button

Note: The temporal ordering of pressing and releasing buttons is of vital importance on entering DFU mode. Therefore, if the attempt of entering DFU fails, please first try repeating the above procedure before posting on Piazza.

Download (write) to device (on PC):

On Windows: use GD32 MCU Dfu Tool_v3.8.1.5784 we provided.

Workflow Completion Self-Check

The following steps will guide you perform a self-check on the above steps.

Press RESET. You should see TEST (25s) and a circle on the screen. The color of TEST (25s) should be white.

Then push joystick up, down, left, right, and towards the middle. You should see blue character U, D, L, R, and C respectively. When D appears, the color of TEST should be green.

After that, press the the two buttons on the left side. You should see SW1 and SW2 respectively.

If all of the above steps succeed, then the your Longan Nano is functional for all Longan Nano part of CS110/CS110P.

Check Procedure

(1 Point) Show TA that your Longan Nano is functional and sign your name on TA's table as acknowledge receipt for the Longan Nano.

Task 2: Download Sample Firmware to Longan Nano (Linux Version)

Longan Nano Basics

Refer to Sipeed Official Website for Longan Nano Basics.

Our Longan Nano board uses DFU protocol to receive firmware from PC. Therefore, you need to use dfu-util we provided to download the firmware into Longan Nano.

Download Sample Firmware

Download the sample firmware from here.

Enter DFU mode (on Longan Nano)

  1. Hold BOOT0 button (and do not release)
  2. Hold RESET button (and do not release)
  3. Release RESET button
  4. Release BOOT0 button

Note: The temporal ordering of pressing and releasing buttons is of vital importance on entering DFU mode. Therefore, if the attempt of entering DFU fails, please first try repeating the above procedure before posting on Piazza.

Download (write) to device (on PC):

On Linux: use dfu-util we provided.

Note: If dfu-util cannot find your board, consider Piazza post @164.

Workflow Completion Self-Check

The following steps will guide you perform a self-check on the above steps.

Press RESET. You should see TEST (25s) and a circle on the screen. The color of TEST (25s) should be white.

Then push joystick up, down, left, right, and towards the middle. You should see blue character U, D, L, R, and C respectively. When D appears, the color of TEST should be green.

After that, press the the two buttons on the left side. You should see SW1 and SW2 respectively.

If all of the above steps succeed, then the your Longan Nano is functional for all Longan Nano part of CS110/CS110P.

Check Procedure

(1 Point) Show TA that your Longan Nano is functional and sign your name on TA's table as acknowledge receipt for the Longan Nano.

When to Return Your Longan Nano

Refer to the table to lookup your schedule to return your Longan Nano.

 Registered in CS110PNot Registered in CS110P
Registered in CS110After completing Project 4After completing Lab 11
Not Registered in CS110After completing Project 4No later than week 15

Author: Songhui Cao <caosh2022>