Skip to content

ianmcb/bl_iot_sdk

 
 

Repository files navigation

BL602 SDK (Pine64 version)

Join us on Discord, Telegram, Matrix

This repository contains the Pine64 fork of Bouffalo Lab's SDK for their BL602 Wi-Fi/BLE Combo RISC-V SoC. The upstream documentation lives in docs/html.

This repository is the central focus of Pine64's Nutcracker Challenge.

Quick Start

In order to build one of the sample apps, you need to set a few environment variables:

export BL60X_SDK_PATH=/path/to/this/repo
export CONFIG_CHIP_NAME=bl602

Then go to the sample directory of interest and call make, for example:

cd customer_app/bl602_boot2
make

Call

make CONFIG_TOOLPREFIX=riscv64-linux-gnu-

for bypassing the bundled cross-compiler and using your distribution's own cross-compiler.

There is a linker script (written in python) at image_conf/flash_build.py. To run this, you need to specify the application and the target, for example:

python3 flash_build.py bl602_boot2 bl602

Hardware

BL602 is a 32-bit RISC-V based combo chipset supporting Wi-Fi and BLE (Bluetooth Low Energy). The chip is made by Nanjing-based Bouffalo Lab for ultra-low-power applications. In terms of price range and feature set, the chip is competing against Espressif ESP8266

  • BL602/604 Datasheet (34 pages): Includes pinout, memory map, and general peripheral descriptions but no detailed functional specification or register listings. Sipeed, a board vendor that plans to use the BL602, claims that full register documentation will be available sometime in November 2020.
  • soc602_reg.svd: Contains a seemingly-complete register listing, with names but no descriptions, for the BL602.
  • Hardware Notes: Additional information gathered from this repository and elsewhere on the internet.

Comparison with ESP8266

  Bouffalo Lab BL602 Espressif ESP8266
Architecture

32-bit RISC-V

@192MHz (dynamic @1-192MHz)

L1 cache

FPU

32-bit Xtensa

@80MHz (and 160MHz)

Memory

276KB SRAM

128KB ROM

1 Kb eFuse

optional embdedded flash

XIP QSPI flash support

32 KiB instruction RAM

32 KiB instruction cache RAM

80 KiB user-data RAM

16 KiB ETS system-data RAM

No programmable ROM

QSPI flash support (up to 16 MB)

Wi-Fi

802.11 b/g/n @2.4GHz

WPS/WEP/WPA/WPA2/WPA3

802.11 b/g/n @2.4GHz

WEP/WPA/WPA2

Bluetooth LE 5.0 NONE
GPIO x16 x16
SDIO x1 2.0 slave x1 v2.0 slave
SPI x1 x2
UART x2 x1.5 (One Tx only)
I2C x1 x1 (software implemented)
I2S NONE x1 (with DMA)
PWM channels x5 x4
ADC 12-bit 10-bit (SAR)
DAC 10-bit NONE
Analog Comparator x2 NONE
DMA x4 with I2S
Timer

RTC (up to 1 year)

x2 32-bit general-purpose

x1 hardware

x1 software

(no interrupt gen. on sw. timer)

IR Remote Control x1 x1
Debug JTAG support ?

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.5%
  • C++ 1.8%
  • Makefile 1.0%
  • Python 0.8%
  • CMake 0.6%
  • Assembly 0.2%
  • Other 0.1%