Lightning LN882x is a family of Wi-Fi and BLE microcontrollers designed for indoor short-range IoT.
Features:
- 32-bit Cortex M4F CPU (160 MHz)
- 296 KiB SRAM
- built-in 512 KiB to 2 MiB flash with XiP
- 802.11b/g/n Wi-Fi
- Bluetooth 5.1 (LN882H only)
Resources:
- LN882H : MCU Combo Wi-Fi/BLE IoT
- LN882H Datasheet : LN882H Datasheet
- LN882H DOC : Official LN882H Document Collection
- LN882H SDK : Official LN882H SDK
- LN882X SDK : Official LN882X SDK
- LN8825A/B : Wi-Fi SOC
- LN8825A/B SDK : Official LN8825A/B SDK
- Flashing tool (GUI) : Flashing tool with GUI (chinese)
- Flashing tool (CMD) : Command-line Flashing tool
{% include-markdown "../../inc/find-board.md" %}
{% include-markdown "../../inc/flashing-note.md" %}
LN882x has two UART ports - The UART0 port is used for flashing and text output.
You need to find which pins correspond to UART0 TX and RX. If your board is supported, you'll find the pinout on its documentation page. Otherwise (and for generic boards), you'll have to find the pinout online.
Connect UART0 of the LN882H to the USB-TTL adapter:
PC | LN882H |
---|---|
RX | TX0 (GPIOA2 / P2) |
TX | RX0 (GPIOA3 / P3) |
GND | GND |
{% include-markdown "../../inc/uart-power.md" %}
{% include-markdown "../../inc/uart-cen.md" %}
The download mode is entered when the chip communicates with the flasher program. Hence, the first step is running the flasher program (described below). While the program is trying to establish communication, the chip has to be rebooted. In order to do that, you need to bridge BOOT1 pin to GND with a wire before powering the chip.
After linking with the chip, the flasher program will begin writing (or reading) the firmware automatically. If that doesn't happen, try resetting the chip again until it works.
If you're getting a No response received
(or similar) error, this means that:
- the power supply is too weak (read above)
- you're resetting the chip too quickly, i.e. you resetted it after the program started communicating with it
The recommended tool to flash (or dump firmware) is ltchiptool
.
Read Using ltchiptool to learn the flashing procedure
!!! tip Because the UART uploading code is programmed in the ROM of the chip, it can't be software-bricked, even if you damage the bootloader.
These files are present in the build directory after successful compilation:
File | Description |
---|---|
firmware.uf2 | UF2 package for UART and OTA upload |
image_firmware.0x000000.bin | Full flash binary image - flashable at 0x0 |
image_boot.0x000000.bin | Boot partition binary image - flashable at 0x0 |
image_part_tab.0x006000.bin | Partition table binary image - flashable at 0x6000 |
image_app.0x007000.bin | Application partition binary image - flashable at 0x7000 |
image_ota.0x133000.bin | OTA partition binary image - flashable at 0x133000 |
-
Official command-line flashing tool
Usage Examples:
LN882H_CMD_Tool.exe COM1 download flash 921600 0x0 image_firmware.0x000000.bin
LN882H_CMD_Tool.exe COM1 download flash 921600 0x7000 image_app.0x007000.bin