VIM3 Beginners Guide

VIM3

image

Front (Blue)

Component Purpose
1 USB-A USB 3.0 port that swaps to 2.0 when PCI-E is active, 900mA output
2 RJ-45 Gigabit LAN port that supports Wake-On-LAN
3 HDMI HDMI port supporting CEC
4 USB-C USB-C port with USB power delivery (5-20V input) and 2.0 speeds, can be used for upgrading the OS
5 USB-A USB 2.0 port that supports 500mA output
6 Fan Header 4-wire fan header utilising pulse width modulation
7 Reset Button Force reboot your VIM3 in the event of a system freeze
8 Function Button Press this 3 times in 2 seconds to enter MaskROM mode
9 Power Button This button turns on your VIM3
A M2 Hole M2 clearance holes for a case, or adding a heatsink
B G-Sensor 3-axis accelerometer
C RTC Header A header for connecting a real-time clock (button) battery
D 40-Pin GPIO General input/output pins for VIM3’s SoC, or plugging-in a Toneboard
E GPIO Expander Increases VIM3’s available I/O beyond what A311D can provide
F MCU STM8S003 micro-controller with programmable EEPROM
G WOL Switch Power switch activated via Wake-On-LAN
H Infrared Module 2-channel infrared receiver for the Khadas IR remote
I LEDs Indicator LEDs
J IPEX Antenna Wi-Fi and Bluetooth antenna connector
K IPEX Antenna Wi-Fi and Bluetooth antenna connector

Back (Red)

Component Purpose
1 VIN 5-12V power input, supports Power-Over-Ethernet via M2X Extension
2 Micro-SD Slot Molex Slot, spec version 2.x/3.x/4.x (SDSC/SDHC/SDXC)
3 Current Limit Switch Prevents damage to VIM3 due to faulty loading conditions
4 M.2 Slot PCIe 2.0 (x1 lane), supports M.2 2280 NVMe SSDs
5 TP 10-pin 0.5mm pitch FPC connector for touch input
6 MIPI-DSI 30-pin, 0.5mm pitch FPC connector for 4-lane 1080P displays
7 MIPI-CSI 30-pin, 0.5mm pitch, 4-lane, dual cameras, 8MP image signal processing
8 SPI Flash Flash memory module that interfaces over SPI
9 XPWR Pads Connect an external power switch using these pads
A M-Register Allows the EMMC to enter MaskROM mode
B S-Register Allows the SPI Flash to enter MaskROM mode
C Current Limit Switch Prevents damage to VIM3 due to faulty loading conditions

Buttons

Reset Function Power Purpose
x Force Reboot VIM3
x Enter Upgrade Mode (TST)
x Power ON/Wake Up VIM3
x x Enter Upgrade Mode (KEYS)
x x x Erase EMMC

Indicator LEDs

Colour Behaviour Meaning
Blue OFF Power source disconnected
Solid ON Power source connected, SBC turned off
White OFF SBC turned off
Solid ON SBC turned on
Red None None

The above behaviours are default out-of-the-box, and can be altered by a user. For example the white LED can be made to blink or breathe. For more information on how to program them via your favourite OS (each OS is different), please consult with experts at forum.khadas.com.

GPIO Pinout

SIGNAL PIN PIN SIGNAL
5V 1 21 GND
5V 2 22 I2C_M3_SCL
USB_DM 3 23 I2C_M3_SDA
USB_DP 4 24 GND
GND 5 25 I2C_AO_SCK
VCC_MCU 6 26 I2C_AO_SDA
MCU_NRST 7 27 3.3V
MCU_SWIM 8 28 GND
GND 9 29 I2SB_SCLK
ADC_CH0 10 30 I2S_MCLK0
1.8V 11 31 I2SB_SDO
ADC_CH3 12 32 I2SB_LRCK
SPDIF_OUT 13 33 I2SB_SDI
GND 14 34 GND
UARTC_RX 15 35 PWM_F
UARTC_TX 16 36 RTC_CLK
GND 17 37 GPIOH_4
Linux_RX 18 38 MCU_PA1
Linux_TX 19 39 GPIODZ_15
3.3V 20 40 GND

VIM3L

image

Front (Blue)

