メインコンテンツにスキップ

Duo256M

Document Pictures

The Milk-V Duo 256M is an upgraded version of Duo with a memory boost to 256M, catering to applications demanding larger memory capacities. It features the SG2002 computing series chip, elevating computational power to 1.0TOPS@INT8. It enables seamless switching between RISC-V/ARM architectures and supports simultaneous operation of dual systems. Additionally, it includes an array of rich GPIO interfaces such as SPI, UART, suitable for a wide range of hardware development in edge intelligent monitoring, including IP cameras, smart peephole locks, visual doorbells, and more.

Introduction of SG2002

SG2002 is a high-performance, low-power chip designed for various product fields such as edge intelligent surveillance IP cameras, smart door locks, visual doorbells, and home intelligence. It integrates H.264 video compression and decoding, H.265 video compression encoding, and ISP capabilities. It supports multiple image enhancement and correction algorithms such as HDR wide dynamic range, 3D noise reduction, defogging, and lens distortion correction, providing customers with professional-grade video image quality.

The chip also incorporates a self-developed TPU, delivering 1.0 TOPS of computing power under 8-bit integer operations. The specially designed TPU scheduling engine efficiently provides high-bandwidth data flow for all tensor processing unit cores. Additionally, it offers users a powerful deep learning model compiler and software SDK development kit. Leading deep learning frameworks like Caffe and Tensorflow can be easily ported to its platform. Furthermore, it includes security boot, secure updates, and encryption, providing a series of security solutions from development, mass production, to product applications.

The chip integrates an 8-bit MCU subsystem, replacing the typical external MCU to achieve cost-saving and power efficiency goals.

SG2002 Public Preliminary Datasheet

We have open sourced the Public Preliminary Datasheet and TRM of SG2002 to GitHub. please check it out.

Buy the SG2002 Chips

Milk-V is the Authorised Global Distributor of the SG2002 chips. You can buy samples of the SG2002 chip from our distributor online store directly. For volume order, please contact Milk-V Sales Team for the qoutation.

Getting Started

Installing the system

Please refer to the Start Up section.

USB Network Usage

Please refer to the Setup section.

Duo256M GPIO Pinout

Document Pictures

GPIO pin mapping

GROUPADDRPORTCHIPNUMNAMESTART
gpio0gpio@03020000portagpiochip0480-511XGPIOA480 - XGPIOA[0]
gpio1gpio@03021000portbgpiochip1448-479XGPIOB448 - XGPIOB[0]
gpio2gpio@03022000portcgpiochip2416-447XGPIOC416 - XGPIOC[0]
gpio3gpio@03023000portdgpiochip3384-415
gpio4gpio@05021000portegpiochip4352-383PWR_GPIO352 - PWR_GPIO[0]

GPIO Pinout

