Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:development:kbi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:development:kbi [2022/08/08 07:07]
ruby [Introduction]
products:sbc:common:development:kbi [2022/08/18 02:16] (current)
hyphop
Line 1: Line 1:
 ====== KBI - Khadas Bootloader Instructions ====== ====== KBI - Khadas Bootloader Instructions ======
- 
-===== Introduction ===== 
  
 This page introduces about KBI. You will learn how to manage the status of Khadas SBC through KBI. This page introduces about KBI. You will learn how to manage the status of Khadas SBC through KBI.
  
 <WRAP important > <WRAP important >
-KBI is an abbreviation for Khadas Bootloader Instructions, which aims to fulfill the following purposes:+Khadas Bootloader Instructions(KBI) can be used to:
   * Manage the programmable MCU   * Manage the programmable MCU
   * Carry out low level hardware management   * Carry out low level hardware management
Line 13: Line 11:
  
 <WRAP info > <WRAP info >
-This page takes VIM2 as an example, other SBCs are similar.+This page takes VIM2 as an example.
 </WRAP> </WRAP>
  
-==== Get help ====+===== Uboot usage =====
  
-Before continuing, make sure you have booted into U-Boot:+To get started, make sure you have booted into U-Boot:
  
 ```shell ```shell
Line 24: Line 22:
 boot wol: enable boot wol: enable
 Hit Enter or space or Ctrl+C key to stop autoboot -- :  0  Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 
-kvim2#+kvim2# _
 ``` ```
 +
 +==== Help information =====
  
 You can get help information by typing ''kbi'': You can get help information by typing ''kbi'':
Line 53: Line 53:
 ``` ```
  
-==== KBI Command ==== +==== MCU Verison ====
- +
-=== MCU Verison ===+
  
 Get the MCU firmware version: Get the MCU firmware version:
Line 64: Line 62:
 ``` ```
  
-=== Initialize ===+==== Initialize ====
  
 Initialize the KBI: Initialize the KBI:
Line 72: Line 70:
 ``` ```
  
-=== Serial number ===+==== Serial number ====
  
 Get the device serial number: Get the device serial number:
Line 81: Line 79:
 ``` ```
  
-=== ADC ===+==== ADC ====
  
 Get ADC value: Get ADC value:
Line 89: Line 87:
 ``` ```
  
-The ADC value can be used to distinguish different hardware modules.+The ADC value can distinguish between hardware modules.
  
-=== Power Off ===+==== Power Off ====
  
-Power off device:+Power off the device:
 ```shell ```shell
 kvim2# kbi poweroff kvim2# kbi poweroff
 ``` ```
  
-=== MAC Address ===+==== MAC Address ====
  
 Get the Ethernet MAC address: Get the Ethernet MAC address:
Line 106: Line 104:
 ``` ```
  
-=== LED Control ===+==== LED Control ====
  
 Setup the blue LED: Setup the blue LED:
  
-The blue LED has different working modes: ''Always Off'', ''Always on'', ''Breathe'' and ''Heartbeat''These indicate different VIM status-modes.+The blue LED has working modes: ''Always Off'', ''Always on'', ''Breathe'' and ''Heartbeat''It indicates VIM working modes.
  
-The blue LED is controlled by the MCU, and the MCU is in charge of system power management. The white LED is controlled by the CPU; therefore the blue LED still works even after you have powered off your VIM2.+The MCU,in charge of system power management, controls the blue LED. The CPU controls the white LED.  
 +In this case, the blue LED still work even VIM2 was powered off.
  
-The KBI can be used to program the blue LED for two different status-modes:+The KBI can be used to program the blue LED for two working modes:
  
-  * system off / idle: power off status, the CPU is powered down.+  * system off / idle: power off status, the CPU is in power-down mode.
   * system on / working: power on status, the CPU is in working mode.   * system on / working: power on status, the CPU is in working mode.
  
-Examples:+For example:
  
 To check the blue LED’s setting for ''system off'' / idle status: To check the blue LED’s setting for ''system off'' / idle status:
Line 134: Line 133:
 led mode: off  [systemon] led mode: off  [systemon]
 ``` ```
 +When VIM2 is powered on,the blue LED is ''Always off''
  
-The terminal printout above says that the blue LED is to remain ''Always off'' when you power on the VIM2. You could instead change it to the ''breathe'' mode: +You can also reset it to ''breathe'' mode:
 ```shell ```shell
 kvim2# kbi led systemon w breathe kvim2# kbi led systemon w breathe
Line 147: Line 146:
 ``` ```
  
-=== Boot Mode ===+==== Boot Mode ====
  
-VIM2 comes with both SPI flash and eMMC Storage. The KBI can be used to setup one of these as the default boot media.+You can flash the images to SPI or eMMC storage in VIM2, and setup one of them as the default boot media by KBI.
  
-To set the default boot media as SPI flash:+Set the default boot media as the SPI:
  
 ```shell ```shell
Line 157: Line 156:
 ``` ```
  
-To set the default boot media as eMMC storage:+Set default boot media as eMMC storage:
  
 ```shell ```shell
Line 163: Line 162:
 ``` ```
  
-You can check the default boot media by running:+You can take a review on the default boot media by running:
  
 ```shell ```shell
Line 170: Line 169:
 ``` ```
  
-=== Boot Trigger Events ===+==== Boot Trigger Events ====
  
 VIM2 supports different events for triggering boot-up: VIM2 supports different events for triggering boot-up:
Line 179: Line 178:
   * Key: Power Key/Button   * Key: Power Key/Button
   * GPIO: External GPIO events   * GPIO: External GPIO events
-This means that when your VIM2 is powered-off, any of the above events can trigger it to power-on; when that trigger event has been set to the ''enabled'' status.+It means any of the above events can trigger VIM2 to power-on after that trigger event has been set to the ''enabled'' status.
  
-Examples:+For example:
  
-  * Get the status for a WOL trigger event: \\ ```shell+  * Get the status of the WOL trigger event: \\ ```shell
 kvim2# kbi trigger wol r kvim2# kbi trigger wol r
 boot wol: disable boot wol: disable
 ``` ```
-  * By default, WOL is disabled for the preinstalled ROM, you can enable it by writing a new value: \\ ```shell+  * WOL is disabled for the pre-installed ROM by default, you can enable it by writing a new value: \\ ```shell
 kvim2# kbi trigger wol w 1 kvim2# kbi trigger wol w 1
 set_wol: 1 set_wol: 1
 ``` ```
-  * Of course, for security reasons, you might want to disable the WOL: \\ ```shell+  * In general, you will disable the WOL for security reasons. : \\ ```shell
 kvim2# kbi trigger wol w 0 kvim2# kbi trigger wol w 0
 set_wol: 0 set_wol: 0
 ``` ```
  
-===== See Also =====+====== Read for reference ======
  
   * [[https://dl.khadas.com/Hardware/Edge/MCU/Edge-V_MCU_REG_EN.pdf|Edge-V MCU Register Map]]   * [[https://dl.khadas.com/Hardware/Edge/MCU/Edge-V_MCU_REG_EN.pdf|Edge-V MCU Register Map]]
Last modified: 2022/08/08 07:07 by ruby