open-bouffalo
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

eFuse

Description of sw_usage_0/1

The eFuse words sw_usage_0 and sw_usage_1 control the boot ROM behavior of the BL808. The field names in the following table come from the SDK, but the semantics are not specified anywhere (except where they can reasonably be derived from the name). In the following table, additional information derived from reverse-engineering the boot ROM has been added. Code references are with respect to the Sep 29 2021 17:07:23 version of the boot ROM.

The default values of these words on the Ox64 and M1s dock boards are identical, namely:

sw_usage_0 == 0x02c1140b:
  28   24   20   16   12    8    4    0
0000 0010 1100 0001 0001 0100 0000 1011

sw_usage_1 == 0x18fbf42f
  28   24   20   16   12    8    4    0
0001 1000 1111 1011 1111 0100 0010 1111

sw_usage_0

Field nameBit offsetField widthDefault valueDescription
bootrom_protect011Code at 0x900140b0. Executed before jumping to user code. Presumably disables access to the boot ROM.
uart_log_disable111Boot ROM debugging, see notes
boot_pin_cfg210Bootloader entry GPIO. 0: GPIO39, 1: GPIO8
uart_download_cfg311Bootloader UART (UART0) pins (RX/TX): 0: GPIO20/21, 1: GPIO14/15
mediaboot_disable410Do not attempt boot from SPI/SD storage, but see note
uartboot_disable510Disables bootloader communication via UART
usbboot_enable610Enable bootloader communication via USB (broken in ROM version Sep 29 2021 17:07:23. Do not set, will crash on bootloader entry)
uart_log_reopen710Boot ROM debugging, see notes
sign_cfg810
dcache_disable910Disable M0 dcache
jtag_cfg10201 (1)JTAG pin configuration. 0: GPIO16-19, 1: GPIO6/7/12/13, 2/3: disabled
fix_key_sel1211
sdh_en1310Enable boot from SD card (untested)
sf_pin_cfg14500100 (4)Flash IO pin configuration, equivalent to enum SF_Ctrl_Pin_Select
boot_level_revert1910Bootloader entry GPIO polarity. 0: active high, 1: active low
boot_pin_dly20200 (0)Time to wait between configuring and sampling bootloader entry GPIO. 0: 5us, 1: 10us, 2: 100us, 3: 500us
ldo_trim_enable2211Apply LDO18 trimming from eFuse (0x78, see F_Ctrl_Read_LDO18IO_Vout_Trim
trim_enable2311Apply RC32m trimming from eFuse (0x00, see F_Ctrl_Read_Xtal_Trim_RC32M
no_hd_boot_en2410
flash_power_delay25201 (1)Time to wait after power-cycling the flash (via GLB_PU_LDO18FLASH). 0: none, 1: 1ms, 2: 8ms, 3: 16ms
tz_boot2710Wide-ranging effects. Disables some bootloader protocol commands (such as WRITE_MEMORY). Disallows ROM-based setup of cores other than M0.
encrypted_tz_boot2810
hbn_check_sign2910
keep_dbg_port_closed3010Code at 0x900140b0. Executed before jumping to user code. Sets TZC_SEC_TZC_SBOOT_DONE to all-ones.
hbn_jump_disable3110

Notes:

  • Boot ROM debug output is disabled if and only if uart_log_disable == 1 && uart_log_reopen == 0. Since uart_log_disable is set on all available devboards, burning uart_log_reopen enables boot ROM debugging on the UART selected by bootlog_pin_cfg.
  • Even if mediaboot_disable is set, media boot will still be attempted if both the UART and USB bootloader protocols are disabled (i.e. usbboot_enable == 0 && uartboot_disable == 1)

sw_usage_1

Field nameBit offsetField widthDefault valueDescription
xtal_type03111 (7)
wifipll_pu311
aupll_pu410
cpupll_pu511
mipipll_pu610
uhspll_pu710
mcu_clk83100 (4)
mcu_clk_div1110
mcu_pbclk_div12211 (3)
lp_div1411
dsp_clk15211 (3)
dsp_clk_div1711
dsp_pbclk18210 (2)
emi_clk20211 (3)
emi_clk_div2211
flash_clk_type233001 (1)
flash_clk_div2610
ldo18flash_bypass_cfg2711Sets GLB_LDO18FLASH_BYPASS
bootlog_pin_cfg2811Boot ROM debug UART (UART1) output pin. 0: GPIO39, 1: GPIO8
abt_offset2910Bootloader UART autobaud tolerance (see UART_SetAllowableError0X55). 0: 7, 1: 3
boot_pull_cfg3010Boot pin pull direction. 0: down, 1: up
usb_if_int_disable3110Disable USB interrupts before jumping to user code

Notes:

  • The clock tree config fields are equivalent to the corresponding fields in struct hal_sys_clk_config. The config is only applied if xtal_type != 0.