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/10 04:36]
ruby [KBI Command]
products:sbc:common:development:kbi [2026/02/02 00:44] (current)
gray update by using AI
Line 1: Line 1:
 ====== KBI - Khadas Bootloader Instructions ====== ====== KBI - Khadas Bootloader Instructions ======
  
-===== Introduction ===== +This page introduces 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 >
-Khadas Bootloader Instructions(KBI) can be used to: +Khadas Bootloader Instructions (KBI) can be used to: 
-  * Manage the programmable MCU +  * Manage the programmable MCU 
-  * Carry out low level hardware management +  * Perform low-level hardware management 
-  * Let developers utilise all the features of Khadas SBCs. +  * Enable developers to utilize all the features of Khadas SBCs. </WRAP>
-</WRAP>+
  
 <WRAP info > <WRAP info >
-This page takes VIM2 as an example.+This page uses VIM2 as an example. 
 </WRAP> </WRAP>
  
-==== Get help ====+===== Uboot usage =====
  
-To get started, make sure you have booted into U-Boot:+To get started, ensure you have booted into U-Boot:
  
 ```shell ```shell
Line 24: Line 21:
 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 52:
 ``` ```
  
-==== KBI Command ==== +==== MCU Verison ====
- +
-=== MCU Verison ===+
  
 Get the MCU firmware version: Get the MCU firmware version:
Line 64: Line 61:
 ``` ```
  
-=== Initialize ===+==== Initialize ====
  
 Initialize the KBI: Initialize the KBI:
Line 72: Line 69:
 ``` ```
  
-=== Serial number ===+==== Serial number ====
  
 Get the device serial number: Get the device serial number:
Line 81: Line 78:
 ``` ```
  
-=== ADC ===+==== ADC ====
  
 Get ADC value: Get ADC value:
Line 89: Line 86:
 ``` ```
  
-The ADC value can distinguish between hardware modules.+The ADC value can be used to distinguish between different 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 103:
 ``` ```
  
-=== LED Control ===+==== LED Control ====
  
-Setup the blue LED:+The blue LED has four operating modes''Always Off'', ''Always On'', ''Breathe'', and ''Heartbeat''. It indicates the VIM's operating status.
  
-The blue LED has 4 working modes: ''Always Off''''Always on''''Breathe'' and ''Heartbeat''It indicates VIM working modes.+The MCUwhich handles system power managementcontrols the blue LEDThe CPU controls the white LED. 
 +Therefore, the blue LED continues to function even when the VIM2 is powered off.
  
-The MCU,in charge of system power management, controls the blue LED. The CPU controls the white LED.  +KBI can be used to program the blue LED for two operating modes:
-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 working modes:+  * system off / idle: Power-off status, the CPU is in a power-down mode. 
 +  * system on / working: Power-on status, the CPU is in working mode.
  
-  * system off / idle: power off status, the CPU is in power-down mode. +Example:
-  * system on / working: power on status, the CPU is in working mode. +
- +
-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 129: Line 124:
 ``` ```
  
-To check the blue LED’s setting for ''system on'' / working status:+Check the blue LED setting for ''system on'' / working status:
  
 ```shell ```shell
Line 135: Line 130:
 led mode: off  [systemon] led mode: off  [systemon]
 ``` ```
-When VIM2 is powered on,the blue LED is ''Always off''+When the VIM2 is powered on, the blue LED is set to ''Always Off'' by default.
  
-You can also reset it to ''breathe'' mode:+You can reset it to ''breathe'' mode: 
 ```shell ```shell
 kvim2# kbi led systemon w breathe kvim2# kbi led systemon w breathe
Line 148: Line 143:
 ``` ```
  
-=== Boot Mode ===+==== Boot Mode ====
  
-VIM2 comes with both SPI flash and eMMC Storage. The KBI can be used to setup one of them as the default boot media. +You can flash images to either SPI flash or eMMC storage on the VIM2, and use KBI to set one of them as the default boot media.
- +
-To set the default boot media as SPI flash:+
  
 +Set the default boot media to SPI flash:
 ```shell ```shell
 kvim2# kbi bootmode w spi kvim2# kbi bootmode w spi
 ``` ```
  
-To set the default boot media as eMMC storage:+Set default boot media to eMMC storage:
  
 ```shell ```shell
Line 164: Line 158:
 ``` ```
  
-You can check the default boot media by running:+You can check the current default boot media setting:
  
 ```shell ```shell
Line 171: Line 165:
 ``` ```
  
-=== Boot Trigger Events ===+==== Boot Trigger Events ====
  
-VIM2 supports different events for triggering boot-up: +The VIM2 supports several events to trigger boot-up: 
-  * WOL: Wake on Lan+  * WOL: Wake-on-Lan
   * RTC: RTC timer   * RTC: RTC timer
   * IR: IR remote controller   * IR: IR remote controller
Line 180: Line 174:
   * Key: Power Key/Button   * Key: Power Key/Button
   * GPIO: External GPIO events   * GPIO: External GPIO events
-It means any of the above events can trigger VIM2 to power-on after that trigger event has been set to the ''enabled'' status.+This means any of the above events can trigger the VIM2 to power on, provided that the specific trigger event has been enabled.
  
 For example: For example:
  
-  * Get the status of the 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
 ``` ```
-  * WOL is disabled for the pre-installed ROM by default, you can enable it by writing a new value\\ ```shell+  * WOL is disabled by default in the pre-installed ROM. You can enable it: 
 +```shell
 kvim2# kbi trigger wol w 1 kvim2# kbi trigger wol w 1
 set_wol: 1 set_wol: 1
 ``` ```
-  * Of course, you can disable the WOL for security reasons. : \\ ```shell+  * For security reasons, you may want to disable WOLreasons. :  
 +```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]] +  * [[dl>products/edge1/tools/mcu/edge-v_mcu_reg_en.pdf|Edge-V MCU Register Map]] 
-  * [[https://dl.khadas.com/Hardware/VIM2/MCU/VIM2_MCU_REG_EN.pdf|VIM2 MCU Register Map]] +  * [[dl>products/vim2/tools/mcu/vim2_mcu_reg_en.pdf|VIM2 MCU Register Map]] 
-  * [[https://dl.khadas.com/Hardware/VIM3/MCU/VIM3_MCU_REG_EN.pdf|VIM3 MCU Register Map]]+  * [[dl>products/vim3/tools/mcu/vim3_mcu_reg_en.pdf|VIM3 MCU Register Map]]
  
Last modified: 2022/08/10 04:36 by ruby