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.8TFLOPS. For comparison, the NVIDIA Jetson Nano with 128 CUDA unit GPUs has a power of 0.47TFLOPS; the latest Raspberry Pi 4 has less than 0.1TFLOPS.
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 of typical application scenarios < 1W
- Power consumption of chip < 300mW
- OS: FreeRTOS
- NN Model: TinyYOLOv2 (after pruned)
- DNN Framework: TensorFlow/Keras/Darknet
- Peripherals FPIOA/UART/GPIO/SPI/I²C/I²S/WDT/TIMER/RTC, etc.
So what can K210 do?
It is hard to believe all features above could come from a single chip.
K210 performs perfectly in the 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.
1. KD2333 – Dual-Core RISC-V SoC Designed for AI Applications
Kendryte KD233 board is another RISC-V development board, based on Kendryte K210 dual core 64-bit RISC-V processor designed for machine vision and “machine hearing”
Based on MAIX Module, the Maixduino is a RISC-V 64 development board for AI + IoT applications. Different with other Sipeed MAIX dev. boards, Maixduino was designed in an Arduino Uno form factor, with ESP32 module on board together with MAIX AI module.
Maixduino supports the following platforms:
MAIX isn’t just a hardware solution, it combines custom hardware, open software, and state-of-the-art AI algorithms. Different kinds of dev. boards, kits, peripherals as well as wide compatibility enable rapid and agile prototype development, make AIoT projects much easier. And thanks to MAIX’ s performance, small footprint, low power, and low cost, it enables the broad deployment of high-quality Edge AI.
3. $18.9 Sipeed M1 dock suit ( M1 dock + 2.4 inch LCD + OV2640 ) K210 Dev. Board 1st RV64 AI board for Edge Computing
Sipeed M1 uses the same module as Maixduino, MAIX Module.
Inherit the advantage of K210’s small footprint, Sipeed MAIX-I module, or called M1, integrate K210, 3-channel DC-DC power, 8MB/16MB/128MB Flash (M1w module add wifi chip esp8285 on it) into Square Inch Module. All usable IO breaks out as 1.27mm(50mil) pins, and pin’s voltage is selectable from 3.3V and 1.8V.
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.
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:
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.
3) MicroPython development environment
The two development environments described above are all about writing code, then compiling and downloading. In the environment of MicroPython, you only need to download the firmware once, then you can use the serial port to interact with Python, or you can put the script in the SD card and boot it.
This scripted interactive firmware is based on an open-source project called MicroPython.
What is MicroPython?
MicroPython is a streamlined and efficient implementation of the Python 3 programming language, including a small portion of the Python standard library, mainly running on embedded chips with limited performance and memory (such as STM32).
Noted that Micropython does not include all the syntax of Python3.
MaixPy is a project to port Micropython to the K210. It supports MCU regular operations and integrates modules such as machine vision and microphone arrays to quickly develop smart applications especially AI projects
You can find MaixPy on GitHub.
Hope this blog will help you quickly learn chip architecture, development board selection, and software development environment of K210 and choose the best dev board to get started with your next project!