Component Purpose
1 USB-A USB 3.0 port that swaps to 2.0 when PCI-E is active, 900mA output
2 RJ-45 Gigabit LAN port that supports Wake-On-LAN
3 HDMI HDMI port supporting CEC
4 USB-C USB-C port with USB power delivery (5-20V input) and 2.0 speeds, can be used for upgrading the OS
5 USB-A USB 2.0 port that supports 500mA output
6 Fan Header 4-wire fan header utilising pulse width modulation
7 Reset Button Force reboot your VIM3L in the event of a system freeze
8 Function Button Press this 3 times in 2 seconds to enter MaskROM mode
9 Power Button This button turns on your VIM3L
A M2 Hole M2 clearance holes for a case, or adding a heatsink
B G-Sensor 3-axis accelerometer
C RTC Header A header for connecting a real-time clock (button) battery
D 40-Pin GPIO General input/output pins for VIM3L’s SoC, or plugging-in a Toneboard
E GPIO Expander Increases VIM3L’s available I/O beyond what S905D3 can provide
F MCU STM8S003 micro-controller with programmable EEPROM
G WOL Switch Power switch activated via Wake-On-LAN
H Infrared Module 2-channel infrared receiver for the Khadas IR remote
I LEDs Indicator LEDs
J IPEX Antenna Wi-Fi and Bluetooth antenna connector
K IPEX Antenna Wi-Fi and Bluetooth antenna connector

Back (Red)

Component Purpose
1 VIN 5-12V power input, supports Power-Over-Ethernet via M2X Extension
2 Micro-SD Slot Molex Slot, spec version 2.x/3.x/4.x (SDSC/SDHC/SDXC)
3 Current Limit Switch Prevents damage to VIM3L due to faulty loading conditions
4 M.2 Slot PCIe 2.0 (x1 lane), supports M.2 2280 NVMe SSDs
5 TP 10-pin 0.5mm pitch FPC connector for touch input
6 MIPI-DSI 30-pin, 0.5mm pitch FPC connector for 4-lane 1080P displays
7 MIPI-CSI 30-pin, 0.5mm pitch, 4-lane, single camera, no image signal processor
8 SPI Flash Flash memory module that interfaces over SPI
9 XPWR Pads Connect an external power switch using these pads
A M-Register Allows the EMMC to enter MaskROM mode
B S-Register Allows the SPI Flash to enter MaskROM mode
C Current Limit Switch Prevents damage to VIM3L due to faulty loading conditions

Buttons

Reset Function Power Purpose
x Force Reboot VIM3L
x Enter Upgrade Mode (TST)
x Power ON/Wake Up VIM3L
x x Enter Upgrade Mode (KEYS)
x x x Erase EMMC

Indicator LEDs

Colour Behaviour Meaning
Blue OFF Power source disconnected
Solid ON Power source connected, SBC turned off
White OFF SBC turned off
Solid ON SBC turned on
Red None None

The above behaviours are default out-of-the-box, and can be altered by a user. For example the white LED can be made to blink or breathe. For more information on how to program them via your favourite OS (each OS is different), please consult with experts at forum.khadas.com.

GPIO Pinout

SIGNAL PIN PIN SIGNAL
5V 1 21 GND
5V 2 22 I2C_M3_SCL
USB_DM 3 23 I2C_M3_SDA
USB_DP 4 24 GND
GND 5 25 I2C_AO_SCK
VCC_MCU 6 26 I2C_AO_SDA
MCU_NRST 7 27 3.3V
MCU_SWIM 8 28 GND
GND 9 29 I2SB_SCLK
ADC_CH0 10 30 I2S_MCLK0
1.8V 11 31 I2SB_SDO
ADC_CH3 12 32 I2SB_LRCK
SPDIF_OUT 13 33 I2SB_SDI
GND 14 34 GND
UARTC_RX 15 35 PWM_F
UARTC_TX 16 36 RTC_CLK
GND 17 37 GPIOH_4
Linux_RX 18 38 MCU_PA1
Linux_TX 19 39 GPIODZ_15
3.3V 20 40 GND

Krescue (Khadas-Rescue-OS)

image

Krescue is an extremely small (21mb) operating system that you can boot directly from a micro-SD card or your EMMC. It is a “Swiss Army knife”, and you can use it to perform a variety of low-level SBC maintenance tasks. Most notable of which are backing-up your EMMC by dumping a raw-compressed .img.gz, and rapidly installing a new OS via flashing a .img.gz back into the EMMC. As of January 2020, Krescue can download and install OS images directly from the web via wired Ethernet.

Main Features:

  • Backup EMMC memory contents to an SD card, USB, LAN host.
  • Restore .img.gz into an EMMC on another device.
  • Online OS installation via Ethernet.
  • View device information.
  • Rescue shell for expert users.
  • Shell access via UART, USB network, and LAN network.

Steps to Boot Krescue:

  1. Download an appropriate image for VIM3/3L from dl.khadas.com
  2. Burn this image to a micro-SD card, using Rufus, dd (Linux) or Etcher.
  3. Plug in the micro-SD card, USB-C power, and HDMI into your VIM3/3L device.
  4. Boot your VIM3/3L device into MaskROM mode (please read!!!).
  5. Use an IR remote control or USB keyboard to navigate the UI menus.

Online Installation via Shell Command:

