The RISC-V BL602 Book

📝 13 Jan 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. (43 articles and still growing!)

The programs in these articles have been tested on PineCone, but they should work on other BL602 and BL604 Boards: PineDio Stack (BL604), Pinenut, 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)

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 OS

For BL602 IoT SDK

For Rust

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.

GPIO on BL602

5 GPIO on BL602

Learn to call the BL602 / BL604 GPIO Hardware Abstraction Layer (HAL) (or NuttX) to blink an LED.

For Apache NuttX OS

For BL602 IoT SDK

PWM on BL602

6 PWM on BL602

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

For BL602 IoT SDK

I2C on BL602

7 I2C on BL602

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

For BL602 IoT SDK

SPI on BL602

8 SPI on BL602

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

For Apache NuttX OS

For BL602 IoT SDK

DMA on BL602

9 DMA on BL602

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

For BL602 IoT SDK

UART on BL602

10 UART on BL602

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

For BL602 IoT SDK

ADC on BL602

11 ADC on BL602

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

For Apache NuttX OS

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 BL602 IoT SDK

Multitasking BL602

14 Multitasking BL602

Multitasking the easy way with NimBLE Porting Layer.

For Apache NuttX OS

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 OS

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

Rust on BL602

16 Rust on BL602

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

For Apache NuttX OS

For BL602 IoT SDK

BASIC on BL602

17 BASIC on BL602

Running the NuttX BASIC Interpreter for BL602 and BL604.

For Apache NuttX OS

Lisp on BL602

18 Lisp on BL602

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

For BL602 IoT SDK

Machine Learning on BL602

19 Machine Learning on BL602

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

For BL602 IoT SDK

OpenOCD on BL602

20 OpenOCD on BL602

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

For BL602 IoT SDK

GDB and VSCode on BL602

21 GDB and VSCode on BL602

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

For BL602 IoT SDK

Troubleshooting BL602

22 Troubleshooting BL602

Tips for troubleshooting BL602 and BL604 firmware.

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.

PineDio Stack BL604

24 PineDio Stack BL604

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

For Apache NuttX OS

For BL602 IoT SDK

BL706 Audio Video Board

25 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

26 Mynewt on BL602

Incomplete port of Apache Mynewt operating system…

What’s Next

27 What’s Next

Check this book again for future updates…

  1. IoT Education with BL602 and BL604

  2. The Things Network on NuttX

About the Author

28 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