WA2 Wi-Fi Module
by Tuya Inc.
Parameter | Value |
---|---|
Board code | wa2 |
MCU | BK7231Q |
Manufacturer | Beken |
Series | BK72XX |
Frequency | 120 MHz |
Flash size | 2 MiB |
RAM size | 256 KiB |
Voltage | 3.0V - 3.6V |
I/O | 13x GPIO, 5x PWM, 2x UART, 2x ADC |
Wi-Fi | 802.11 b/g/n |
Usage
Board code: wa2
In platformio.ini
:
In ESPHome YAML:
Pinout
Pin functions
Name(s) | UART | IĀ²C | SPI | PWM | Other |
---|---|---|---|---|---|
P0 | TX2 | SCL2 | |||
P4, ADC1 | |||||
P6 | PWM0 | ||||
P7 | PWM1 | ||||
P8 | PWM2 | ||||
P10 | RX1 | ||||
P11 | TX1 | ||||
P18 | PWM4 | ||||
P19 | PWM5 | ||||
P20 | SCL1 | TCK | |||
P21 | SDA1 | TMS | |||
P22 | TDI | ||||
P23, ADC3 | TDO |
Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End |
---|---|---|---|
Bootloader | 0x000000 | 68 KiB / 0x11000 | 0x011000 |
App Image | 0x011000 | 1.1 MiB / 0x121000 | 0x132000 |
OTA Image | 0x132000 | 664 KiB / 0xA6000 | 0x1D8000 |
Key-Value Store | 0x1D8000 | 32 KiB / 0x8000 | 0x1E0000 |
Calibration | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000 |
TLV Store | 0x1E1000 | 4 KiB / 0x1000 | 0x1E2000 |
Network Data | 0x1E2000 | 4 KiB / 0x1000 | 0x1E3000 |
User Data | 0x1E3000 | 116 KiB / 0x1D000 | 0x200000 |
Bootloader and app partitions contain CRC16 sums every 32 bytes. That results in the actual flash offsets/sizes not aligned to sector boundaries. To simplify calculations, the values shown in the table (extracted from bootloader's partition table) were aligned to 4096 bytes.