Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

K230 Linux SDK New Board Adaptation Guide#

Document Purpose#

This document describes how to adapt devices that are not officially supported to the K230 Linux SDK.




Development Board OTP Burning#

OTP Description#

K230/K230D integrates a One Time Programmable (OTP) device internally. This device can store permanent binding information such as MAC, boot parameters, etc. Usually, we store the boot configuration in it.

!!! Burning incorrect OTP or firmware voltage configuration that does not match the hardware configuration may cause the chip to be burned out!!!

Automatically Generate OTP Configuration bin File Based on Hardware Settings#

Canaan provides a convenient graphical WEB interface to automatically generate the OTP configuration bin file. During this process, it is essential to fully communicate with the hardware engineer to clarify hardware settings and voltage settings and other key information.

Configuration tool link: OTP Configuration Tool

otp_tool

When generating the bin file, you need to carefully select the corresponding configuration based on the hardware schematic:

  • UART IOMUX used by BOOT ROM printing: This option is used to select the serial port for BOOT log output (it is recommended to prioritize UART0)

  • UART voltage used by BOOT ROM printing: The voltage used by the BOOT output serial port

  • OSPI IO voltage: Voltage of the OSPI domain

  • SDIO0 IO voltage: Voltage of the MMC0 domain

  • SDIO1 IOMUX: Pins selected by MMC1

  • SDIO1 IO voltage: Voltage of the MMC1 domain

Taking the 01Studio development board schematic as an example, the options can be determined based on these parts:

1740391481653

1740391571191

1740391632742

1740391686205 Based on the above information, the OTP configuration for 01Studio should be as follows 01studio

Special reminder: Be sure to repeatedly verify the accuracy of the configuration with the hardware engineer. Once the configuration is incorrect and the burning operation is performed, it is very likely to cause permanent damage to the chip, which cannot be repaired!

After completing the above configuration, click the “Generate Configuration File” button to generate a bin file, as shown in the example below:

1740392534136

If the interface prompts “The settings are consistent with the default configuration, no need to generate a configuration file”, it means that the default OTP can work and there is no need to re-burn the OTP. Please skip the OTP burning chapter.

Burn OTP bin File#

Burning tool download link: Kendryte Developer Community - Resource Download

Please select the corresponding version for download according to the operating system you are using. At the same time, please be sure to note: Do not power the development board for a long time before the OTP burning is completed, to avoid chip burning.

1740392907598

Power on the chip, connect the UART0 interface, open the BurningTool software, and select the previously generated bin file:

1740396173639

Click the “Start” button and patiently wait for the burning process to finish:

1740469056238

After burning is complete, click “Confirm”.


Appendix A: IOMUX Pin Configuration Description#

This chapter describes the iomux configuration under uboot For iomux under linux, please refer to K230 linux IOMUX Guide

Configuration Principles#

  • IOMUX configuration needs to refer to the board schematic and iomux table

  • Unused pins are recommended to be configured as GPIO to avoid function conflicts

Configuration Parameter Description#

The following uses IO7 configured as I2C4_SCL as an example:

(IO7) (2<<SEL | 0<<SL | BANK_VOLTAGE_IO2_IO13<<MSC | 1<<IE | 1<<OE | 1<<PU | 0<<PD | 7<<DS | 1<<ST)

Parameter

Description

Example

SEL

Function number selection, starting from 0 (Function Number - 1 in the iomux table)

I2C4_SCL corresponds to 2<<SEL

SL

Output slew rate control, configurable only for IO0/IO1 single voltage PAD

0<<SL

MSC

Operating voltage configuration, must be consistent with the board BANK power supply

BANK_VOLTAGE_IO2_IO13<<MSC

IE

Input enable, 0 means input direction is invalid

1<<IE

OE

Output enable, 0 means output direction is invalid

1<<OE

PU

Pull-up configuration, recommended to enable for I2C and other buses

1<<PU

PD

Pull-down configuration, related to functional requirements

0<<PD

DS

Drive strength configuration, IO2~IO63 are all dual voltage PADs (16 drive)

7<<DS

ST

Schmitt trigger configuration, generally configured as 1

1<<ST

Pull Resistor

Drive Strength

Voltage Levels

Drive Strength Description#

  • Single voltage PAD: 8 drive, 3bit effective, value range 0x0~0x7

  • Dual voltage PAD (IO2~IO63): 16 drive, 4bit effective, value range 0x0~0xF

Comments list
Comments
Log in