The RISC-V BL602 Book

📝 16 Jul 2021

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. (23 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.

Flashing Firmware to BL602

2 Flashing Firmware to BL602

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

Projects and Libraries on BL602

3 Projects and Libraries on BL602

How to create a simple Blinky Project for BL602 and BL604.

GPIO on BL602

4 GPIO on BL602

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

PWM on BL602

5 PWM on BL602

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

I2C on BL602

6 I2C on BL602

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

SPI on BL602

7 SPI on BL602

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

DMA on BL602

8 DMA on BL602

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

UART on BL602

9 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.

ADC on BL602

10 ADC on BL602

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

WiFi on BL602

11 WiFi on BL602

What happens inside the WiFi Driver on BL602 and BL604.

Graphics on BL602

12 Graphics on BL602

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

LoRa on BL602

13 LoRa on BL602

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

OpenOCD on BL602

14 OpenOCD on BL602

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

GDB and VSCode on BL602

15 GDB and VSCode on BL602

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

Rust on BL602

16 Rust on BL602

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

Lisp on BL602

17 Lisp on BL602

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

Machine Learning on BL602

18 Machine Learning on BL602

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

Mynewt on BL602

19 Mynewt and NuttX on BL602

Will BL602 and BL604 run without FreeRTOS? Study the ongoing port of Apache Mynewt and NuttX operating systems to BL602 / BL604.

Troubleshooting BL602

20 Troubleshooting BL602

Tips for troubleshooting BL602 and BL604 firmware.

Multitasking BL602

21 Multitasking BL602

Multitasking the easy way with NimBLE Porting Layer.

Bootloader for BL602

22 Bootloader for BL602

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

BL706 Audio Video Board

23 BL706 Audio Video Board

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

What’s Next

24 What’s Next

Check this book again for future updates…

  1. IoT Education with BL602 and BL604

  2. PineDio Stack BL604 with LoRa SX1262 (See this)

  3. Rust Wrapper for BL602 / BL604 IoT SDK (See this)

    (Documentation)

    (See the Twitter Thread)

About the Author

25 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