logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

NiceMCU XH-WB3S BK7238 Flashing, Testing, Pinout, Development, Porting

divadiow 18300 361
ADVERTISEMENT
  • #361 21834217
    insmod
    Level 31  
    It's old, present since early bk7252 sdks, i think?
    Most important lib is rtt_ota, but it's closed source.
  • ADVERTISEMENT
  • #362 21869255
    divadiow
    Level 38  
    not exactly ESP8266 bargain basement cheap, but couldn't resist.

    Store checkout screenshot: NiceMCU WB5E board, £5.49, total £8.27, estimated delivery Apr 10, 2026

Topic summary

✨ The discussion centers on the NiceMCU XH-WB3S development board featuring the BK7238 SoC, initially suspected to be BK7231T but confirmed as BK7238. Users share experiences with flashing, testing, and porting firmware, including challenges with encryption keys, flash IDs, and bootloader compatibility. The BK7238 uses 2MB flash with varying encryption keys per chip, complicating universal firmware flashing. Tools like BKFIL and Easy Flasher (EF) are used for backup and restore, with EF supporting full flash erase and restore including bootloader. Flash ID support was extended to include missing flash chips to avoid CRC errors. Arduino SDK and Beken FreeRTOS SDK (version 3.0.70.1 and newer 3.0.76) are referenced for development, with partial support for BK7238 and related chips (BK7231N, BK7231U, BK7252). Porting efforts include adapting delay functions for 160MHz BK7238, resolving flashvars alignment issues due to 64-bit time_t, and addressing HTTP server and TCP socket stability problems in LWIP. OTA updates are functional but require correct image types and bootloader versions. Power save modes and their impact on peripherals like BL0937 energy meter and DS18B20 sensors are discussed, with some instability noted under power save. SPI flashing and UART flashing methods are compared, with SPI preferred for some devices. BK7231U (CC8000 chip) support is emerging, with builds available but some undefined references and boot issues. BK7252 camera module support is experimental, with encrypted flash complicating firmware use. Users report issues with DS18B20 sensor timing on BK7238 due to delay_us inaccuracies, partially fixed by new SDK delay implementations. Logging and MQTT load affect system stability and sensor reading consistency. The community shares flash dumps, toolchain links, and SDK forks to aid development and testing. Overall, the thread provides detailed technical insights into BK7238-based NiceMCU boards' flashing, SDK porting, peripheral support, and firmware development challenges and progress.

FAQ

TL;DR: A NiceMCU XH-WB3S board (BK7238, 2 MB flash) can run OpenBeken if you erase the whole SPI and re-flash with a CRC-fixed 7238 image; boards cost ≈ US $1.50 each and need >300 mA during Wi-Fi start-up. “Boot loops usually mean undervoltage” [Elektroda, insmod, post #21562748]

Why it matters: Correct flashing and stable power prevent endless reboots and CRC errors.

Quick Facts

• Chipset: BK7238, ARM Cortex-M33, 160 MHz [Elektroda, divadiow, post #21440151] • On-board flash: 2 MB (ID 0x852015) [Elektroda, divadiow, post #21289375] • Dev-board price: US $1–1.5 on AliExpress [Elektroda, insmod, post #21327474] • Recommended supply: 3.3 V @ ≥350 mA during TX bursts [BK72xx DS] • Default UART: 115 200 bps on P0 (UART2) [Elektroda, divadiow, post #21442320]

Why do I get endless CRC-mismatch errors when flashing?

The GUI flasher lacked the Puya 25Q16HB (ID 0x152085) entry, so the chip stayed write-protected and every sector verify failed. Update to BK7231GUIFlashTool ≥v1.9.21 or add the ID manually, then erase and re-flash [Elektroda, p.kaczmarek2, post #21342531]

Which firmware file should I use for the XH-WB3S board?

Use OpenBK7238_QIO_x.xx.xx.bin (or the .rbl OTA file) because the module really contains a BK7238, not a BK7231 [Elektroda, DeDaMrAz, post #21542280]

The board reboots every few seconds—why?

A reboot loop with only the RT-Thread banner usually means the 3.3 V rail dips below 3.0 V when Wi-Fi starts. Provide a stable ≥350 mA source or add a 470 µF capacitor [Elektroda, insmod, post #21562748]

How do I force the bootloader to accept my image?

Check “Overwrite bootloader” in the GUI, flash the CRC-fixed QIO image, then reset. On BK7238 the bootloader sits at 0x0 and refuses un-CRC’d binaries [Elektroda, divadiow, post #21550671]

What is the “No TLV header found in flash” message?

It comes from the SDK’s RF-calibration code; the first boot notices that the RF OTP/TLV partition is empty, writes defaults, then continues. The notice is harmless [Elektroda, p.kaczmarek2, post #21564311]

Why does my custom MAC vanish after reboot?

BK7238 stores the MAC in the RF-OTP/TLV area. Current OpenBeken writes it to config only; on the 7238 it must be written with manual_cal_write_macaddr_to_flash(). Until patched, the chip reloads the factory MAC on cold boot [Elektroda, p.kaczmarek2, post #21564311]

How can I enter Safe-Config mode if AP never appears?

Press or toggle RESET five times within 5 s; the bootloader starts OBK in SafeConfig, creating AP “OpenBK_xxxxxx” even with invalid Wi-Fi data [Elektroda, divadiow, post #21550706]

Power-meter readings jump by 20 V—bug or feature?

Voltage spikes on BL0937 driver occur when heavy logging or MQTT runs. Disable verbose logs (loglevel 0) or MQTT to stabilise readings [Elektroda, insmod, post #21520958]

Fast-Connect flag—what does it do?

FastConnect 1 skips full scan and uses stored BSSID/PSK. It cuts connect time from ≈3 s to 300 ms and saves ≈80 mA∙s per wake-up [Elektroda, insmod, post #21507260]

I only see garbage on UART—correct pins?

UART2 TX (module P0) outputs OBK logs at 115 200 bps. Connect RX of your adapter to P0, 3.3 V tolerant [Elektroda, divadiow, post #21550104]

Edge case: What if I flashed a BK7231 image to BK7238?

The chip shows only the bootloader banner and reboots; re-flash the correct 7238 QIO binary or full 2 MB dump via SPI [Elektroda, divadiow, post #21342237]

3-step How-To: Recover a soft-bricked XH-WB3S

  1. Erase full 0-0x1FFFFF with BKFIL (SPI needed if UART locked). 2. Flash OpenBK7238_QIO_x.bin at 0x0 with “Overwrite bootloader”. 3. Reset; join AP and finish setup—done.
ADVERTISEMENT