JTAGSPISPI-NORSDPWMI2CUARTNUMSG2002NAMEPINPINNAMESG2002NUMADCSPI-NORSPI-NANDEMMC
JTAG_TDIUART1/2_TX508XGPIOA[28]GP0
1
40
VBUS(5V)
JTAG_TDOUART1/2_RX509XGPIOA[29]GP1
2
39
VSYS(5V)
GND
3
38
GND
JTAG_TMSPWM7UART1_TX499XGPIOA[19]GP2
4
37
3V3_EN
JTAG_TCKPWM6UART1_RX498XGPIOA[18]GP3
5
36
3V3(OUT)
NOR1_HOLDSD1_D2PWM5I2C1_SCLUART2/3_TX371PWR_GPIO[19]GP4
6
35
Boot-Switch
NOR1_WPSD1_D1PWM6I2C1_SDAUART2/3_RX372PWR_GPIO[20]GP5
7
34
Audio-Out
GND
8
33
GND
SPI2_SCKNOR1_SCKSD1_CLKPWM9I2C3_SDA375PWR_GPIO[23]GP6
9
32
GP27XGPIOB[6]454
SPI2_SDONOR1_MOSISD1_CMDPWM8I2C3_SCL374PWR_GPIO[22]GP7
10
31
GP26XGPIOB[3]451ADC1(1.8V)
SPI2_SDINOR1_MISOSD1_D0PMW7I2C1_SDAUART3_RTS373PWR_GPIO[21]GP8
11
30
RUN
SPI2_CSNOR1_CSSD1_D3PWM4I2C1_SCLUART3_CTS370PWR_GPIO[18]GP9
12
29
GP22PWR_GPIO[4]356
GND
13
28
GND
PWM10I2C2_SDA430XGPIOC[14]GP10
14
27
GP21XGPIOA[26]506NOR_HOLDNAND_HOLDEMMC_DAT2
PWM11I2C2_SCL431XGPIOC[15]GP11
15
26
GP20XGPIOA[27]507NOR_WPNAND_WPEMMC_DAT3
PWM4UART0/1_TX496XGPIOA[16]GP12
16
25
GP19XGPIOA[25]505NOR_MOSINAND_MOSIEMMC_DAT0
PWM5UART0/1_RX497XGPIOA[17]GP13
17
24
GP18XGPIOA[22]502NOR_SCKNAND_SCKEMMC_CLK
GND
18
23
GND
494XGPIOA[14]GP14
19
22
GP17XGPIOA[24]504NOR_CSNAND_CSEMMC_DAT1
495XGPIOA[15]GP15
20
21
GP16XGPIOA[23]503NOR_MISONAND_MISOEMMC_CMD
 
354PWR_GPIO[2]
LED

The logic level of GP26 and GP27 pins is 1.8V, and the logic level of other GPIO pins is 3.3V logic level.

Camera interface

Duo256M camera uses a 16-pin connector with a distance of 0.5 mm, which can be directly used with the CAM-GC2083 camera head.

Connector FPC Definition

Document Pictures
J1Description
1GND
2MIPI0_DN0
3MIPI0_DP0
4GND
5MIPI0_DN1
6MIPI0_DP1
7GND
8MIPI0_CKN
9MIPI0_CKP
10GND
11SENSOR_RSTN (1.8V)
12SENSOR_CLK (1.8V)
13I2C2_SCL (1.8V)
14I2C2_SDA (1.8V)
15
163V3

Duo256M User Guide

UART Serial Console

Duo256M has a reserved UART debug serial port, which can be used to view the system startup log, or to log in to the console after the system starts and execute some terminal commands.

USB-TTL Serial Cable

The serial port level of Duo series is 3.3V.

The pin definitions of common USB to TTL serial cables are as follows:

Document Pictures

Connection

Connect the USB to TTL serial cable as shown below, leaving the red wire unconnected.

Milk-V Duo256M<--->USB to TTL
TX (pin 16)<--->White wire
RX (pin 17)<--->Green wire
GND (pin 18)<--->Black wire
Document Pictures

The default serial port parameters of Duo256M are as follows:

baudrate: 115200
data bit: 8
stop bit: 1
parity : none
flow control: none

RISC-V and ARM switching

The large core of Duo256M can choose to use RISC-V or ARM processor. The RISC-V core is used by default. You can switch to the ARM core by shorting physical pin 35 (Boot-Switch) and GND. If you find that Duo256M cannot start normally during use, please first check whether the core currently used is consistent with the firmware used.

Document Pictures

If the debug serial port is connected, you can see in the first line of the boot log that starting with C means starting from the RISC-V core, and starting with B means starting from the ARM core.

  • RISC-V:
    C.SCS/0/0.C.SCS/0/0.WD.URPL.USBI.USBW
  • ARM:
    B.SCS/0/0.WD.URPL.B.SCS/0/0.WD.URPL.USBI.USBW

Hardware Docs

Others

https://github.com/milkv-duo/duo-files/tree/main/duo-256M