The RISC-V BL602 Book

📝 24 Sep 2022

PineCone BL602 RISC-V Board with Grove E-Ink Display

PineCone BL602 RISC-V Board with Grove E-Ink Display

Is there a book about the BL602 / BL604 SoC (RISC-V, WiFi and Bluetooth LE) that…

  1. Explains in depth the features of BL602 and BL604

  2. Has plenty of annotated sample code, with real use cases

  3. Is open source, free to browse and reproduce?

You’re reading the book right now!

Use this book to navigate the numerous BL602 / BL604 articles that have been published on this site. (66 articles and still growing!)

The programs in these articles have been tested on PineDio Stack BL604 and PineCone BL602, but they should work on other BL602 and BL604 Boards: Pinenut BL602, DT-BL10, MagicHome BL602.

Many thanks to Pine64 for supporting my work on BL602 Open Source Education! Thanks also to Bouffalo Lab for the encouraging notes.

If you find this book useful… please sponsor me a coffee. Thank you! 🙏 😀

Introduction to BL602

1 Introduction to BL602

Find out what’s inside the BL602 / BL604 System-on-a-Chip (SoC)… And why it’s unique among the microcontrollers we’ve seen.

NuttX on BL602

2 NuttX on BL602

Apache NuttX is a portable, embedded operating system that’s officially supported on BL602 and BL604. (Alternative to FreeRTOS and BL602 IoT SDK)

More NuttX articles in the following sections…

Projects and Libraries on BL602

3 Projects and Libraries on BL602

How to create a simple Blinky Project for BL602 / BL604 and build the project.

For Apache NuttX RTOS

For BL602 IoT SDK

Flashing Firmware to BL602

4 Flashing Firmware to BL602

How we flash firmware to BL602 and BL604 with command-line tools on Linux, macOS and Windows.

For BL602 IoT SDK

GPIO on BL602

5 GPIO on BL602

Learn to call the BL602 / BL604 GPIO Functions to blink an LED.

For Apache NuttX RTOS

For BL602 IoT SDK

SPI on BL602

6 SPI on BL602

How we call the BL602 / BL604 SPI Functions to access SPI Sensors, Displays and Network Transceivers.

For Apache NuttX RTOS

For BL602 IoT SDK

I2C on BL602

7 I2C on BL602

Read an I2C Sensor by calling the BL602 / BL604 I2C Functions.

For Apache NuttX RTOS

For BL602 IoT SDK

UART on BL602

8 UART on BL602

UART is used by Air Quality Sensors, E-Ink Displays, GPS Receivers and LoRa Transceivers. To talk to these peripherals, we call the BL602 / BL604 UART Functions.

For Apache NuttX RTOS

For BL602 IoT SDK

ADC on BL602

9 ADC on BL602

How we read Analog Inputs with ADC on BL602 and BL604.

For Apache NuttX RTOS

For BL602 IoT SDK

PWM on BL602

10 PWM on BL602

Duty Cycle, Frequency and everything else about the BL602 / BL604 PWM Functions.

For BL602 IoT SDK

DMA on BL602

11 DMA on BL602

How we accelerate data transfers with DMA on BL602 and BL604.

For BL602 IoT SDK

WiFi on BL602

12 WiFi on BL602

What happens inside the WiFi Driver on BL602 and BL604.

For BL602 IoT SDK

Graphics on BL602

13 Graphics on BL602

Render text and graphics with the open-source LVGL Library.

For Apache NuttX RTOS

For BL602 IoT SDK

Multitasking BL602

14 Multitasking BL602

Multitasking the easy way with NimBLE Porting Layer.

For Apache NuttX RTOS

For BL602 IoT SDK

LoRa on BL602

15 LoRa on BL602

Let’s turn BL602 and BL604 into a real IoT gadget that transmits long range, low power LoRa packets

For Apache NuttX RTOS

For BL602 IoT SDK

Connecting BL602 and BL604 to a LoRa Gateway

Transmitting Sensor Data on BL602 and BL604

Monitoring BL602 and BL604 with Prometheus, Grafana and Roblox

PineDio USB uses the same LoRa SX1262 Driver as BL602 and BL604

Below are the older articles for LoRa SX1276 Transceiver

Zig on BL602

16 Zig on BL602

How we code BL602 and BL604 firmware with Zig programming language.

For Apache NuttX RTOS

Rust on BL602

17 Rust on BL602

How we code BL602 and BL604 firmware the safer, simpler way with Rust.

For Apache NuttX RTOS

For BL602 IoT SDK

BASIC on BL602

18 BASIC on BL602

Running the NuttX BASIC Interpreter for BL602 and BL604.

For Apache NuttX RTOS

Lisp on BL602

19 Lisp on BL602

Porting the uLisp Interpreter to BL602 / BL604… And writing graphical programs with Blockly (Scratch).

For BL602 IoT SDK

Visual Programming on BL602

20 Visual Programming on BL602

Let’s code BL602 and BL604 the drag-and-drop way, with Blockly.

For Apache NuttX RTOS

For BL602 IoT SDK

Machine Learning on BL602

21 Machine Learning on BL602

How we run TensorFlow Lite on BL602 and BL604 to create a Glowing LED.

For BL602 IoT SDK

Troubleshooting BL602

22 Troubleshooting BL602

Tips for troubleshooting BL602 and BL604 firmware.

For Apache NuttX RTOS

For BL602 IoT SDK

Bootloader for BL602

23 Bootloader for BL602

All about the BL602 / BL604 Bootloader… And how it loads the Application Firmware into XIP Flash Memory.

OpenOCD on BL602

24 OpenOCD on BL602

Before debugging BL602 / BL604, we install OpenOCD to connect a JTAG Debugger.

For BL602 IoT SDK

GDB and VSCode on BL602

25 GDB and VSCode on BL602

How we debug BL602 / BL604 firmware with GDB and VSCode.

For BL602 IoT SDK

PineDio Stack BL604

26 PineDio Stack BL604

Sneak preview of the new PineDio Stack BL604 with ST7789 Display and onboard LoRa SX1262 Transceiver.

For Apache NuttX RTOS

For BL602 IoT SDK

BL706 Audio Video Board

27 BL706 Audio Video Board

What’s inside the Bouffalo Lab RISC-V BL706 Audio Video Board… And how it differs from BL602 / BL604.

Mynewt on BL602

28 Mynewt on BL602

Incomplete port of Apache Mynewt operating system…

What’s Next

29 What’s Next

Check this book again for future updates…

About the Author

30 About the Author

Got a question, comment or suggestion? Create an Issue or submit a Pull Request here…

lupyuen.github.io/src/book.md

PineCone BL602 RISC-V Board with Grove E-Ink Display

PineCone BL602 RISC-V Board with Grove E-Ink Display