Online Help:

  • curl -sfL dl.khadas.com/.mega | sh -s - –help
  • wget -O- dl.khadas.com/.mega | sh -s - –help

Write Krescue directly to EMMC via the web:

  • curl -sfL dl.khadas.com/.mega | sh -s - VIM1 > /dev/mmcblk?
  • curl -sfL dl.khadas.com/.mega | sh -s - VIM2 > /dev/mmcblk?
  • curl -sfL dl.khadas.com/.mega | sh -s - VIM3 > /dev/mmcblk?
  • curl -sfL dl.khadas.com/.mega | sh -s - VIM3L > /dev/mmcblk?

More shell commands and examples:

Learn More:

Amlogic A311D, NPU Usage Guides

These following documentation links will help you get started with your VIM3’s 5.0 TOPS neural processing unit.

  1. How to Use NPU
  2. Install Darknet
  3. Train Yolo
  4. Transform Yolo
  5. Train Inception

Learn More:

Booting 3rd-Party ROMs from Micro SD-Card

These items are useful when you want to boot your VIM3 from an SD-Card, to run 3rd-party ROMs such as LibreELEC.

  1. 8GB or larger, Micro SD-card.
  2. Computer with USB and/or a Micro SD-card reader.

Steps to boot your VIM3 from a Micro SD-card:

  1. Insert your 8GB or larger Micro SD-card into your computer.
  2. Flash the ROM file (.img) to your Micro SD-card, using Etcher.
  3. Make sure you select the correct VIM3 .dtb file (follow instructions specific to the ROM!).
  4. Ensure that your VIM3 has Android 9.0 installed, and is connected to a power adapter (not PC!).
  5. Insert the SD-card into your VIM3, and power it on.
  6. Use keys-mode to enter upgrade mode.
  7. If you have done all the above steps correctly, your VIM3 will boot from the Micro SD-card.

Learn More:

Tips:

  • EMMC image should be burned directly to the eMMC using a USB-C data cable, from a Ubuntu or Windows Host. It must not be burned into an SD-Card. For Example: Android and Ubuntu distributions Containing the EMMC mark.
  • SD/USB image should be copied into an SD-Card, before that card is then used to reformat the eMMC storage with a new OS. For Example: Armbian, Ubuntu distributions containing to SD_USB mark, as well as LibreELEC and CoreELEC.
  • In order to bootup from SD/USB images, you need Android or Ubuntu running on your eMMC with Multi-Boot activated.

Flashing eMMC Operating System Using USB-C Cable

You’ll need these items if you want to use your laptop or desktop PC to upgrade your VIM3 SBC’s operating system stored in the eMMC storage. For example, Changing the bootup operating system from Android to Ubuntu, or installing a more exotic 3rd-party OS.

  1. USB to USB-C Cable (Older Computers)
  2. USB-C Male-to-Male Cable (Current Computers)
  3. Computer running Linux or Windows.

Learn More:

Firmware Images:

VIM3 Power Supply

Although your VIM3 SBC is compatible with various types of power supplies, these are the recommended specs for the best performance-output and stability.

  1. USB-C 24W Adapter
  2. USB-C Male-to-Male Cable

Learn More:

Displays & User Input

These items are useful when you need to connect your VIM3 SBC to an external display + keyBoard mouse + remote control, for use as a desktop computer or media center.

  1. 4K HDMI 2.0 Cable
  2. HDMI-Compatible 1080P/4K Monitor
  3. Wireless USB KeyBoard + Mouse
  4. CEC-Compatible Remote Control

Note: Please do not attach multiple cables with large heads that interfere with each other, as that may bend or twist the connectors, and this will cause intermittent connectivity issues after some time.

Learn More:

Watching Movies, Expanding Internal eMMC Storage

These items are useful if you wish to use your VIM3 SBC as a media center, for storing/downloading large movie files. A microSDXC UHS-I card is expensive, but its also fast enough for 4K video playback. In addition, you can connect external USB-2.0/3.0 SSDs or HDDs for storage that can encompass your entire media library.

  1. 64GB or larger, USB-2.0/3.0 HDD/SSD
  2. 64GB or larger, microSDXC UHS-I SD-Card

Learn More:

Tip: Nowadays most people stream their media , see How To Install LibreELEC.

Software Development / Advanced Crash Recovery

Extreme cases of crash-recovery will require you to use either the Khadas TST (VIM3), or the MRegister to reset your VIM3 SBC. A USB Serial Debug Tool is also useful for developers debugging complex software issues.

  1. Your fingers (for resetting a dead SBC via Khadas-TST, VIM3 only)
  2. Conductive Metal Tweezers (for resetting a dead SBC via MRegister)
  3. USB Serial Debug Tool(For diagnosing software/hardware issues)

Learn More:

VIM3 Website

For more information, please see our website, read more decumentation, or visit our forum.