Get Started with K210: Hardware and Programming Environment

It is hard to have low power consumption, reasonable price and excellent performance at the same time for embedded processors.

Due to the limitation of physical laws:

Power consumption is proportional to performance.

Stronger performance means that more power will generate more heat; however, if you want to improve performance while ensuring that power consumption is constant or even lower, you can only improve the chip’s architecture or improve the process technology, which might bring increasing cost. Therefore, depending on the application direction, we can choose some hardware platforms that take into account both of power, price, and performance.

Low cost, low performance, low power consumption: such as STM32.
Low cost, high performance, but the process is not high and easy to heat: the representative is a variety of low-end SoC.
Strong performance, advanced process, but the price will be unfriendly: the representative is the various flagship SoCs used on smartphones today, such as Qualcomm and Huawei Kirin
Isn’t there a chip platform that satisfying three conditions above at the same time?

In fact, K210 barely counts as satisfying the above, which is why we want to introduce K210 to everyone. In this blog, we will introduce:

What is K210?
Now K210 based products available in the market
K210 programming environment

What is Kendryte K210?


The K210 is an MCU launched last year by Canaan. It features a self-developed neural network hardware accelerator KPU that can perform convolutional neural network operations with high performance.

K210 main parameters:
Is the performance of an MCU not comparable to that of a high-end SoC? At least in terms of AI computing, the computing power of the K210 is actually quite impressive. According to Jia Nan’s official description, the K210’s KPU has a power of 0.8TOPS.

The other parameters of the K210 are as follows:

CPU: RISC-V Dual Core 64bit, with FPU
Image Recognition: QVGA@60fps/VGA@30fps
Audio: Microphone array (8 mics)
Advanced encryption standard (AES) hardware accelerator
One time programmable (OTP) ROMSHA256
Power Consumption
Power consumption of typical application scenarios < 1W
Power consumption of chip < 300mW
NN Model: TinyYOLOv2 (after pruned)
DNN Framework: TensorFlow/Keras/Darknet

So what can K210 do?
It is hard to believe all features above could come from a single chip.

K210 performs perfectly in applications such as face detection, object recognition, video playback, sound field imaging, 3D rendering, and even playing FC simulators on it and so many else!
Well, the chip is really outstanding. Here are some of the K210 development boards that are available at Seeed and the market.

Programming environment:
The K210 supports several programming environments:

The most basic cmake command line development environment
IDE development environment
Python scripted development environment.
There are no advantages or disadvantages in these development methods. Some people like to use the command line +vim, some people like the IDE graphical interface, and some people don’t care about the compiler environment just want to write Python.
Generally speaking, the more basic development methods, such as the C language and the official library will bring the greater the degree of freedom so that the development method can fully play the various peripheral functions of the chip. However, the development is more difficult, the process is more tedious. The more top-level development methods, such as writing scripts, are very convenient, and even the process of downloading the program is not required, but the implementation of the program functions is extremely dependent on MicroPython API updates, and many advanced system functions are not available.

  1. Command line development environment
    The K210’s official SDK supports two development modes: FreeRTOS and Standalone. You can download SDK Programming Guide here.

  2. IDE development environment
    For people who want to develop under Windows, they can use the officially provided IDE, which is my most common open method.
    The official IDE is based on Visual Studio Code and is very easy to use. The main thing is to have code completion.

You can download IDE here.

Specially after we released Grove AI HAT based on K210, we released new software: ArduinoCore-k210. help uses run Arduino libraries on K210 based boards such as Grove AI HAT.

Please refer to our previous blog: 2019 RISC-V Based Development Boards Collection that introduced what we did and updatedin last 9 month about RISC-V.

Based on kendryte-standalone-sdk, we added the full ArduinoCore-API interface to support Arduino IDE, Linux, Windows, Mac OS X and other development environments. With the support of the ArduinoCore-k210, all k210-based development boards can run Grove Arduino Library and many excellent Arduino libraries in the community of Arduino.

Here’s how to use the ArduinoCore-k210:

1593529447726-2.mp4 (1.79 MB)

We have further optimized the user experience of the software, and we hope that beginners of the Arduino Uno/Arduino Zero will be able to get started with our hardware without complex learning process because the software we provide is the Arduino interface you are familiar with, however, the hardware is brand new, adding more playability and exploratory.