21 Commits

Author SHA1 Message Date
Kuba Szczodrzyński
fb04b1830e [release] v0.8.0
Some checks failed
Lint check / Lint with clang-format (push) Has been cancelled
Lint check / Lint with black (push) Has been cancelled
PlatformIO Publish / publish (push) Has been cancelled
2022-07-26 11:11:52 +02:00
Kuba Szczodrzyński
9509194bd0 [beken-72xx] Correct sys_config.h path 2022-07-26 11:11:14 +02:00
Kuba Szczodrzyński
60322a243a [boards] Fix missing vendor field in generic boards 2022-07-26 11:10:45 +02:00
Kuba Szczodrzyński
4ed7067537 [boards] Add generic definitions for each family 2022-07-25 19:59:53 +02:00
Kuba Szczodrzyński
69086e8fba [boards] Rename small/large base boards to show size 2022-07-25 19:58:16 +02:00
Kuba Szczodrzyński
a4b63bb037 [tools] Make util/markdown.py pre-Python 3.10 compatible 2022-07-21 23:08:53 +02:00
Kuba Szczodrzyński
5ffb2f6619 [boards] Add BW15 board definition, update boardgen 2022-07-21 23:08:49 +02:00
Kuba Szczodrzyński
41eaf9b9e4 [realtek-ambz2] Add initial AmebaZ2 support 2022-07-21 23:08:45 +02:00
Kuba Szczodrzyński
28bb777399 [core] Move family config to separate dir, define Realtek parent 2022-07-21 23:08:39 +02:00
Kuba Szczodrzyński
f375a35cc8 [core] Move library include wrappers to common 2022-07-21 23:08:39 +02:00
Kuba Szczodrzyński
1d41d84083 [boards] Move common partitions to base JSON 2022-07-21 23:08:28 +02:00
Kuba Szczodrzyński
357be177fc [core] Make WiFi sleep & TX power methods weak 2022-07-12 21:12:54 +02:00
Kuba Szczodrzyński
23c3335de8 [beken-72xx] Use Hostapd MD5 implementation 2022-07-12 13:05:02 +02:00
Kuba Szczodrzyński
963b164783 [beken-72xx] Define struct ip_addr as IPv4 2022-07-12 13:01:46 +02:00
Kuba Szczodrzyński
0c22a02641 [beken-72xx] Use mbedTLS MD5 implementation 2022-07-12 12:48:27 +02:00
Kuba Szczodrzyński
10cb5c2c76 [core] Add missing C++ stdlib includes 2022-07-12 12:48:02 +02:00
Kuba Szczodrzyński
6d36c9ef7b [boards] Add remaining WB2x and WB3x boards 2022-07-11 16:42:45 +02:00
Kuba Szczodrzyński
aed97a5e92 [boards] Add remaining WR2x and WR3x boards 2022-07-11 14:23:10 +02:00
Kuba Szczodrzyński
b6008fc9bb [docs] Add family flashing guides 2022-07-11 12:03:28 +02:00
Kuba Szczodrzyński
f9359679ad [docs] Add Getting started guide 2022-07-11 10:54:16 +02:00
Kuba Szczodrzyński
052d7be1a9 [beken-72xx] Move to GNU++11 2022-07-10 20:18:12 +02:00
189 changed files with 9659 additions and 633 deletions

View File

@@ -1,4 +1,5 @@
* [Home](README.md)
* [Getting started](docs/getting-started.md)
* [💻 Boards & CPU list](docs/supported.md)
* [✔️ Implementation status](docs/implementation-status.md)
* [🔧 Configuration](docs/config.md)
@@ -42,14 +43,17 @@
* [uf2ota.h library](docs/ota/library.md)
* [uf2ota.h reference](ltapi/uf2ota_8h.md)
* Families
* [Realtek - notes](docs/platform/realtek/README.md)
* [Beken 72xx - notes](docs/platform/beken-72xx/README.md)
* Beken BK72xx
* [General info](docs/platform/beken-72xx/README.md)
* [Flashing](docs/platform/beken-72xx/flashing.md)
* Realtek AmebaZ Series
* [General info](docs/platform/realtek/README.md)
* [Flashing (AmebaZ)](docs/platform/realtek-ambz/flashing.md)
* [Debugging](docs/platform/realtek/debugging.md)
* [Exception decoder](docs/platform/realtek/exception-decoder.md)
* C library
* [Built-in functions](docs/platform/realtek-ambz/stdlib.md)
* [Memory management](docs/platform/realtek-ambz/memory-management.md)
* [Debugging](docs/platform/realtek/debugging.md)
* [Exception decoder](docs/platform/realtek/exception-decoder.md)
* [All supported boards](boards/)
* [📓 TODO](TODO.md)
* [🔗 Resources](docs/resources.md)

View File

@@ -43,4 +43,5 @@
## RTL8710B
- add generic board definition
- move to GNU++11 (and verify that it works) - take all stdio functions from stdio.h
- rewrite most of Wiring (it was copied from `ambd_arduino`, and is ugly)

View File

@@ -0,0 +1,5 @@
/* Copyright (c) Kuba Szczodrzyński 2022-07-11. */
#pragma once
#define LT_MD5_USE_HOSTAPD 1

View File

@@ -38,6 +38,22 @@ bool WiFiClass::enableAP(bool enable) {
return true;
}
__attribute__((weak)) bool WiFiClass::setSleep(bool enable) {
return false;
}
__attribute__((weak)) bool WiFiClass::getSleep() {
return false;
}
__attribute__((weak)) bool WiFiClass::setTxPower(int power) {
return false;
}
__attribute__((weak)) int WiFiClass::getTxPower() {
return 0;
}
int WiFiClass::hostByName(const char *hostname, IPAddress &aResult) {
aResult = hostByName(hostname);
return true;

View File

@@ -3,9 +3,26 @@
#pragma once
// C standard libraries
#include <inttypes.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// C++ standard libraries
#ifdef __cplusplus
#include <algorithm>
#include <cmath>
using ::round;
using std::abs;
using std::isinf;
using std::isnan;
using std::max;
using std::min;
#endif
// LibreTuya version macros
#ifndef LT_VERSION

View File

@@ -9,6 +9,12 @@
#if LT_MD5_USE_POLARSSL
#include "MD5PolarSSLImpl.h"
#endif
#if LT_MD5_USE_MBEDTLS
#include "MD5MbedTLSImpl.h"
#endif
#if LT_MD5_USE_HOSTAPD
#include "MD5HostapdImpl.h"
#endif
// common API
#ifdef __cplusplus

View File

@@ -0,0 +1,14 @@
/* Copyright (c) Kuba Szczodrzyński 2022-07-12. */
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <crypto/md5_i.h>
#define LT_MD5_CTX_T struct MD5Context
#ifdef __cplusplus
} // extern "C"
#endif

View File

@@ -0,0 +1,28 @@
/* Copyright (c) Kuba Szczodrzyński 2022-07-11. */
#if LT_ARD_HAS_MD5
#include "MD5.h"
#if LT_MD5_USE_MBEDTLS
extern "C" {
void MD5Init(LT_MD5_CTX_T *context) {
mbedtls_md5_init(context);
mbedtls_md5_starts(context);
}
void MD5Update(LT_MD5_CTX_T *context, const unsigned char *buf, unsigned len) {
mbedtls_md5_update(context, buf, len);
}
void MD5Final(unsigned char digest[16], LT_MD5_CTX_T *context) {
mbedtls_md5_finish(context, digest);
}
} // extern "C"
#endif // LT_MD5_USE_MBEDTLS
#endif // LT_ARD_HAS_MD5

View File

@@ -0,0 +1,14 @@
/* Copyright (c) Kuba Szczodrzyński 2022-07-11. */
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <mbedtls/md5.h>
#define LT_MD5_CTX_T mbedtls_md5_context
#ifdef __cplusplus
} // extern "C"
#endif

View File

@@ -1,7 +1,24 @@
<!-- This file is auto-generated -->
- [Generic - BK7231N (Tuya QFN32)](../boards/generic-bk7231n-qfn32-tuya/README.md)
- [Generic - BK7231T (Tuya QFN32)](../boards/generic-bk7231t-qfn32-tuya/README.md)
- [Generic - RTL8710BN (2M/468k)](../boards/generic-rtl8710bn-2mb-468k/README.md)
- [Generic - RTL8710BN (2M/788k)](../boards/generic-rtl8710bn-2mb-788k/README.md)
- [Generic - RTL8720CF (2M/992k)](../boards/generic-rtl8720cf-2mb-992k/README.md)
- [BW12](../boards/bw12/README.md)
- [CB2S Wi-Fi Module](../boards/cb2s/README.md)
- [WB2L Wi-Fi Module](../boards/wb2l/README.md)
- [WR3 Wi-Fi Module](../boards/wr3/README.md)
- [BW15](../boards/bw15/README.md)
- [CB2S](../boards/cb2s/README.md)
- [WB2L](../boards/wb2l/README.md)
- [WB2S](../boards/wb2s/README.md)
- [WB3L](../boards/wb3l/README.md)
- [WB3S](../boards/wb3s/README.md)
- [WR2](../boards/wr2/README.md)
- [WR2E](../boards/wr2e/README.md)
- [WR3](../boards/wr3/README.md)
- [WR3E](../boards/wr3e/README.md)
- [WR3N](../boards/wr3n/README.md)
- [WR2L](../boards/wr2l/README.md)
- [WR2LE](../boards/wr2le/README.md)
- [WR3L](../boards/wr3l/README.md)
- [WR3LE](../boards/wr3le/README.md)
- [Generic - Host-native](../boards/generic-native/README.md)

View File

@@ -41,7 +41,7 @@
},
"links": {
"General info": "../../docs/platform/beken-72xx/README.md",
"Flashing (Tuya manual)": "https://developer.tuya.com/en/docs/iot/burn-and-authorize-wb-series-modules?id=Ka78f4pttsytd",
"Flashing guide": "../../docs/platform/beken-72xx/flashing.md",
"BkWriter v1.6.0": "https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe"
}
}

View File

@@ -0,0 +1,7 @@
{
"pcb": {
"symbol": "GENERIC",
"templates": [],
"vars": {}
}
}

View File

@@ -0,0 +1,79 @@
{
"pcb": {
"templates": [
"esp12s",
"esp12s-shield",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_black",
"TRACE_COLOR": "#FAFD9D",
"SILK_COLOR": "white",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole"
},
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
"pinout": {
"1": {
"IC": 38,
"ARD": "D0"
},
"2": {
"IC": 39,
"ARD": "D1"
},
"3": {
"IC": 14
},
"4": {
"IC": 18,
"ARD": "D2"
},
"5": {
"IC": 36,
"ARD": "D3"
},
"6": {
"IC": 20,
"ARD": "D4"
},
"7": {
"IC": 40,
"ARD": "D5"
},
"8": {
"PWR": 3.3
},
"9": {
"GND": null
},
"10": {
"IC": 1,
"ARD": "D6"
},
"11": {
"IC": 37,
"ARD": "D7"
},
"12": {
"IC": 15,
"ARD": "D8"
},
"13": {
"IC": 19,
"ARD": "D9"
},
"14": {
"IC": 16,
"ARD": "D10"
},
"15": {
"IC": 33,
"ARD": "D11"
},
"16": {
"IC": 34,
"ARD": "D12"
}
}
}
}

View File

@@ -8,8 +8,7 @@
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white",
"PINTYPE_HORZ": "pin_horz_2mm_cast_hole"
"SILK_COLOR": "white"
},
"pinout_hidden": "I2S,JTAG,FLASH",
"pinout": {

View File

@@ -0,0 +1,186 @@
{
"pcb": {
"ic": {
"1": {
"C_NAME": "PIN_A20",
"GPIO": "PA20",
"IRQ": null,
"SD": "D1",
"SPI":
"0_MISO"
,
"UART": "2_RTS",
"I2C": "0_SDA",
"PWM": 0
},
"3": {
"C_NAME": "PIN_A23",
"GPIO": "PA23",
"IRQ": null,
"PWM": 7
},
"14": {
"IO": "I",
"CTRL": "CEN"
},
"15": {
"C_NAME": "PIN_A0",
"GPIO": "PA00",
"IRQ": null,
"JTAG": "TCK",
"UART": "1_RX",
"PWM": 0,
"SWD": "CLK"
},
"16": {
"C_NAME": "PIN_A1",
"GPIO": "PA01",
"IRQ": null,
"JTAG": "TMS",
"UART": "1_TX",
"PWM": 1,
"SWD": "DIO"
},
"18": {
"C_NAME": "PIN_A2",
"GPIO": "PA02",
"IRQ": null,
"JTAG": "TDO",
"UART": "1_RX",
"SPI": "0_CS",
"I2C": "0_SCL",
"PWM": 2
},
"19": {
"C_NAME": "PIN_A3",
"GPIO": "PA03",
"IRQ": null,
"JTAG": "TDI",
"UART": "1_TX",
"SPI": "0_SCK",
"I2C": "0_SDA",
"PWM": 3
},
"20": {
"C_NAME": "PIN_A4",
"GPIO": "PA04",
"IRQ": null,
"JTAG": "tRST",
"UART": "1_CTS",
"SPI": "0_MOSI",
"PWM": 4
},
"21": {
"C_NAME": "PIN_A7",
"GPIO": "PA07",
"IRQ": null,
"FLASH": "^FCS",
"SPI": "0_CS"
},
"22": {
"C_NAME": "PIN_A8",
"GPIO": "PA08",
"IRQ": null,
"FLASH": "FSCK",
"SPI": "0_SCK"
},
"23": {
"C_NAME": "PIN_A9",
"GPIO": "PA09",
"IRQ": null,
"FLASH": "FD2",
"SPI": "0_MOSI",
"UART": "0_RTS"
},
"24": {
"C_NAME": "PIN_A10",
"GPIO": "PA10",
"IRQ": null,
"FLASH": "FD1",
"SPI": "0_MISO",
"UART": "0_CTS"
},
"25": {
"C_NAME": "PIN_A11",
"GPIO": "PA11",
"IRQ": null,
"FLASH": "FD0",
"UART": "0_TX",
"I2C": "0_SCL",
"PWM": 0
},
"26": {
"C_NAME": "PIN_A12",
"GPIO": "PA12",
"IRQ": null,
"FLASH": "FD3",
"UART": "0_RX",
"I2C": "0_SDA",
"PWM": 1
},
"30": {
"IO": "I",
"C_NAME": "VBAT_IN"
},
"33": {
"C_NAME": "PIN_A13",
"GPIO": "PA13",
"IRQ": null,
"UART": "0_RX",
"PWM": 7
},
"34": {
"C_NAME": "PIN_A14",
"GPIO": "PA14",
"IRQ": null,
"SD": "INT",
"UART": "0_TX",
"PWM": 2
},
"36": {
"C_NAME": "PIN_A15",
"GPIO": "PA15",
"IRQ": null,
"SD": "D2",
"SPI": "0_CS",
"UART": "2_RX",
"I2C": "0_SCL",
"PWM": 3
},
"37": {
"C_NAME": "PIN_A16",
"GPIO": "PA16",
"IRQ": null,
"SD": "D3",
"SPI": "0_SCK",
"UART": "2_TX",
"I2C": "0_SDA",
"PWM": 4
},
"38": {
"C_NAME": "PIN_A17",
"GPIO": "PA17",
"IRQ": null,
"SD": "CMD",
"PWM": 5
},
"39": {
"C_NAME": "PIN_A18",
"GPIO": "PA18",
"IRQ": null,
"SD": "CLK",
"PWM": 6
},
"40": {
"C_NAME": "PIN_A19",
"GPIO": "PA19",
"IRQ": null,
"SD": "D0",
"SPI": "0_MOSI",
"UART": "2_CTS",
"I2C": "0_SCL",
"PWM": 7
}
}
}
}

View File

@@ -0,0 +1,158 @@
{
"pcb": {
"test_pads": {
"TRST": "wb2s.back.cen.anchor",
"TRX2": "wb2s.back.2rx.anchor",
"TTX2": "wb2s.back.2tx.anchor",
"TGND": "wb2s.back.gnd.anchor",
"TSCK": "wb2s.back.sck.anchor",
"TCSN": "wb2s.back.csn.anchor",
"TSI": "wb2s.back.si.anchor",
"TSO": "wb2s.back.adc_so.anchor",
"TPWM3": "wb2s.back.pwm3.anchor",
"TVCC": "wb2s.back.vbat.anchor"
},
"back": [
{
"name": "test_pad_1mm",
"pos": "2.6,6.2"
},
{
"id": "sck",
"name": "label_line_2mm_up",
"pos": "2.6,5.4",
"vars": {
"DIR": "left",
"W": 1.3,
"H": 2
}
},
{
"name": "test_pad_1mm",
"pos": "4.6,6.2"
},
{
"id": "pwm3",
"name": "label_line_2mm_up",
"pos": "4.6,5.4",
"vars": {
"DIR": "left",
"W": 3.3,
"H": 4
}
},
{
"name": "test_pad_1mm",
"pos": "7.0,6.2"
},
{
"id": "2rx",
"name": "label_line_2mm_up",
"pos": "7.0,5.4",
"vars": {
"DIR": "right",
"W": 2,
"H": 4
}
},
{
"name": "test_pad_1mm",
"pos": "9.0,6.2"
},
{
"id": "2tx",
"name": "label_line_2mm_up",
"pos": "9.0,5.4",
"vars": {
"DIR": "right",
"W": 0,
"H": 2
}
},
{
"name": "test_pad_1mm",
"pos": "3.0,8.3"
},
{
"id": "csn",
"name": "label_line_2mm_up",
"pos": "2.2,8.4",
"vars": {
"DIR": "left",
"W": 0.9,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "5.2,8.8"
},
{
"id": "si",
"name": "label_line_2mm_up",
"pos": "6.0,8.9",
"vars": {
"DIR": "right",
"W": 3,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "2.1,11.6"
},
{
"id": "adc_so",
"name": "label_line_2mm_up",
"pos": "1.3,11.7",
"vars": {
"DIR": "left",
"W": 0,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "4.3,11.6"
},
{
"id": "cen",
"name": "label_line_2mm_up",
"pos": "5.1,11.7",
"vars": {
"DIR": "right",
"W": 3.9,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "2.5,14.5"
},
{
"id": "vbat",
"name": "label_line_2mm_up",
"pos": "1.7,14.6",
"vars": {
"DIR": "left",
"W": 0.4,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "4.8,14.5"
},
{
"id": "gnd",
"name": "label_line_2mm_up",
"pos": "5.6,14.6",
"vars": {
"DIR": "right",
"W": 3.4,
"H": 0
}
}
]
}
}

102
boards/_base/pcb/wb2s.json Normal file
View File

@@ -0,0 +1,102 @@
{
"pcb": {
"scale": 10.5,
"templates": [
"tuya2",
"rf-15mm-type1",
"tuya2-shield"
],
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white"
},
"pinout_hidden": "I2S,FLASH",
"pinout": {
"1": {
"PWR": 3.3
},
"2": {
"IC": 24,
"ARD": "D0"
},
"3": {
"GND": null
},
"4": {
"IC": 23,
"ARD": "D1"
},
"5": {
"IC": 26,
"ARD": "D4"
},
"6": {
"IC": 22,
"ARD": "D2"
},
"7": {
"IC": 27,
"ARD": "D5"
},
"8": {
"IC": 17,
"ARD": [
"D3",
"A0"
]
},
"9": {
"IC": 16,
"ARD": "D6"
},
"10": {
"IC": 21
},
"11": {
"IC": 15,
"ARD": "D7"
},
"TSCK": {
"IC": 20,
"ARD": "D8"
},
"TPWM3": {
"IC": 25,
"ARD": "D9"
},
"TRX2": {
"IC": 28,
"ARD": "D10"
},
"TTX2": {
"IC": 29,
"ARD": "D11"
},
"TCSN": {
"IC": 19,
"ARD": "D12"
},
"TSI": {
"IC": 18,
"ARD": "D13"
},
"TSO": {
"IC": 17,
"ARD": [
"D3",
"A0"
]
},
"TRST": {
"CTRL": "^RST"
},
"TVCC": {
"PWR": 3.3
},
"TGND": {
"GND": null
}
}
}
}

106
boards/_base/pcb/wb3l.json Normal file
View File

@@ -0,0 +1,106 @@
{
"pcb": {
"templates": [
"esp12e-21",
"esp12e-shield-nohole",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_white",
"TRACE_COLOR": "#E0E0E0",
"SILK_COLOR": "black",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole",
"PINTYPE_HORZ": "pin_horz_2mm_cast_nohole"
},
"pinout_hidden": "I2S,SD,SPI",
"pinout": {
"1": {
"NC": null
},
"2": {
"IC": 17,
"ARD": [
"D0",
"A0"
]
},
"3": {
"IC": 21
},
"4": {
"IC": 11,
"ARD": "D1"
},
"5": {
"IC": 15,
"ARD": "D2"
},
"6": {
"IC": 16,
"ARD": "D3"
},
"7": {
"IC": 22,
"ARD": "D4"
},
"8": {
"PWR": 3.3
},
"9": {
"GND": null
},
"10": {
"IC": 25,
"ARD": "D5"
},
"11": {
"IC": 29,
"ARD": "D6"
},
"12": {
"IC": 12,
"ARD": "D7"
},
"13": {
"IC": 24,
"ARD": "D8"
},
"14": {
"IC": 23,
"ARD": "D9"
},
"15": {
"IC": 26,
"ARD": "D10"
},
"16": {
"IC": 27,
"ARD": "D11"
},
"17": {
"IC": 17,
"ARD": [
"D0",
"A0"
]
},
"18": {
"IC": 18,
"ARD": "D12"
},
"19": {
"IC": 19,
"ARD": "D13"
},
"20": {
"IC": 20,
"ARD": "D14"
},
"21": {
"IC": 28,
"ARD": "D15"
}
}
}
}

108
boards/_base/pcb/wb3s.json Normal file
View File

@@ -0,0 +1,108 @@
{
"pcb": {
"templates": [
"esp12e-22",
"esp12e-shield-nohole",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole",
"PINTYPE_HORZ": "pin_horz_2mm_cast_nohole"
},
"pinout_hidden": "I2S,SD,SPI",
"pinout": {
"1": {
"IC": 21
},
"2": {
"IC": 17,
"ARD": [
"D0",
"A0"
]
},
"3": {
"NC": null
},
"4": {
"IC": 11,
"ARD": "D1"
},
"5": {
"IC": 15,
"ARD": "D2"
},
"6": {
"IC": 16,
"ARD": "D3"
},
"7": {
"IC": 22,
"ARD": "D4"
},
"8": {
"PWR": 3.3
},
"9": {
"GND": null
},
"10": {
"IC": 23,
"ARD": "D5"
},
"11": {
"IC": 29,
"ARD": "D6"
},
"12": {
"IC": 28,
"ARD": "D7"
},
"13": {
"IC": 25,
"ARD": "D8"
},
"14": {
"IC": 24,
"ARD": "D9"
},
"15": {
"IC": 26,
"ARD": "D10"
},
"16": {
"IC": 27,
"ARD": "D11"
},
"17": {
"IC": 17,
"ARD": [
"D0",
"A0"
]
},
"18": {
"IC": 18,
"ARD": "D12"
},
"19": {
"IC": 19,
"ARD": "D13"
},
"20": {
"IC": 20,
"ARD": "D14"
},
"21": {
"NC": null
},
"22": {
"NC": null
}
}
}
}

View File

@@ -0,0 +1,14 @@
{
"pcb": {
"templates": [
"tuya2",
"rf-15mm-type1",
"tuya2-shield"
],
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white"
}
}
}

49
boards/_base/pcb/wr2.json Normal file
View File

@@ -0,0 +1,49 @@
{
"pcb": {
"scale": 10.5,
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI",
"pinout": {
"1": {
"PWR": 3.3
},
"2": {
"IC": 17,
"ARD": "D0"
},
"3": {
"GND": null
},
"4": {
"IC": 16,
"ARD": "D1"
},
"5": {
"IC": 29,
"ARD": "D4"
},
"6": {
"IC": 28,
"ARD": "D2"
},
"7": {
"IC": 32,
"ARD": "D5"
},
"8": {
"IC": 27,
"ARD": "A1"
},
"9": {
"IC": 13,
"ARD": "D6"
},
"10": {
"IC": 12
},
"11": {
"IC": 14,
"ARD": "D7"
}
}
}
}

View File

@@ -0,0 +1,52 @@
{
"pcb": {
"scale": 10.5,
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,SDA0",
"pinout": {
"1": {
"PWR": 3.3
},
"2": {
"IC": 17,
"ARD": "D0"
},
"3": {
"GND": null
},
"4": {
"IC": 30,
"ARD": [
"D1",
"A0"
]
},
"5": {
"IC": 29,
"ARD": "D3"
},
"6": {
"IC": 28,
"ARD": "D2"
},
"7": {
"IC": 32,
"ARD": "D4"
},
"8": {
"IC": 27,
"ARD": "A1"
},
"9": {
"IC": 13,
"ARD": "D5"
},
"10": {
"IC": 12
},
"11": {
"IC": 14,
"ARD": "D6"
}
}
}
}

View File

@@ -0,0 +1,15 @@
{
"pcb": {
"templates": [
"tuya2l",
"rf-15mm-type1",
"tuya2l-shield"
],
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white",
"PINTYPE_HORZ": "pin_horz_2mm_cast_hole"
}
}
}

View File

@@ -0,0 +1,36 @@
{
"pcb": {
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,I2C",
"pinout": {
"1": {
"IC": 14,
"ARD": "D0"
},
"2": {
"IC": 13,
"ARD": "D1"
},
"3": {
"IC": 28,
"ARD": "D2"
},
"4": {
"IC": 30,
"ARD": [
"D3",
"A0"
]
},
"5": {
"IC": 17,
"ARD": "D4"
},
"6": {
"GND": null
},
"7": {
"PWR": 3.3
}
}
}
}

View File

@@ -0,0 +1,33 @@
{
"pcb": {
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI,I2C",
"pinout": {
"1": {
"IC": 14,
"ARD": "D0"
},
"2": {
"IC": 13,
"ARD": "D1"
},
"3": {
"IC": 28,
"ARD": "D2"
},
"4": {
"IC": 31,
"ARD": "D3"
},
"5": {
"IC": 17,
"ARD": "D4"
},
"6": {
"GND": null
},
"7": {
"PWR": 3.3
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"pcb": {
"templates": [
"esp12s",
"esp12s-shield",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_black",
"TRACE_COLOR": "#505050",
"SILK_COLOR": "white",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole"
}
}
}

View File

@@ -1,17 +1,5 @@
{
"pcb": {
"templates": [
"esp12s",
"esp12s-shield",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_black",
"TRACE_COLOR": "#505050",
"SILK_COLOR": "white",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole"
},
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
"pinout": {
"1": {

View File

@@ -1,16 +1,9 @@
{
"pcb": {
"templates": [
"esp12s",
"esp12s-shield",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_black",
"TRACE_COLOR": "#505050",
"SILK_COLOR": "white",
"PINTYPE_VERT": "pin_vert_2mm_cast_nohole"
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white"
},
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD",
"pinout": {
@@ -26,19 +19,19 @@
},
"4": {
"IC": 2,
"ARD": "D5"
"ARD": "D0"
},
"5": {
"IC": 13,
"ARD": "D2"
"ARD": "D1"
},
"6": {
"IC": 14,
"ARD": "D3"
"ARD": "D2"
},
"7": {
"IC": 31,
"ARD": "D0"
"ARD": "D3"
},
"8": {
"PWR": 3.3
@@ -52,12 +45,12 @@
},
"11": {
"IC": 1,
"ARD": "D6"
"ARD": "D5"
},
"12": {
"IC": 30,
"ARD": [
"D1",
"D6",
"A0"
]
},

View File

@@ -0,0 +1,16 @@
{
"pcb": {
"templates": [
"esp12s",
"esp12e-shield",
"tuya-16x24",
"rf-16mm-type1"
],
"vars": {
"MASK_PRESET": "mask_white",
"TRACE_COLOR": "#E0E0E0",
"SILK_COLOR": "black",
"PINTYPE_VERT": "pin_vert_2mm_cast_hole"
}
}
}

View File

@@ -0,0 +1,65 @@
{
"pcb": {
"pinout_hidden": "I2S,TRIG,WAKE,CTS,RTS,SD,SPI",
"pinout": {
"1": {
"NC": null
},
"2": {
"IC": 27,
"ARD": "A1"
},
"3": {
"IC": 12
},
"4": {
"IC": 2,
"ARD": "D0"
},
"5": {
"IC": 13,
"ARD": "D1"
},
"6": {
"IC": 14,
"ARD": "D2"
},
"7": {
"IC": 16,
"ARD": "D3"
},
"8": {
"PWR": 3.3
},
"9": {
"GND": null
},
"10": {
"NC": null
},
"11": {
"IC": 1,
"ARD": "D4"
},
"12": {
"NC": null
},
"13": {
"IC": 28,
"ARD": "D5"
},
"14": {
"IC": 17,
"ARD": "D6"
},
"15": {
"IC": 29,
"ARD": "D7"
},
"16": {
"IC": 32,
"ARD": "D8"
}
}
}
}

View File

@@ -5,10 +5,6 @@
"amb_boot_all": "boot_all_77F7.bin"
},
"flash": {
"boot_xip": "0x000000+0x4000",
"boot_ram": "0x004000+0x4000",
"system": "0x009000+0x1000",
"calibration": "0x00A000+0x1000",
"ota1": "0x00B000+0x75000",
"ota2": "0x080000+0x75000",
"kvs": "0xF5000+0x6000",

View File

@@ -5,10 +5,6 @@
"amb_boot_all": "boot_all_77F7.bin"
},
"flash": {
"boot_xip": "0x000000+0x4000",
"boot_ram": "0x004000+0x4000",
"system": "0x009000+0x1000",
"calibration": "0x00A000+0x1000",
"ota1": "0x00B000+0xC5000",
"ota2": "0x0D0000+0xC5000",
"kvs": "0x195000+0x6000",

View File

@@ -5,6 +5,12 @@
"prefix": "arm-none-eabi-",
"amb_flash_addr": "0x08000000"
},
"flash": {
"boot_xip": "0x000000+0x4000",
"boot_ram": "0x004000+0x4000",
"system": "0x009000+0x1000",
"calibration": "0x00A000+0x1000"
},
"connectivity": [
"wifi"
],
@@ -43,7 +49,8 @@
"links": {
"General info": "../../docs/platform/realtek/README.md",
"Debugging": "../../docs/platform/realtek/debugging.md",
"Flashing (Tuya manual)": "https://developer.tuya.com/en/docs/iot/burn-and-authorize-wr-series-modules?id=Ka789pjc581u8"
"Flashing guide": "../../docs/platform/realtek-ambz/flashing.md",
"ImageTool (AmebaZ/AmebaD)": "https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip"
},
"extra": [
"RDP is most likely not used in Tuya firmwares, as the System Data partition contains an incorrect offset 0xFF000 for RDP, which is in the middle of OTA2 image.",

View File

@@ -0,0 +1,12 @@
{
"flash": {
"ota1": "0x00C000+0xF8000",
"ota2": "0x104000+0xF8000",
"kvs": "0x1FC000+0x2000",
"userdata": "0x1FE000+0x2000"
},
"upload": {
"flash_size": 2097152,
"maximum_size": 1015808
}
}

View File

@@ -0,0 +1,12 @@
{
"connectivity": [
"wifi"
],
"doc": {
"params": {
"extra": {
"Wi-Fi": "802.11 b/g/n"
}
}
}
}

View File

@@ -0,0 +1,14 @@
{
"connectivity": [
"wifi",
"ble"
],
"doc": {
"params": {
"extra": {
"Wi-Fi": "802.11 b/g/n",
"BLE": "v4.2"
}
}
}
}

View File

@@ -0,0 +1,35 @@
{
"build": {
"family": "RTL8720C",
"f_cpu": "100000000L",
"prefix": "arm-none-eabi-",
"ldscript_sdk": "rtl8710c_ram.ld",
"ldscript_arduino": "rtl8710c_ram.ld"
},
"flash": {
"part_table": "0x000000+0x1000",
"system": "0x001000+0x1000",
"calibration": "0x002000+0x1000",
"boot": "0x004000+0x8000"
},
"debug": {
"protocol": "openocd",
"protocols": []
},
"frameworks": [
"realtek-ambz2-sdk"
],
"upload": {
"maximum_ram_size": 262144
},
"doc": {
"params": {
"manufacturer": "Realtek",
"series": "AmebaZ2",
"voltage": "3.0V - 3.6V"
},
"links": {
"General info": "../../docs/platform/realtek/README.md"
}
}
}

View File

@@ -1,7 +1,7 @@
{
"_base": [
"realtek-ambz",
"realtek-ambz-2mb-small",
"realtek-ambz-2mb-468k",
"realtek-ambz-bx",
"pcb/ic-rtl8710bn",
"pcb/bw12"

View File

@@ -6,7 +6,8 @@
- [General info](../../docs/platform/realtek/README.md)
- [Debugging](../../docs/platform/realtek/debugging.md)
- [Flashing (Tuya manual)](https://developer.tuya.com/en/docs/iot/burn-and-authorize-wr-series-modules?id=Ka789pjc581u8)
- [Flashing guide](../../docs/platform/realtek-ambz/flashing.md)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
- [Vendor datasheet](https://docs.ai-thinker.com/_media/rtl8710/hardware/bw12_datasheet_en.pdf)
Parameter | Value

24
boards/bw15.json Normal file
View File

@@ -0,0 +1,24 @@
{
"_base": [
"realtek-ambz2",
"realtek-ambz2-8720",
"realtek-ambz2-2mb-992k",
"pcb/ic-rtl8720cf",
"pcb/bw15"
],
"build": {
"mcu": "rtl8720cf",
"variant": "bw15"
},
"name": "BW15",
"url": "https://docs.ai-thinker.com/_media/rtl8710/docs/bw15_datasheet_en.pdf",
"vendor": "Ai-Thinker Co., Ltd.",
"pcb": {
"symbol": "BW15"
},
"doc": {
"links": {
"Vendor datasheet": "https://docs.ai-thinker.com/_media/rtl8710/docs/bw15_datasheet_en.pdf"
}
}
}

43
boards/bw15/README.md Normal file
View File

@@ -0,0 +1,43 @@
# BW15
*by Ai-Thinker Co., Ltd.*
[Product page](https://docs.ai-thinker.com/_media/rtl8710/docs/bw15_datasheet_en.pdf)
- [General info](../../docs/platform/realtek/README.md)
- [Vendor datasheet](https://docs.ai-thinker.com/_media/rtl8710/docs/bw15_datasheet_en.pdf)
Parameter | Value
-------------|--------------------------
MCU | RTL8720CF
Manufacturer | Realtek
Series | AmebaZ2
Frequency | 100 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 13x GPIO, 8x PWM, 3x UART
Wi-Fi | 802.11 b/g/n
BLE | v4.2
## Pinout
![Pinout](pinout_bw15.svg)
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Partition Table | 0x000000 | 4 KiB / 0x1000 | 0x001000
System Data | 0x001000 | 4 KiB / 0x1000 | 0x002000
Calibration | 0x002000 | 4 KiB / 0x1000 | 0x003000
(reserved) | 0x003000 | 4 KiB / 0x1000 | 0x004000
Boot Image | 0x004000 | 32 KiB / 0x8000 | 0x00C000
OTA1 Image | 0x00C000 | 992 KiB / 0xF8000 | 0x104000
OTA2 Image | 0x104000 | 992 KiB / 0xF8000 | 0x1FC000
Key-Value Store | 0x1FC000 | 8 KiB / 0x2000 | 0x1FE000
User Data | 0x1FE000 | 8 KiB / 0x2000 | 0x200000

355
boards/bw15/pinout_bw15.svg Normal file
View File

@@ -0,0 +1,355 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,85.33333333333333,41.666666666666664" width="1024">
<defs/>
<rect fill="white" height="41.666666666666664" stroke="black" stroke-width="0.1" width="85.33333333333333" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#4d4d4d"/>
<stop offset="100%" stop-color="#0f0f0f"/>
</linearGradient>
<rect fill="url(#id1) none" height="23.9" stroke="#b5a739" stroke-width="0.1" width="15.9" x="34.66666666666666" y="8.883333333333333"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin1.trace" width="0.7" x="34.61666666666666" y="16.583333333333332"/>
<circle cx="34.61666666666666" cy="17.18333333333333" fill="#fff" id="esp12s.front.left.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin2.trace" width="0.7" x="34.61666666666666" y="18.583333333333332"/>
<circle cx="34.61666666666666" cy="19.18333333333333" fill="#fff" id="esp12s.front.left.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin3.trace" width="0.7" x="34.61666666666666" y="20.583333333333332"/>
<circle cx="34.61666666666666" cy="21.18333333333333" fill="#fff" id="esp12s.front.left.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin4.trace" width="0.7" x="34.61666666666666" y="22.583333333333332"/>
<circle cx="34.61666666666666" cy="23.18333333333333" fill="#fff" id="esp12s.front.left.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin5.trace" width="0.7" x="34.61666666666666" y="24.583333333333332"/>
<circle cx="34.61666666666666" cy="25.183333333333334" fill="#fff" id="esp12s.front.left.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin6.trace" width="0.7" x="34.61666666666666" y="26.583333333333332"/>
<circle cx="34.61666666666666" cy="27.183333333333334" fill="#fff" id="esp12s.front.left.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin7.trace" width="0.7" x="34.61666666666666" y="28.583333333333332"/>
<circle cx="34.61666666666666" cy="29.183333333333334" fill="#fff" id="esp12s.front.left.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.left.pin8.trace" width="0.7" x="34.61666666666666" y="30.583333333333332"/>
<circle cx="34.61666666666666" cy="31.183333333333334" fill="#fff" id="esp12s.front.left.pin8.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin1.trace" width="0.7" x="49.91666666666666" y="16.583333333333332"/>
<circle cx="50.61666666666666" cy="17.18333333333333" fill="#fff" id="esp12s.front.right.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin2.trace" width="0.7" x="49.91666666666666" y="18.583333333333332"/>
<circle cx="50.61666666666666" cy="19.18333333333333" fill="#fff" id="esp12s.front.right.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin3.trace" width="0.7" x="49.91666666666666" y="20.583333333333332"/>
<circle cx="50.61666666666666" cy="21.18333333333333" fill="#fff" id="esp12s.front.right.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin4.trace" width="0.7" x="49.91666666666666" y="22.583333333333332"/>
<circle cx="50.61666666666666" cy="23.18333333333333" fill="#fff" id="esp12s.front.right.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin5.trace" width="0.7" x="49.91666666666666" y="24.583333333333332"/>
<circle cx="50.61666666666666" cy="25.183333333333334" fill="#fff" id="esp12s.front.right.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin6.trace" width="0.7" x="49.91666666666666" y="26.583333333333332"/>
<circle cx="50.61666666666666" cy="27.183333333333334" fill="#fff" id="esp12s.front.right.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin7.trace" width="0.7" x="49.91666666666666" y="28.583333333333332"/>
<circle cx="50.61666666666666" cy="29.183333333333334" fill="#fff" id="esp12s.front.right.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12s.front.right.pin8.trace" width="0.7" x="49.91666666666666" y="30.583333333333332"/>
<circle cx="50.61666666666666" cy="31.183333333333334" fill="#fff" id="esp12s.front.right.pin8.cast" r="0.35"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="16.8" rx="0.5" ry="0.5" width="13.6" x="35.81666666666666" y="15.783333333333331"/>
<rect fill="#fafd9d" height="5.2" width="0.5" x="35.71666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="0.5" width="4.6" x="35.71666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="5.2" width="0.5" x="37.91666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="3.0" width="0.5" x="39.81666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="0.5" width="3.0" x="39.81666666666666" y="12.133333333333333"/>
<rect fill="#fafd9d" height="3.0" width="0.5" x="42.31666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="0.5" width="2.7" x="42.31666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="3.0" width="0.5" x="44.51666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="0.5" width="3.0" x="44.51666666666666" y="12.133333333333333"/>
<rect fill="#fafd9d" height="3.0" width="0.5" x="47.01666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="0.5" width="2.5" x="47.01666666666666" y="9.633333333333333"/>
<rect fill="#fafd9d" height="4.4" width="0.5" x="49.01666666666666" y="9.633333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="17.08333333333333"/>
<g transform="translate(27.731026020611555,16.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="17.18333333333333">PA17</text>
<g transform="translate(24.73102602061156,16.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="17.18333333333333">D0</text>
<g transform="translate(21.131026020611557,16.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="17.18333333333333">PWM5</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="19.08333333333333"/>
<g transform="translate(27.731026020611555,18.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="19.18333333333333">PA18</text>
<g transform="translate(24.73102602061156,18.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="19.18333333333333">D1</text>
<g transform="translate(21.131026020611557,18.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="19.18333333333333">PWM6</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="21.08333333333333"/>
<g transform="translate(27.731026020611555,20.38333333333333)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="21.18333333333333">CEN</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="23.08333333333333"/>
<g transform="translate(27.731026020611555,22.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="23.18333333333333">PA02</text>
<g transform="translate(24.73102602061156,22.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="23.18333333333333">D2</text>
<g transform="translate(21.131026020611557,22.38333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="23.18333333333333">RX1</text>
<g transform="translate(17.53102602061156,22.38333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.016666666666662" y="23.18333333333333">SCL0</text>
<g transform="translate(13.93102602061156,22.38333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.41666666666666" y="23.18333333333333">CS0</text>
<g transform="translate(10.331026020611558,22.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="11.81666666666666" y="23.18333333333333">PWM2</text>
<g transform="translate(6.731026020611557,22.38333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="8.216666666666658" y="23.18333333333333">TDO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="25.083333333333332"/>
<g transform="translate(27.731026020611555,24.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="25.183333333333334">PA15</text>
<g transform="translate(24.73102602061156,24.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="25.183333333333334">D3</text>
<g transform="translate(21.131026020611557,24.383333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="25.183333333333334">RX2</text>
<g transform="translate(17.53102602061156,24.383333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.016666666666662" y="25.183333333333334">SCL0</text>
<g transform="translate(13.93102602061156,24.383333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.41666666666666" y="25.183333333333334">CS0</text>
<g transform="translate(10.331026020611558,24.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="11.81666666666666" y="25.183333333333334">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="27.083333333333332"/>
<g transform="translate(27.731026020611555,26.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="27.183333333333334">PA04</text>
<g transform="translate(24.73102602061156,26.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="27.183333333333334">D4</text>
<g transform="translate(21.131026020611557,26.383333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="27.183333333333334">MOSI0</text>
<g transform="translate(17.53102602061156,26.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.016666666666662" y="27.183333333333334">PWM4</text>
<g transform="translate(13.93102602061156,26.383333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.41666666666666" y="27.183333333333334">tRST</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="29.083333333333332"/>
<g transform="translate(27.731026020611555,28.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="29.183333333333334">PA19</text>
<g transform="translate(24.73102602061156,28.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.91666666666666" y="29.183333333333334">D5</text>
<g transform="translate(21.131026020611557,28.383333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.61666666666666" y="29.183333333333334">SCL0</text>
<g transform="translate(17.53102602061156,28.383333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.016666666666662" y="29.183333333333334">MOSI0</text>
<g transform="translate(13.93102602061156,28.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.41666666666666" y="29.183333333333334">PWM7</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="31.51666666666666" y="31.083333333333332"/>
<g transform="translate(27.731026020611555,30.383333333333333)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.216666666666658" y="31.183333333333334">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="31.083333333333332"/>
<g transform="translate(54.53102602061156,30.383333333333333)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="31.183333333333334">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="29.083333333333332"/>
<g transform="translate(54.53102602061156,28.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="29.183333333333334">PA20</text>
<g transform="translate(58.131026020611564,28.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="29.183333333333334">D6</text>
<g transform="translate(61.131026020611564,28.383333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="29.183333333333334">SDA0</text>
<g transform="translate(64.73102602061155,28.383333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="29.183333333333334">MISO0</text>
<g transform="translate(68.33102602061156,28.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.81666666666666" y="29.183333333333334">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="27.083333333333332"/>
<g transform="translate(54.53102602061156,26.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="27.183333333333334">PA16</text>
<g transform="translate(58.131026020611564,26.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="27.183333333333334">D7</text>
<g transform="translate(61.131026020611564,26.383333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="27.183333333333334">TX2</text>
<g transform="translate(64.73102602061155,26.383333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="27.183333333333334">SDA0</text>
<g transform="translate(68.33102602061156,26.383333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.81666666666666" y="27.183333333333334">SCK0</text>
<g transform="translate(71.93102602061157,26.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="73.41666666666667" y="27.183333333333334">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="25.083333333333332"/>
<g transform="translate(54.53102602061156,24.383333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="25.183333333333334">PA00</text>
<g transform="translate(58.131026020611564,24.383333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="25.183333333333334">D8</text>
<g transform="translate(61.131026020611564,24.383333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="25.183333333333334">RX1</text>
<g transform="translate(64.73102602061155,24.383333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="25.183333333333334">PWM0</text>
<g transform="translate(68.33102602061156,24.383333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.81666666666666" y="25.183333333333334">TCK</text>
<g transform="translate(71.93102602061157,24.383333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="73.41666666666667" y="25.183333333333334">SWCLK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="23.08333333333333"/>
<g transform="translate(54.53102602061156,22.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="23.18333333333333">PA03</text>
<g transform="translate(58.131026020611564,22.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="23.18333333333333">D9</text>
<g transform="translate(61.131026020611564,22.38333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="23.18333333333333">TX1</text>
<g transform="translate(64.73102602061155,22.38333333333333)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="23.18333333333333">SDA0</text>
<g transform="translate(68.33102602061156,22.38333333333333)">
<rect fill="#e9ba33" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.81666666666666" y="23.18333333333333">SCK0</text>
<g transform="translate(71.93102602061157,22.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="73.41666666666667" y="23.18333333333333">PWM3</text>
<g transform="translate(75.53102602061156,22.38333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="77.01666666666667" y="23.18333333333333">TDI</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="21.08333333333333"/>
<g transform="translate(54.53102602061156,20.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="21.18333333333333">PA01</text>
<g transform="translate(58.131026020611564,20.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="21.18333333333333">D10</text>
<g transform="translate(61.131026020611564,20.38333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="21.18333333333333">TX1</text>
<g transform="translate(64.73102602061155,20.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="21.18333333333333">PWM1</text>
<g transform="translate(68.33102602061156,20.38333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.81666666666666" y="21.18333333333333">TMS</text>
<g transform="translate(71.93102602061157,20.38333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="73.41666666666667" y="21.18333333333333">SWDIO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="19.08333333333333"/>
<g transform="translate(54.53102602061156,18.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="19.18333333333333">PA13</text>
<g transform="translate(58.131026020611564,18.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="19.18333333333333">D11</text>
<g transform="translate(61.131026020611564,18.38333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="19.18333333333333">RX0</text>
<g transform="translate(64.73102602061155,18.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="19.18333333333333">PWM7</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.11666666666666" y="17.08333333333333"/>
<g transform="translate(54.53102602061156,16.38333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.016666666666666" y="17.18333333333333">PA14</text>
<g transform="translate(58.131026020611564,16.38333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.31666666666666" y="17.18333333333333">D12</text>
<g transform="translate(61.131026020611564,16.38333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.61666666666667" y="17.18333333333333">TX0</text>
<g transform="translate(64.73102602061155,16.38333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.21666666666665" y="17.18333333333333">PWM2</text>
</svg>

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

7
boards/bw15/variant.h Normal file
View File

@@ -0,0 +1,7 @@
/* This file was auto-generated from bw15.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off

View File

@@ -5,7 +5,7 @@
[Product page](https://developer.tuya.com/en/docs/iot/cb2s-module-datasheet?id=Kafgfsa2aaypq)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing (Tuya manual)](https://developer.tuya.com/en/docs/iot/burn-and-authorize-wb-series-modules?id=Ka78f4pttsytd)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value

View File

@@ -0,0 +1,100 @@
{
"_base": [
"generic",
"beken-72xx",
"beken-7231n",
"beken-7231n-tuya",
"pcb/ic-bk7231-qfn32"
],
"build": {
"mcu": "bk7231n",
"variant": "generic-bk7231n-qfn32-tuya"
},
"name": "Generic - BK7231N (Tuya QFN32)",
"symbol": "BK7231N (Tuya QFN32)",
"url": "https://kuba2k2.github.io/libretuya/boards/generic-bk7231n-qfn32-tuya/",
"vendor": "Generic",
"pcb": {
"pinout": {
"1": {
"IC": 29,
"ARD": "D0"
},
"2": {
"IC": 28,
"ARD": "D1"
},
"3": {
"IC": 22,
"ARD": "D2"
},
"4": {
"IC": 23,
"ARD": "D3"
},
"5": {
"IC": 24,
"ARD": "D4"
},
"6": {
"IC": 25,
"ARD": "D5"
},
"7": {
"IC": 26,
"ARD": "D6"
},
"8": {
"IC": 27,
"ARD": "D7"
},
"9": {
"IC": 11,
"ARD": "D8"
},
"10": {
"IC": 13,
"ARD": "D9"
},
"11": {
"IC": 12,
"ARD": "D10"
},
"12": {
"IC": 14,
"ARD": "D11"
},
"13": {
"IC": 20,
"ARD": "D12"
},
"14": {
"IC": 19,
"ARD": "D13"
},
"15": {
"IC": 18,
"ARD": "D14"
},
"16": {
"IC": 17,
"ARD": [
"D15",
"A0"
]
},
"17": {
"IC": 16,
"ARD": "D16"
},
"18": {
"IC": 15,
"ARD": "D17"
},
"19": {
"IC": 10,
"ARD": "D18"
}
}
}
}

View File

@@ -0,0 +1,65 @@
# Generic - BK7231N (Tuya QFN32)
*by Generic*
[Product page](https://kuba2k2.github.io/libretuya/boards/generic-bk7231n-qfn32-tuya/)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value
-------------|----------------------------------
MCU | BK7231N
Manufacturer | Beken
Series | BK72XX
Frequency | 120 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 19x GPIO, 6x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v5.1
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|------|------|------
D0 | P0 | UART2_TX | I2C2_SCL | | |
D1 | P1 | UART2_RX | I2C2_SDA | | |
D2 | P6 | | | | PWM0 |
D3 | P7 | | | | PWM1 |
D4 | P8 | | | | PWM2 |
D5 | P9 | | | | PWM3 |
D6 | P10 | UART1_RX | | | |
D7 | P11 | UART1_TX | | | |
D8 | P14 | | | SCK | |
D9 | P15 | | | CS | |
D10 | P16 | | | MOSI | |
D11 | P17 | | | MISO | |
D12 | P20 | | I2C1_SCL | | | TCK
D13 | P21 | | I2C1_SDA | | | TMS
D14 | P22 | | | | | TDI
D15 | P23 | | | | | TDO
D16 | P24 | | | | PWM4 |
D17 | P26 | | | | PWM5 |
D18 | P28 | | | | |
A0 | P23, ADC3 | | | | |
## 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 / 0x119000 | 0x12A000
OTA Image | 0x12A000 | 664 KiB / 0xA6000 | 0x1D0000
TLV Store | 0x1D0000 | 4 KiB / 0x1000 | 0x1D1000
Network Data | 0x1D1000 | 8 KiB / 0x2000 | 0x1D3000
Key-Value Store | 0x1D3000 | 32 KiB / 0x8000 | 0x1DB000
User Data | 0x1DB000 | 148 KiB / 0x25000 | 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.

View File

@@ -0,0 +1 @@
#include "variant.h"

View File

@@ -0,0 +1,50 @@
/* This file was auto-generated from generic-bk7231n-qfn32-tuya.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D1: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D2: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D4: P8, PWM2
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D5: P9, PWM3
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D6: P10, UART1_RX
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D7: P11, UART1_TX
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D8: P14, SD_CLK, SCK
{GPIO14, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D9: P15, SD_CMD, CS
{GPIO15, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D10: P16, SD_D0, MOSI
{GPIO16, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D11: P17, SD_D1, MISO
{GPIO17, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D12: P20, I2C1_SCL, TCK, FSCK
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
// D13: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
// D14: P22, TDI, FSI
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
// D15: P23, ADC3, TDO, FSO
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
// D16: P24, PWM4
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D17: P26, PWM5, IRDA
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D18: P28, DN
{GPIO28, PIN_GPIO | PIN_IRQ, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

View File

@@ -0,0 +1,39 @@
/* This file was auto-generated from generic-bk7231n-qfn32-tuya.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 19
#define NUM_DIGITAL_PINS 19
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 15u // GPIO23
#define A0 PIN_A0
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE1_SCL 12u // GPIO20
#define PIN_WIRE1_SDA 13u // GPIO21
#define PIN_WIRE2_SCL 0u // GPIO0
#define PIN_WIRE2_SDA 1u // GPIO1
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL1_RX 6u // GPIO10
#define PIN_SERIAL1_TX 7u // GPIO11
#define PIN_SERIAL2_RX 1u // GPIO1
#define PIN_SERIAL2_TX 0u // GPIO0

View File

@@ -0,0 +1,100 @@
{
"_base": [
"generic",
"beken-72xx",
"beken-7231t",
"beken-7231t-tuya",
"pcb/ic-bk7231-qfn32"
],
"build": {
"mcu": "bk7231t",
"variant": "generic-bk7231t-qfn32-tuya"
},
"name": "Generic - BK7231T (Tuya QFN32)",
"symbol": "BK7231T (Tuya QFN32)",
"url": "https://kuba2k2.github.io/libretuya/boards/generic-bk7231t-qfn32-tuya/",
"vendor": "Generic",
"pcb": {
"pinout": {
"1": {
"IC": 29,
"ARD": "D0"
},
"2": {
"IC": 28,
"ARD": "D1"
},
"3": {
"IC": 22,
"ARD": "D2"
},
"4": {
"IC": 23,
"ARD": "D3"
},
"5": {
"IC": 24,
"ARD": "D4"
},
"6": {
"IC": 25,
"ARD": "D5"
},
"7": {
"IC": 26,
"ARD": "D6"
},
"8": {
"IC": 27,
"ARD": "D7"
},
"9": {
"IC": 11,
"ARD": "D8"
},
"10": {
"IC": 13,
"ARD": "D9"
},
"11": {
"IC": 12,
"ARD": "D10"
},
"12": {
"IC": 14,
"ARD": "D11"
},
"13": {
"IC": 20,
"ARD": "D12"
},
"14": {
"IC": 19,
"ARD": "D13"
},
"15": {
"IC": 18,
"ARD": "D14"
},
"16": {
"IC": 17,
"ARD": [
"D15",
"A0"
]
},
"17": {
"IC": 16,
"ARD": "D16"
},
"18": {
"IC": 15,
"ARD": "D17"
},
"19": {
"IC": 10,
"ARD": "D18"
}
}
}
}

View File

@@ -0,0 +1,65 @@
# Generic - BK7231T (Tuya QFN32)
*by Generic*
[Product page](https://kuba2k2.github.io/libretuya/boards/generic-bk7231t-qfn32-tuya/)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value
-------------|----------------------------------
MCU | BK7231T
Manufacturer | Beken
Series | BK72XX
Frequency | 120 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 19x GPIO, 6x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v4.2
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|------|------|------
D0 | P0 | UART2_TX | I2C2_SCL | | |
D1 | P1 | UART2_RX | I2C2_SDA | | |
D2 | P6 | | | | PWM0 |
D3 | P7 | | | | PWM1 |
D4 | P8 | | | | PWM2 |
D5 | P9 | | | | PWM3 |
D6 | P10 | UART1_RX | | | |
D7 | P11 | UART1_TX | | | |
D8 | P14 | | | SCK | |
D9 | P15 | | | CS | |
D10 | P16 | | | MOSI | |
D11 | P17 | | | MISO | |
D12 | P20 | | I2C1_SCL | | | TCK
D13 | P21 | | I2C1_SDA | | | TMS
D14 | P22 | | | | | TDI
D15 | P23 | | | | | TDO
D16 | P24 | | | | PWM4 |
D17 | P26 | | | | PWM5 |
D18 | P28 | | | | |
A0 | P23, ADC3 | | | | |
## 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
TLV Store | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000
Network Data | 0x1E1000 | 8 KiB / 0x2000 | 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.

View File

@@ -0,0 +1 @@
#include "variant.h"

View File

@@ -0,0 +1,50 @@
/* This file was auto-generated from generic-bk7231t-qfn32-tuya.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D1: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D2: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D4: P8, PWM2
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D5: P9, PWM3
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D6: P10, UART1_RX
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D7: P11, UART1_TX
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D8: P14, SD_CLK, SCK
{GPIO14, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D9: P15, SD_CMD, CS
{GPIO15, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D10: P16, SD_D0, MOSI
{GPIO16, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D11: P17, SD_D1, MISO
{GPIO17, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D12: P20, I2C1_SCL, TCK, FSCK
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
// D13: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
// D14: P22, TDI, FSI
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
// D15: P23, ADC3, TDO, FSO
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
// D16: P24, PWM4
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D17: P26, PWM5, IRDA
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D18: P28, DN
{GPIO28, PIN_GPIO | PIN_IRQ, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

View File

@@ -0,0 +1,39 @@
/* This file was auto-generated from generic-bk7231t-qfn32-tuya.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 19
#define NUM_DIGITAL_PINS 19
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 15u // GPIO23
#define A0 PIN_A0
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE1_SCL 12u // GPIO20
#define PIN_WIRE1_SDA 13u // GPIO21
#define PIN_WIRE2_SCL 0u // GPIO0
#define PIN_WIRE2_SDA 1u // GPIO1
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL1_RX 6u // GPIO10
#define PIN_SERIAL1_TX 7u // GPIO11
#define PIN_SERIAL2_RX 1u // GPIO1
#define PIN_SERIAL2_TX 0u // GPIO0

View File

@@ -0,0 +1,95 @@
{
"_base": [
"generic",
"realtek-ambz",
"realtek-ambz-2mb-468k",
"pcb/ic-rtl8710bn"
],
"build": {
"mcu": "rtl8710bn",
"variant": "generic-rtl8710bn-2mb-468k"
},
"name": "Generic - RTL8710BN (2M/468k)",
"symbol": "RTL8710BN (2M/468k)",
"url": "https://kuba2k2.github.io/libretuya/boards/generic-rtl8710bn-2mb-468k/",
"vendor": "Generic",
"pcb": {
"pinout": {
"1": {
"IC": 16,
"ARD": "D0"
},
"2": {
"IC": 28,
"ARD": "D1"
},
"3": {
"IC": 18,
"ARD": "D2"
},
"4": {
"IC": 19,
"ARD": "D3"
},
"5": {
"IC": 20,
"ARD": "D4"
},
"6": {
"IC": 21,
"ARD": "D5"
},
"7": {
"IC": 22,
"ARD": "D6"
},
"8": {
"IC": 23,
"ARD": "D7"
},
"9": {
"IC": 17,
"ARD": "D8"
},
"10": {
"IC": 13,
"ARD": "D9"
},
"11": {
"IC": 14,
"ARD": "D10"
},
"12": {
"IC": 29,
"ARD": "D11"
},
"13": {
"IC": 30,
"ARD": [
"D12",
"A0"
]
},
"14": {
"IC": 31,
"ARD": "D13"
},
"15": {
"IC": 32,
"ARD": "D14"
},
"16": {
"IC": 2,
"ARD": "D15"
},
"17": {
"IC": 1,
"ARD": "D16"
},
"18": {
"IC": 27,
"ARD": "A1"
}
}
}
}

View File

@@ -0,0 +1,69 @@
# Generic - RTL8710BN (2M/468k)
*by Generic*
[Product page](https://kuba2k2.github.io/libretuya/boards/generic-rtl8710bn-2mb-468k/)
- [General info](../../docs/platform/realtek/README.md)
- [Debugging](../../docs/platform/realtek/debugging.md)
- [Flashing guide](../../docs/platform/realtek-ambz/flashing.md)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
Parameter | Value
-------------|----------------------------------
MCU | RTL8710BN
Manufacturer | Realtek
Series | AmebaZ
Frequency | 125 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 17x GPIO, 6x PWM, 2x UART, 2x ADC
Wi-Fi | 802.11 b/g/n
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|------------|-----------|----------|----------------------|------|------
D0 | PA00 | | | | PWM2 |
D1 | PA05 | | | | PWM4 |
D2 | PA06 | | | FCS | |
D3 | PA07 | | | FD1 | |
D4 | PA08 | | | FD2 | |
D5 | PA09 | | | FD0 | |
D6 | PA10 | | | FSCK | |
D7 | PA11 | | | FD3 | |
D8 | PA12 | | | | PWM3 |
D9 | PA14 | | | | PWM0 | SWCLK
D10 | PA15 | | | | PWM1 | SWDIO
D11 | PA18 | UART0_RX | I2C1_SCL | SPI0_SCK, SPI1_SCK | |
D12 | PA19 | UART0_CTS | I2C0_SDA | SPI0_CS, SPI1_CS | |
D13 | PA22 | UART0_RTS | I2C0_SCL | SPI0_MISO, SPI1_MISO | PWM5 |
D14 | PA23 | UART0_TX | I2C1_SDA | SPI0_MOSI, SPI1_MOSI | PWM0 |
D15 | PA29 | UART2_RX | I2C0_SCL | | PWM4 |
D16 | PA30 | UART2_TX | I2C0_SDA | | PWM4 |
A0 | PA19, ADC1 | | | | |
A1 | ADC2 | | | | |
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Boot XIP | 0x000000 | 16 KiB / 0x4000 | 0x004000
Boot RAM | 0x004000 | 16 KiB / 0x4000 | 0x008000
(reserved) | 0x008000 | 4 KiB / 0x1000 | 0x009000
System Data | 0x009000 | 4 KiB / 0x1000 | 0x00A000
Calibration | 0x00A000 | 4 KiB / 0x1000 | 0x00B000
OTA1 Image | 0x00B000 | 468 KiB / 0x75000 | 0x080000
OTA2 Image | 0x080000 | 468 KiB / 0x75000 | 0x0F5000
Key-Value Store | 0x0F5000 | 24 KiB / 0x6000 | 0x0FB000
User Data | 0x0FB000 | 1 MiB / 0x104000 | 0x1FF000
RDP | 0x1FF000 | 4 KiB / 0x1000 | 0x200000
RDP is most likely not used in Tuya firmwares, as the System Data partition contains an incorrect offset 0xFF000 for RDP, which is in the middle of OTA2 image.
Additionally, Tuya firmware uses an encrypted KV or file storage, which resides at the end of flash memory. This seems to overlap system RDP area.

View File

@@ -0,0 +1 @@
#include "variant.h"

View File

@@ -0,0 +1,48 @@
/* This file was auto-generated from generic-rtl8710bn-2mb-468k.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: PA00, PWM2
{PA_0, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: PA05, PWM4, WAKE1
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D2: PA06, FCS, SD_D2
{PA_6, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D3: PA07, FD1, SD_D3
{PA_7, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D4: PA08, FD2, SD_CMD
{PA_8, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D5: PA09, FD0, SD_CLK
{PA_9, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D6: PA10, FSCK, SD_D0
{PA_10, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D7: PA11, FD3, SD_D1
{PA_11, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D8: PA12, PWM3
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D9: PA14, PWM0, SWCLK
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D10: PA15, PWM1, SWDIO
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D11: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D12: PA19, ADC1, UART0_CTS, SPI0_CS, SPI1_CS, I2C0_SDA, SD_D3, TMR5_TRIG, I2S0_TX
{PA_19, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D13: PA22, UART0_RTS, SPI0_MISO, SPI1_MISO, I2C0_SCL, SD_D0, PWM5, I2S0_WS, WAKE2
{PA_22, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D14: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D15: PA29, UART2_RX, I2C0_SCL, PWM4
{PA_29, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D16: PA30, UART2_TX, I2C0_SDA, PWM4
{PA_30, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
// A1: ADC2
{AD_2, PIN_ADC, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

View File

@@ -0,0 +1,53 @@
/* This file was auto-generated from generic-rtl8710bn-2mb-468k.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 18
#define NUM_DIGITAL_PINS 17
#define NUM_ANALOG_INPUTS 2
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 12u // PA_19
#define PIN_A1 17u // AD_2
#define A0 PIN_A0
#define A1 PIN_A1
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI0_CS 12u // PA_19
#define PIN_SPI0_MISO 13u // PA_22
#define PIN_SPI0_MOSI 14u // PA_23
#define PIN_SPI0_SCK 11u // PA_18
#define PIN_SPI1_CS 12u // PA_19
#define PIN_SPI1_MISO 13u // PA_22
#define PIN_SPI1_MOSI 14u // PA_23
#define PIN_SPI1_SCK 11u // PA_18
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE0_SCL_0 13u // PA_22
#define PIN_WIRE0_SCL_1 15u // PA_29
#define PIN_WIRE0_SDA_0 12u // PA_19
#define PIN_WIRE0_SDA_1 16u // PA_30
#define PIN_WIRE1_SCL 11u // PA_18
#define PIN_WIRE1_SDA 14u // PA_23
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL0_CTS 12u // PA_19
#define PIN_SERIAL0_RTS 13u // PA_22
#define PIN_SERIAL0_RX 11u // PA_18
#define PIN_SERIAL0_TX 14u // PA_23
#define PIN_SERIAL2_RX 15u // PA_29
#define PIN_SERIAL2_TX 16u // PA_30

View File

@@ -0,0 +1,95 @@
{
"_base": [
"generic",
"realtek-ambz",
"realtek-ambz-2mb-788k",
"pcb/ic-rtl8710bn"
],
"build": {
"mcu": "rtl8710bn",
"variant": "generic-rtl8710bn-2mb-788k"
},
"name": "Generic - RTL8710BN (2M/788k)",
"symbol": "RTL8710BN (2M/788k)",
"url": "https://kuba2k2.github.io/libretuya/boards/generic-rtl8710bn-2mb-788k/",
"vendor": "Generic",
"pcb": {
"pinout": {
"1": {
"IC": 16,
"ARD": "D0"
},
"2": {
"IC": 28,
"ARD": "D1"
},
"3": {
"IC": 18,
"ARD": "D2"
},
"4": {
"IC": 19,
"ARD": "D3"
},
"5": {
"IC": 20,
"ARD": "D4"
},
"6": {
"IC": 21,
"ARD": "D5"
},
"7": {
"IC": 22,
"ARD": "D6"
},
"8": {
"IC": 23,
"ARD": "D7"
},
"9": {
"IC": 17,
"ARD": "D8"
},
"10": {
"IC": 13,
"ARD": "D9"
},
"11": {
"IC": 14,
"ARD": "D10"
},
"12": {
"IC": 29,
"ARD": "D11"
},
"13": {
"IC": 30,
"ARD": [
"D12",
"A0"
]
},
"14": {
"IC": 31,
"ARD": "D13"
},
"15": {
"IC": 32,
"ARD": "D14"
},
"16": {
"IC": 2,
"ARD": "D15"
},
"17": {
"IC": 1,
"ARD": "D16"
},
"18": {
"IC": 27,
"ARD": "A1"
}
}
}
}

View File

@@ -0,0 +1,69 @@
# Generic - RTL8710BN (2M/788k)
*by Generic*
[Product page](https://kuba2k2.github.io/libretuya/boards/generic-rtl8710bn-2mb-788k/)
- [General info](../../docs/platform/realtek/README.md)
- [Debugging](../../docs/platform/realtek/debugging.md)
- [Flashing guide](../../docs/platform/realtek-ambz/flashing.md)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
Parameter | Value
-------------|----------------------------------
MCU | RTL8710BN
Manufacturer | Realtek
Series | AmebaZ
Frequency | 125 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 17x GPIO, 6x PWM, 2x UART, 2x ADC
Wi-Fi | 802.11 b/g/n
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|------------|-----------|----------|----------------------|------|------
D0 | PA00 | | | | PWM2 |
D1 | PA05 | | | | PWM4 |
D2 | PA06 | | | FCS | |
D3 | PA07 | | | FD1 | |
D4 | PA08 | | | FD2 | |
D5 | PA09 | | | FD0 | |
D6 | PA10 | | | FSCK | |
D7 | PA11 | | | FD3 | |
D8 | PA12 | | | | PWM3 |
D9 | PA14 | | | | PWM0 | SWCLK
D10 | PA15 | | | | PWM1 | SWDIO
D11 | PA18 | UART0_RX | I2C1_SCL | SPI0_SCK, SPI1_SCK | |
D12 | PA19 | UART0_CTS | I2C0_SDA | SPI0_CS, SPI1_CS | |
D13 | PA22 | UART0_RTS | I2C0_SCL | SPI0_MISO, SPI1_MISO | PWM5 |
D14 | PA23 | UART0_TX | I2C1_SDA | SPI0_MOSI, SPI1_MOSI | PWM0 |
D15 | PA29 | UART2_RX | I2C0_SCL | | PWM4 |
D16 | PA30 | UART2_TX | I2C0_SDA | | PWM4 |
A0 | PA19, ADC1 | | | | |
A1 | ADC2 | | | | |
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Boot XIP | 0x000000 | 16 KiB / 0x4000 | 0x004000
Boot RAM | 0x004000 | 16 KiB / 0x4000 | 0x008000
(reserved) | 0x008000 | 4 KiB / 0x1000 | 0x009000
System Data | 0x009000 | 4 KiB / 0x1000 | 0x00A000
Calibration | 0x00A000 | 4 KiB / 0x1000 | 0x00B000
OTA1 Image | 0x00B000 | 788 KiB / 0xC5000 | 0x0D0000
OTA2 Image | 0x0D0000 | 788 KiB / 0xC5000 | 0x195000
Key-Value Store | 0x195000 | 24 KiB / 0x6000 | 0x19B000
User Data | 0x19B000 | 400 KiB / 0x64000 | 0x1FF000
RDP | 0x1FF000 | 4 KiB / 0x1000 | 0x200000
RDP is most likely not used in Tuya firmwares, as the System Data partition contains an incorrect offset 0xFF000 for RDP, which is in the middle of OTA2 image.
Additionally, Tuya firmware uses an encrypted KV or file storage, which resides at the end of flash memory. This seems to overlap system RDP area.

View File

@@ -0,0 +1 @@
#include "variant.h"

View File

@@ -0,0 +1,48 @@
/* This file was auto-generated from generic-rtl8710bn-2mb-788k.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: PA00, PWM2
{PA_0, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: PA05, PWM4, WAKE1
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D2: PA06, FCS, SD_D2
{PA_6, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D3: PA07, FD1, SD_D3
{PA_7, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D4: PA08, FD2, SD_CMD
{PA_8, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D5: PA09, FD0, SD_CLK
{PA_9, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D6: PA10, FSCK, SD_D0
{PA_10, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D7: PA11, FD3, SD_D1
{PA_11, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D8: PA12, PWM3
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D9: PA14, PWM0, SWCLK
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D10: PA15, PWM1, SWDIO
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D11: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D12: PA19, ADC1, UART0_CTS, SPI0_CS, SPI1_CS, I2C0_SDA, SD_D3, TMR5_TRIG, I2S0_TX
{PA_19, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D13: PA22, UART0_RTS, SPI0_MISO, SPI1_MISO, I2C0_SCL, SD_D0, PWM5, I2S0_WS, WAKE2
{PA_22, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D14: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D15: PA29, UART2_RX, I2C0_SCL, PWM4
{PA_29, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D16: PA30, UART2_TX, I2C0_SDA, PWM4
{PA_30, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_UART, PIN_NONE, 0},
// A1: ADC2
{AD_2, PIN_ADC, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

View File

@@ -0,0 +1,53 @@
/* This file was auto-generated from generic-rtl8710bn-2mb-788k.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 18
#define NUM_DIGITAL_PINS 17
#define NUM_ANALOG_INPUTS 2
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 12u // PA_19
#define PIN_A1 17u // AD_2
#define A0 PIN_A0
#define A1 PIN_A1
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI0_CS 12u // PA_19
#define PIN_SPI0_MISO 13u // PA_22
#define PIN_SPI0_MOSI 14u // PA_23
#define PIN_SPI0_SCK 11u // PA_18
#define PIN_SPI1_CS 12u // PA_19
#define PIN_SPI1_MISO 13u // PA_22
#define PIN_SPI1_MOSI 14u // PA_23
#define PIN_SPI1_SCK 11u // PA_18
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE0_SCL_0 13u // PA_22
#define PIN_WIRE0_SCL_1 15u // PA_29
#define PIN_WIRE0_SDA_0 12u // PA_19
#define PIN_WIRE0_SDA_1 16u // PA_30
#define PIN_WIRE1_SCL 11u // PA_18
#define PIN_WIRE1_SDA 14u // PA_23
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL0_CTS 12u // PA_19
#define PIN_SERIAL0_RTS 13u // PA_22
#define PIN_SERIAL0_RX 11u // PA_18
#define PIN_SERIAL0_TX 14u // PA_23
#define PIN_SERIAL2_RX 15u // PA_29
#define PIN_SERIAL2_TX 16u // PA_30

View File

@@ -0,0 +1,101 @@
{
"_base": [
"generic",
"realtek-ambz2",
"realtek-ambz2-8720",
"realtek-ambz2-2mb-992k",
"pcb/ic-rtl8720cf"
],
"build": {
"mcu": "rtl8720cf",
"variant": "generic-rtl8720cf-2mb-992k"
},
"name": "Generic - RTL8720CF (2M/992k)",
"symbol": "RTL8720CF (2M/992k)",
"url": "https://kuba2k2.github.io/libretuya/boards/generic-rtl8720cf-2mb-992k/",
"vendor": "Generic",
"pcb": {
"pinout": {
"1": {
"IC": 15,
"ARD": "D0"
},
"2": {
"IC": 16,
"ARD": "D1"
},
"3": {
"IC": 18,
"ARD": "D2"
},
"4": {
"IC": 19,
"ARD": "D3"
},
"5": {
"IC": 20,
"ARD": "D4"
},
"6": {
"IC": 21,
"ARD": "D5"
},
"7": {
"IC": 22,
"ARD": "D6"
},
"8": {
"IC": 23,
"ARD": "D7"
},
"9": {
"IC": 24,
"ARD": "D8"
},
"10": {
"IC": 25,
"ARD": "D9"
},
"11": {
"IC": 26,
"ARD": "D10"
},
"12": {
"IC": 33,
"ARD": "D11"
},
"13": {
"IC": 34,
"ARD": "D12"
},
"14": {
"IC": 36,
"ARD": "D13"
},
"15": {
"IC": 37,
"ARD": "D14"
},
"16": {
"IC": 38,
"ARD": "D15"
},
"17": {
"IC": 39,
"ARD": "D16"
},
"18": {
"IC": 40,
"ARD": "D17"
},
"19": {
"IC": 1,
"ARD": "D18"
},
"20": {
"IC": 3,
"ARD": "D19"
}
}
}
}

View File

@@ -0,0 +1,38 @@
# Generic - RTL8720CF (2M/992k)
*by Generic*
[Product page](https://kuba2k2.github.io/libretuya/boards/generic-rtl8720cf-2mb-992k/)
- [General info](../../docs/platform/realtek/README.md)
Parameter | Value
-------------|--------------------------
MCU | RTL8720CF
Manufacturer | Realtek
Series | AmebaZ2
Frequency | 100 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 20x GPIO, 8x PWM, 3x UART
Wi-Fi | 802.11 b/g/n
BLE | v4.2
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Partition Table | 0x000000 | 4 KiB / 0x1000 | 0x001000
System Data | 0x001000 | 4 KiB / 0x1000 | 0x002000
Calibration | 0x002000 | 4 KiB / 0x1000 | 0x003000
(reserved) | 0x003000 | 4 KiB / 0x1000 | 0x004000
Boot Image | 0x004000 | 32 KiB / 0x8000 | 0x00C000
OTA1 Image | 0x00C000 | 992 KiB / 0xF8000 | 0x104000
OTA2 Image | 0x104000 | 992 KiB / 0xF8000 | 0x1FC000
Key-Value Store | 0x1FC000 | 8 KiB / 0x2000 | 0x1FE000
User Data | 0x1FE000 | 8 KiB / 0x2000 | 0x200000

View File

@@ -0,0 +1 @@
#include "variant.h"

View File

@@ -0,0 +1,7 @@
/* This file was auto-generated from generic-rtl8720cf-2mb-992k.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off

View File

@@ -5,7 +5,7 @@
[Product page](https://developer.tuya.com/en/docs/iot/wb2l-datasheet?id=K9duegc9bualu)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing (Tuya manual)](https://developer.tuya.com/en/docs/iot/burn-and-authorize-wb-series-modules?id=Ka78f4pttsytd)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value

20
boards/wb2s.json Normal file
View File

@@ -0,0 +1,20 @@
{
"_base": [
"beken-72xx",
"beken-7231t",
"beken-7231t-tuya",
"pcb/ic-bk7231-qfn32",
"pcb/wb2s",
"pcb/wb2s-test"
],
"build": {
"mcu": "bk7231t",
"variant": "wb2s"
},
"name": "WB2S Wi-Fi Module",
"url": "https://developer.tuya.com/en/docs/iot/wb2s-module-datasheet?id=K9ghecl7kc479",
"vendor": "Tuya Inc.",
"pcb": {
"symbol": "WB2S"
}
}

64
boards/wb2s/README.md Normal file
View File

@@ -0,0 +1,64 @@
# WB2S Wi-Fi Module
*by Tuya Inc.*
[Product page](https://developer.tuya.com/en/docs/iot/wb2s-module-datasheet?id=K9ghecl7kc479)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value
-------------|----------------------------------
MCU | BK7231T
Manufacturer | Beken
Series | BK72XX
Frequency | 120 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 14x GPIO, 6x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v4.2
## Pinout
![Pinout](pinout_wb2s.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|-----|------|------
D0 | P8 | | | | PWM2 |
D1 | P7 | | | | PWM1 |
D2 | P6 | | | | PWM0 |
D3 | P23 | | | | | TDO
D4 | P10 | UART1_RX | | | |
D5 | P11 | UART1_TX | | | |
D6 | P24 | | | | PWM4 |
D7 | P26 | | | | PWM5 |
D8 | P20 | | I2C1_SCL | | | TCK
D9 | P9 | | | | PWM3 |
D10 | P1 | UART2_RX | I2C2_SDA | | |
D11 | P0 | UART2_TX | I2C2_SCL | | |
D12 | P21 | | I2C1_SDA | | | TMS
D13 | P22 | | | | | TDI
A0 | P23, ADC3 | | | | |
## 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
TLV Store | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000
Network Data | 0x1E1000 | 8 KiB / 0x2000 | 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.

391
boards/wb2s/pinout_wb2s.svg Normal file
View File

@@ -0,0 +1,391 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,97.52380952380952,47.61904761904762" width="1024">
<defs/>
<rect fill="white" height="47.61904761904762" stroke="black" stroke-width="0.1" width="97.52380952380952" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id1) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="19.230952380952377" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="19.180952380952377" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="20.780952380952378" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="19.080952380952375" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="32.480952380952374" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="32.480952380952374" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="32.580952380952375" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="22.180952380952377" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="24.180952380952377" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="26.180952380952377" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="28.180952380952377" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="30.180952380952377" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="22.580952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="22.380952380952376" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label1.anchor" width="0.0" x="22.880952380952376" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="24.580952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="22.380952380952376" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label2.anchor" width="0.0" x="22.880952380952376" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="26.580952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="22.380952380952376" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label3.anchor" width="0.0" x="22.880952380952376" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="28.580952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="28.680952380952377" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label4.anchor" width="0.0" x="32.38095238095238" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="30.580952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="30.680952380952377" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label5.anchor" width="0.0" x="32.38095238095238" y="33.40952380952381"/>
<text fill="#fff" font-family="Consolas" font-size="1.0" x="26.180952380952377" y="16.40952380952381">WB2S</text>
<rect fill="#58839b" height="5.2" width="0.5" x="19.980952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="4.6" x="19.980952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="5.2" width="0.5" x="22.180952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="24.080952380952375" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="24.080952380952375" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="26.580952380952375" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.7" x="26.580952380952375" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="28.780952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="28.780952380952378" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="31.280952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.5" x="31.280952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="4.4" width="0.5" x="33.28095238095238" y="11.90952380952381"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="8.0" rx="0.5" ry="0.5" width="14.4" x="19.480952380952377" y="17.40952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.88095238095238" y="33.30952380952381"/>
<g transform="translate(36.295311734897275,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="37.78095238095238" y="33.40952380952381">P8</text>
<g transform="translate(39.895311734897284,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="41.08095238095238" y="33.40952380952381">D0</text>
<g transform="translate(42.895311734897284,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="44.38095238095239" y="33.40952380952381">PWM2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="32.88095238095238" y="35.30952380952381"/>
<g transform="translate(36.295311734897275,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="37.78095238095238" y="35.40952380952381">P7</text>
<g transform="translate(39.895311734897284,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="41.08095238095238" y="35.40952380952381">D1</text>
<g transform="translate(42.895311734897284,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="44.38095238095239" y="35.40952380952381">PWM1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="19.780952380952375" y="35.30952380952381"/>
<g transform="translate(15.995311734897276,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="17.480952380952377" y="35.40952380952381">P6</text>
<g transform="translate(12.995311734897275,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="14.180952380952377" y="35.40952380952381">D2</text>
<g transform="translate(9.395311734897275,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="10.880952380952376" y="35.40952380952381">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="19.780952380952375" y="33.30952380952381"/>
<g transform="translate(15.995311734897276,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="17.480952380952377" y="33.40952380952381">P23</text>
<g transform="translate(12.395311734897275,32.609523809523814)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="13.880952380952376" y="33.40952380952381">ADC3</text>
<g transform="translate(9.395311734897275,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="10.580952380952377" y="33.40952380952381">D3</text>
<g transform="translate(6.395311734897275,32.609523809523814)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="7.580952380952377" y="33.40952380952381">A0</text>
<g transform="translate(2.7953117348972754,32.609523809523814)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="4.280952380952377" y="33.40952380952381">TDO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="19.780952380952375" y="31.30952380952381"/>
<g transform="translate(15.995311734897276,30.60952380952381)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="17.480952380952377" y="31.40952380952381">CEN</text>
<linearGradient gradientUnits="objectBoundingBox" id="id3" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id3) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="67.81785714285714" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="67.76785714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="69.36785714285713" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="67.66785714285714" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="81.06785714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="81.06785714285714" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="81.16785714285714" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="69.71785714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="71.71785714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="73.71785714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="75.71785714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="77.71785714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin6.pad" rx="0.2" ry="0.2" width="1.0" x="79.71785714285714" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="70.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="69.91785714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label1.anchor" width="0.0" x="70.41785714285714" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="72.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="69.91785714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label2.anchor" width="0.0" x="70.41785714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="74.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="69.91785714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label3.anchor" width="0.0" x="70.41785714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="76.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="76.21785714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label4.anchor" width="0.0" x="79.91785714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="78.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="78.21785714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label5.anchor" width="0.0" x="79.91785714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="80.11785714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="80.21785714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label6.anchor" width="0.0" x="79.91785714285714" y="31.40952380952381"/>
<circle cx="70.36785714285713" cy="17.60952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="70.26785714285714" y="14.609523809523811"/>
<rect fill="#4e4c4c" height="0.2" width="1.5" x="68.76785714285714" y="14.609523809523811"/>
<rect height="0.0" id="wb2s.back.sck.anchor" width="0.0" x="69.26785714285714" y="14.70952380952381"/>
<circle cx="72.36785714285713" cy="17.60952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="72.26785714285714" y="12.609523809523811"/>
<rect fill="#4e4c4c" height="0.2" width="3.5" x="68.76785714285714" y="12.609523809523811"/>
<rect height="0.0" id="wb2s.back.pwm3.anchor" width="0.0" x="69.26785714285714" y="12.70952380952381"/>
<circle cx="74.76785714285714" cy="17.60952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="74.66785714285714" y="12.609523809523811"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="74.76785714285714" y="12.609523809523811"/>
<rect height="0.0" id="wb2s.back.2rx.anchor" width="0.0" x="76.46785714285714" y="12.70952380952381"/>
<circle cx="76.76785714285714" cy="17.60952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="76.66785714285714" y="14.609523809523811"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="76.76785714285714" y="14.609523809523811"/>
<rect height="0.0" id="wb2s.back.2tx.anchor" width="0.0" x="76.46785714285714" y="14.70952380952381"/>
<circle cx="70.76785714285714" cy="19.70952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="69.86785714285713" y="19.60952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="1.1" x="68.76785714285714" y="19.60952380952381"/>
<rect height="0.0" id="wb2s.back.csn.anchor" width="0.0" x="69.26785714285714" y="19.70952380952381"/>
<circle cx="72.96785714285714" cy="20.20952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="73.66785714285714" y="20.10952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="3.2" x="73.76785714285714" y="20.10952380952381"/>
<rect height="0.0" id="wb2s.back.si.anchor" width="0.0" x="76.46785714285714" y="20.20952380952381"/>
<circle cx="69.86785714285713" cy="23.00952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="68.96785714285714" y="22.90952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="68.76785714285714" y="22.90952380952381"/>
<rect height="0.0" id="wb2s.back.adc_so.anchor" width="0.0" x="69.26785714285714" y="23.00952380952381"/>
<circle cx="72.06785714285714" cy="23.00952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="72.76785714285714" y="22.90952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="4.1" x="72.86785714285713" y="22.90952380952381"/>
<rect height="0.0" id="wb2s.back.cen.anchor" width="0.0" x="76.46785714285714" y="23.00952380952381"/>
<circle cx="70.26785714285714" cy="25.90952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="69.36785714285713" y="25.80952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="0.6000000000000001" x="68.76785714285714" y="25.80952380952381"/>
<rect height="0.0" id="wb2s.back.vbat.anchor" width="0.0" x="69.26785714285714" y="25.90952380952381"/>
<circle cx="72.56785714285714" cy="25.90952380952381" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="73.26785714285714" y="25.80952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="3.6" x="73.36785714285713" y="25.80952380952381"/>
<rect height="0.0" id="wb2s.back.gnd.anchor" width="0.0" x="76.46785714285714" y="25.90952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="67.31785714285715" y="31.30952380952381"/>
<g transform="translate(63.532216496802036,30.60952380952381)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.01785714285714" y="31.40952380952381">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="67.31785714285715" y="33.30952380952381"/>
<g transform="translate(63.532216496802036,32.609523809523814)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.01785714285714" y="33.40952380952381">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="67.31785714285715" y="35.30952380952381"/>
<g transform="translate(63.532216496802036,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.01785714285714" y="35.40952380952381">P10</text>
<g transform="translate(60.53221649680204,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.71785714285714" y="35.40952380952381">D4</text>
<g transform="translate(56.93221649680204,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.417857142857144" y="35.40952380952381">RX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="80.41785714285714" y="35.30952380952381"/>
<g transform="translate(83.83221649680203,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.31785714285714" y="35.40952380952381">P11</text>
<g transform="translate(87.43221649680203,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.61785714285713" y="35.40952380952381">D5</text>
<g transform="translate(90.43221649680203,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.91785714285713" y="35.40952380952381">TX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="80.41785714285714" y="33.30952380952381"/>
<g transform="translate(83.83221649680203,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.31785714285714" y="33.40952380952381">P24</text>
<g transform="translate(87.43221649680203,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.61785714285713" y="33.40952380952381">D6</text>
<g transform="translate(90.43221649680203,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.91785714285713" y="33.40952380952381">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="80.41785714285714" y="31.30952380952381"/>
<g transform="translate(83.83221649680203,30.60952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.31785714285714" y="31.40952380952381">P26</text>
<g transform="translate(87.43221649680203,30.60952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.61785714285713" y="31.40952380952381">D7</text>
<g transform="translate(90.43221649680203,30.60952380952381)">
<rect fill="#aeafc1" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.91785714285713" y="31.40952380952381">IRDA</text>
<g transform="translate(94.03221649680204,30.60952380952381)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="95.51785714285714" y="31.40952380952381">PWM5</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="66.16785714285714" y="14.609523809523811"/>
<g transform="translate(62.382216496802045,13.90952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="63.86785714285715" y="14.70952380952381">P20</text>
<g transform="translate(59.38221649680204,13.90952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="60.567857142857136" y="14.70952380952381">D8</text>
<g transform="translate(55.782216496802036,13.90952380952381)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="57.26785714285714" y="14.70952380952381">SCL1</text>
<g transform="translate(52.18221649680204,13.90952380952381)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="53.667857142857144" y="14.70952380952381">TCK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="66.16785714285714" y="12.609523809523811"/>
<g transform="translate(62.382216496802045,11.90952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="63.86785714285715" y="12.70952380952381">P9</text>
<g transform="translate(59.38221649680204,11.90952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="60.567857142857136" y="12.70952380952381">D9</text>
<g transform="translate(55.782216496802036,11.90952380952381)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="57.26785714285714" y="12.70952380952381">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.96785714285714" y="12.609523809523811"/>
<g transform="translate(80.38221649680203,11.90952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="12.70952380952381">P1</text>
<g transform="translate(83.98221649680204,11.90952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.16785714285714" y="12.70952380952381">D10</text>
<g transform="translate(86.98221649680204,11.90952380952381)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.46785714285714" y="12.70952380952381">RX2</text>
<g transform="translate(90.58221649680203,11.90952380952381)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="92.06785714285714" y="12.70952380952381">SDA2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.96785714285714" y="14.609523809523811"/>
<g transform="translate(80.38221649680203,13.90952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="14.70952380952381">P0</text>
<g transform="translate(83.98221649680204,13.90952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.16785714285714" y="14.70952380952381">D11</text>
<g transform="translate(86.98221649680204,13.90952380952381)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.46785714285714" y="14.70952380952381">TX2</text>
<g transform="translate(90.58221649680203,13.90952380952381)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="92.06785714285714" y="14.70952380952381">SCL2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="66.16785714285714" y="19.609523809523807"/>
<g transform="translate(62.382216496802045,18.909523809523808)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="63.86785714285715" y="19.70952380952381">P21</text>
<g transform="translate(59.38221649680204,18.909523809523808)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="60.567857142857136" y="19.70952380952381">D12</text>
<g transform="translate(55.782216496802036,18.909523809523808)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="57.26785714285714" y="19.70952380952381">SDA1</text>
<g transform="translate(52.18221649680204,18.909523809523808)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="53.667857142857144" y="19.70952380952381">TMS</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.96785714285714" y="20.109523809523807"/>
<g transform="translate(80.38221649680203,19.409523809523808)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="20.20952380952381">P22</text>
<g transform="translate(83.98221649680204,19.409523809523808)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="85.16785714285714" y="20.20952380952381">D13</text>
<g transform="translate(86.98221649680204,19.409523809523808)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.46785714285714" y="20.20952380952381">TDI</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="66.16785714285714" y="22.909523809523808"/>
<g transform="translate(62.382216496802045,22.20952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="63.86785714285715" y="23.00952380952381">P23</text>
<g transform="translate(58.782216496802036,22.20952380952381)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="60.26785714285714" y="23.00952380952381">ADC3</text>
<g transform="translate(55.78221649680204,22.20952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.96785714285714" y="23.00952380952381">D3</text>
<g transform="translate(52.78221649680204,22.20952380952381)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="53.96785714285714" y="23.00952380952381">A0</text>
<g transform="translate(49.18221649680204,22.20952380952381)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="50.667857142857144" y="23.00952380952381">TDO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.96785714285714" y="22.909523809523808"/>
<g transform="translate(80.38221649680203,22.20952380952381)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="middle" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="21.99702380952381">___</text>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="23.11577380952381">RST</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="66.16785714285714" y="25.80952380952381"/>
<g transform="translate(62.382216496802045,25.10952380952381)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="63.86785714285715" y="25.90952380952381">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.96785714285714" y="25.80952380952381"/>
<g transform="translate(80.38221649680203,25.10952380952381)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.86785714285713" y="25.90952380952381">GND</text>
</svg>

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

40
boards/wb2s/variant.cpp Normal file
View File

@@ -0,0 +1,40 @@
/* This file was auto-generated from wb2s.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P8, PWM2
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D2: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: P23, ADC3, TDO, FSO
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
// D4: P10, UART1_RX
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D5: P11, UART1_TX
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D6: P24, PWM4
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D7: P26, PWM5, IRDA
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D8: P20, I2C1_SCL, TCK, FSCK
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
// D9: P9, PWM3
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D10: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D11: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D12: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
// D13: P22, TDI, FSI
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

41
boards/wb2s/variant.h Normal file
View File

@@ -0,0 +1,41 @@
/* This file was auto-generated from wb2s.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 14
#define NUM_DIGITAL_PINS 14
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 3u // GPIO23
#define PIN_A0 3u // GPIO23
#define A0 PIN_A0
#define A0 PIN_A0
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE1_SCL 8u // GPIO20
#define PIN_WIRE1_SDA 12u // GPIO21
#define PIN_WIRE2_SCL 11u // GPIO0
#define PIN_WIRE2_SDA 10u // GPIO1
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL1_RX 4u // GPIO10
#define PIN_SERIAL1_TX 5u // GPIO11
#define PIN_SERIAL2_RX 10u // GPIO1
#define PIN_SERIAL2_TX 11u // GPIO0

19
boards/wb3l.json Normal file
View File

@@ -0,0 +1,19 @@
{
"_base": [
"beken-72xx",
"beken-7231t",
"beken-7231t-tuya",
"pcb/ic-bk7231-qfn32",
"pcb/wb3l"
],
"build": {
"mcu": "bk7231t",
"variant": "wb3l"
},
"name": "WB3L Wi-Fi Module",
"url": "https://developer.tuya.com/en/docs/iot/wb3l-module-datasheet?id=K9duiggw2v8sp",
"vendor": "Tuya Inc.",
"pcb": {
"symbol": "WB3L"
}
}

66
boards/wb3l/README.md Normal file
View File

@@ -0,0 +1,66 @@
# WB3L Wi-Fi Module
*by Tuya Inc.*
[Product page](https://developer.tuya.com/en/docs/iot/wb3l-module-datasheet?id=K9duiggw2v8sp)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value
-------------|----------------------------------
MCU | BK7231T
Manufacturer | Beken
Series | BK72XX
Frequency | 120 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 16x GPIO, 6x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v4.2
## Pinout
![Pinout](pinout_wb3l.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|------|------|------
D0 | P23 | | | | | TDO
D1 | P14 | | | SCK | |
D2 | P26 | | | | PWM5 |
D3 | P24 | | | | PWM4 |
D4 | P6 | | | | PWM0 |
D5 | P9 | | | | PWM3 |
D6 | P0 | UART2_TX | I2C2_SCL | | |
D7 | P16 | | | MOSI | |
D8 | P8 | | | | PWM2 |
D9 | P7 | | | | PWM1 |
D10 | P10 | UART1_RX | | | |
D11 | P11 | UART1_TX | | | |
D12 | P22 | | | | | TDI
D13 | P21 | | I2C1_SDA | | | TMS
D14 | P20 | | I2C1_SCL | | | TCK
D15 | P1 | UART2_RX | I2C2_SDA | | |
A0 | P23, ADC3 | | | | |
## 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
TLV Store | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000
Network Data | 0x1E1000 | 8 KiB / 0x2000 | 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.

372
boards/wb3l/pinout_wb3l.svg Normal file
View File

@@ -0,0 +1,372 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,85.33333333333333,41.666666666666664" width="1024">
<defs/>
<rect fill="white" height="41.666666666666664" stroke="black" stroke-width="0.1" width="85.33333333333333" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#f9f9f9"/>
<stop offset="100%" stop-color="#ededed"/>
</linearGradient>
<rect fill="url(#id1) none" height="23.9" stroke="#b5a739" stroke-width="0.1" width="15.9" x="37.29166666666666" y="5.433333333333331"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin1.trace" width="0.7" x="37.24166666666666" y="13.133333333333331"/>
<circle cx="37.24166666666666" cy="13.73333333333333" fill="#fff" id="esp12e-21.front.left.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin2.trace" width="0.7" x="37.24166666666666" y="15.133333333333331"/>
<circle cx="37.24166666666666" cy="15.73333333333333" fill="#fff" id="esp12e-21.front.left.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin3.trace" width="0.7" x="37.24166666666666" y="17.133333333333333"/>
<circle cx="37.24166666666666" cy="17.73333333333333" fill="#fff" id="esp12e-21.front.left.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin4.trace" width="0.7" x="37.24166666666666" y="19.133333333333333"/>
<circle cx="37.24166666666666" cy="19.73333333333333" fill="#fff" id="esp12e-21.front.left.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin5.trace" width="0.7" x="37.24166666666666" y="21.133333333333333"/>
<circle cx="37.24166666666666" cy="21.733333333333334" fill="#fff" id="esp12e-21.front.left.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin6.trace" width="0.7" x="37.24166666666666" y="23.133333333333333"/>
<circle cx="37.24166666666666" cy="23.733333333333334" fill="#fff" id="esp12e-21.front.left.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin7.trace" width="0.7" x="37.24166666666666" y="25.133333333333333"/>
<circle cx="37.24166666666666" cy="25.733333333333334" fill="#fff" id="esp12e-21.front.left.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.left.pin8.trace" width="0.7" x="37.24166666666666" y="27.133333333333333"/>
<circle cx="37.24166666666666" cy="27.733333333333334" fill="#fff" id="esp12e-21.front.left.pin8.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin1.trace" width="0.7" x="52.54166666666666" y="13.133333333333331"/>
<circle cx="53.24166666666666" cy="13.73333333333333" fill="#fff" id="esp12e-21.front.right.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin2.trace" width="0.7" x="52.54166666666666" y="15.133333333333331"/>
<circle cx="53.24166666666666" cy="15.73333333333333" fill="#fff" id="esp12e-21.front.right.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin3.trace" width="0.7" x="52.54166666666666" y="17.133333333333333"/>
<circle cx="53.24166666666666" cy="17.73333333333333" fill="#fff" id="esp12e-21.front.right.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin4.trace" width="0.7" x="52.54166666666666" y="19.133333333333333"/>
<circle cx="53.24166666666666" cy="19.73333333333333" fill="#fff" id="esp12e-21.front.right.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin5.trace" width="0.7" x="52.54166666666666" y="21.133333333333333"/>
<circle cx="53.24166666666666" cy="21.733333333333334" fill="#fff" id="esp12e-21.front.right.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin6.trace" width="0.7" x="52.54166666666666" y="23.133333333333333"/>
<circle cx="53.24166666666666" cy="23.733333333333334" fill="#fff" id="esp12e-21.front.right.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin7.trace" width="0.7" x="52.54166666666666" y="25.133333333333333"/>
<circle cx="53.24166666666666" cy="25.733333333333334" fill="#fff" id="esp12e-21.front.right.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-21.front.right.pin8.trace" width="0.7" x="52.54166666666666" y="27.133333333333333"/>
<circle cx="53.24166666666666" cy="27.733333333333334" fill="#fff" id="esp12e-21.front.right.pin8.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz5_2mm_0.7mm.pin1.trace" width="1.2" x="40.69166666666666" y="28.68333333333333"/>
<circle cx="41.29166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz5_2mm_0.7mm.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz5_2mm_0.7mm.pin2.trace" width="1.2" x="42.69166666666666" y="28.68333333333333"/>
<circle cx="43.29166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz5_2mm_0.7mm.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz5_2mm_0.7mm.pin3.trace" width="1.2" x="44.69166666666666" y="28.68333333333333"/>
<circle cx="45.29166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz5_2mm_0.7mm.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz5_2mm_0.7mm.pin4.trace" width="1.2" x="46.69166666666666" y="28.68333333333333"/>
<circle cx="47.29166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz5_2mm_0.7mm.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz5_2mm_0.7mm.pin5.trace" width="1.2" x="48.69166666666666" y="28.68333333333333"/>
<circle cx="49.29166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz5_2mm_0.7mm.pin5.cast" r="0.35"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="41.19166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="40.99166666666666" y="31.383333333333333"/>
<rect height="0.0" id="esp12e-21.front.down.label1.anchor" width="0.0" x="41.49166666666666" y="31.483333333333334"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="43.19166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="40.99166666666666" y="33.38333333333333"/>
<rect height="0.0" id="esp12e-21.front.down.label2.anchor" width="0.0" x="41.49166666666666" y="33.483333333333334"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="45.19166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="40.99166666666666" y="35.38333333333333"/>
<rect height="0.0" id="esp12e-21.front.down.label3.anchor" width="0.0" x="41.49166666666666" y="35.483333333333334"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="47.19166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="47.29166666666666" y="35.38333333333333"/>
<rect height="0.0" id="esp12e-21.front.down.label4.anchor" width="0.0" x="50.99166666666666" y="35.483333333333334"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="49.19166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="49.29166666666666" y="33.38333333333333"/>
<rect height="0.0" id="esp12e-21.front.down.label5.anchor" width="0.0" x="50.99166666666666" y="33.483333333333334"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="15.8" rx="0.5" ry="0.5" width="13.6" x="38.44166666666666" y="12.333333333333332"/>
<rect fill="#000" height="0.15" width="15.0" x="37.74166666666666" y="11.583333333333332"/>
<text fill="#000" font-family="Consolas" font-size="1.0" x="44.24166666666666" y="10.883333333333331">WB3L</text>
<rect fill="#e0e0e0" height="5.2" width="0.5" x="38.34166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="0.5" width="4.6" x="38.34166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="5.2" width="0.5" x="40.54166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="3.0" width="0.5" x="42.44166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="0.5" width="3.0" x="42.44166666666666" y="8.68333333333333"/>
<rect fill="#e0e0e0" height="3.0" width="0.5" x="44.94166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="0.5" width="2.7" x="44.94166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="3.0" width="0.5" x="47.14166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="0.5" width="3.0" x="47.14166666666666" y="8.68333333333333"/>
<rect fill="#e0e0e0" height="3.0" width="0.5" x="49.64166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="0.5" width="2.5" x="49.64166666666666" y="6.183333333333331"/>
<rect fill="#e0e0e0" height="4.4" width="0.5" x="51.64166666666666" y="6.183333333333331"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="13.633333333333331"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="15.633333333333331"/>
<g transform="translate(30.356026020611555,14.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="15.73333333333333">P23</text>
<g transform="translate(26.756026020611557,14.93333333333333)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.24166666666666" y="15.73333333333333">ADC3</text>
<g transform="translate(23.756026020611557,14.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="24.94166666666666" y="15.73333333333333">D0</text>
<g transform="translate(20.756026020611557,14.93333333333333)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="21.94166666666666" y="15.73333333333333">A0</text>
<g transform="translate(17.156026020611556,14.93333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="18.64166666666666" y="15.73333333333333">TDO</text>
<g transform="translate(13.556026020611556,14.93333333333333)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.041666666666657" y="15.73333333333333">FSO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="17.63333333333333"/>
<g transform="translate(30.356026020611555,16.93333333333333)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="17.73333333333333">CEN</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="19.63333333333333"/>
<g transform="translate(30.356026020611555,18.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="19.73333333333333">P14</text>
<g transform="translate(27.35602602061156,18.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.54166666666666" y="19.73333333333333">D1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="21.633333333333333"/>
<g transform="translate(30.356026020611555,20.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="21.733333333333334">P26</text>
<g transform="translate(27.35602602061156,20.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.54166666666666" y="21.733333333333334">D2</text>
<g transform="translate(23.756026020611557,20.933333333333334)">
<rect fill="#aeafc1" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.24166666666666" y="21.733333333333334">IRDA</text>
<g transform="translate(20.15602602061156,20.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="21.641666666666662" y="21.733333333333334">PWM5</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="23.633333333333333"/>
<g transform="translate(30.356026020611555,22.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="23.733333333333334">P24</text>
<g transform="translate(27.35602602061156,22.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.54166666666666" y="23.733333333333334">D3</text>
<g transform="translate(23.756026020611557,22.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.24166666666666" y="23.733333333333334">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="25.633333333333333"/>
<g transform="translate(30.356026020611555,24.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="25.733333333333334">P6</text>
<g transform="translate(27.35602602061156,24.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.54166666666666" y="25.733333333333334">D4</text>
<g transform="translate(23.756026020611557,24.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.24166666666666" y="25.733333333333334">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.14166666666666" y="27.633333333333333"/>
<g transform="translate(30.356026020611555,26.933333333333334)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.841666666666658" y="27.733333333333334">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="27.633333333333333"/>
<g transform="translate(57.15602602061156,26.933333333333334)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="27.733333333333334">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="25.633333333333333"/>
<g transform="translate(57.15602602061156,24.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="25.733333333333334">P9</text>
<g transform="translate(60.756026020611564,24.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="25.733333333333334">D5</text>
<g transform="translate(63.756026020611564,24.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="25.733333333333334">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="23.633333333333333"/>
<g transform="translate(57.15602602061156,22.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="23.733333333333334">P0</text>
<g transform="translate(60.756026020611564,22.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="23.733333333333334">D6</text>
<g transform="translate(63.756026020611564,22.933333333333334)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="23.733333333333334">TX2</text>
<g transform="translate(67.35602602061155,22.933333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="68.84166666666665" y="23.733333333333334">SCL2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="21.633333333333333"/>
<g transform="translate(57.15602602061156,20.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="21.733333333333334">P16</text>
<g transform="translate(60.756026020611564,20.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="21.733333333333334">D7</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="19.63333333333333"/>
<g transform="translate(57.15602602061156,18.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="19.73333333333333">P8</text>
<g transform="translate(60.756026020611564,18.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="19.73333333333333">D8</text>
<g transform="translate(63.756026020611564,18.93333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="19.73333333333333">PWM2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="17.63333333333333"/>
<g transform="translate(57.15602602061156,16.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="17.73333333333333">P7</text>
<g transform="translate(60.756026020611564,16.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="17.73333333333333">D9</text>
<g transform="translate(63.756026020611564,16.93333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="17.73333333333333">PWM1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="15.633333333333331"/>
<g transform="translate(57.15602602061156,14.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="15.73333333333333">P10</text>
<g transform="translate(60.756026020611564,14.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="15.73333333333333">D10</text>
<g transform="translate(63.756026020611564,14.93333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="15.73333333333333">RX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="53.74166666666666" y="13.633333333333331"/>
<g transform="translate(57.15602602061156,12.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="58.641666666666666" y="13.73333333333333">P11</text>
<g transform="translate(60.756026020611564,12.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.94166666666666" y="13.73333333333333">D11</text>
<g transform="translate(63.756026020611564,12.93333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.24166666666666" y="13.73333333333333">TX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="38.39166666666666" y="31.383333333333333"/>
<g transform="translate(34.60602602061156,30.683333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="36.09166666666666" y="31.483333333333334">P23</text>
<g transform="translate(31.006026020611554,30.683333333333334)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.49166666666666" y="31.483333333333334">ADC3</text>
<g transform="translate(28.006026020611557,30.683333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.19166666666666" y="31.483333333333334">D0</text>
<g transform="translate(25.006026020611557,30.683333333333334)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="26.19166666666666" y="31.483333333333334">A0</text>
<g transform="translate(21.406026020611556,30.683333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.89166666666666" y="31.483333333333334">TDO</text>
<g transform="translate(17.806026020611554,30.683333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.291666666666657" y="31.483333333333334">FSO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="38.39166666666666" y="33.38333333333333"/>
<g transform="translate(34.60602602061156,32.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="36.09166666666666" y="33.483333333333334">P22</text>
<g transform="translate(31.606026020611555,32.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.79166666666666" y="33.483333333333334">D12</text>
<g transform="translate(28.006026020611557,32.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.49166666666666" y="33.483333333333334">TDI</text>
<g transform="translate(24.406026020611556,32.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.89166666666666" y="33.483333333333334">FSI</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="38.39166666666666" y="35.38333333333333"/>
<g transform="translate(34.60602602061156,34.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="36.09166666666666" y="35.483333333333334">P21</text>
<g transform="translate(31.606026020611555,34.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.79166666666666" y="35.483333333333334">D13</text>
<g transform="translate(28.006026020611557,34.68333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.49166666666666" y="35.483333333333334">SDA1</text>
<g transform="translate(24.406026020611556,34.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.89166666666666" y="35.483333333333334">TMS</text>
<g transform="translate(20.806026020611558,34.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="middle" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.29166666666666" y="34.47083333333334">___</text>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.29166666666666" y="35.58958333333334">FCS</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.49166666666666" y="35.38333333333333"/>
<g transform="translate(54.90602602061156,34.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.391666666666666" y="35.483333333333334">P20</text>
<g transform="translate(58.506026020611564,34.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.69166666666666" y="35.483333333333334">D14</text>
<g transform="translate(61.506026020611564,34.68333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.99166666666667" y="35.483333333333334">SCL1</text>
<g transform="translate(65.10602602061155,34.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.59166666666665" y="35.483333333333334">TCK</text>
<g transform="translate(68.70602602061156,34.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="70.19166666666666" y="35.483333333333334">FSCK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="51.49166666666666" y="33.38333333333333"/>
<g transform="translate(54.90602602061156,32.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="56.391666666666666" y="33.483333333333334">P1</text>
<g transform="translate(58.506026020611564,32.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.69166666666666" y="33.483333333333334">D15</text>
<g transform="translate(61.506026020611564,32.68333333333334)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.99166666666667" y="33.483333333333334">RX2</text>
<g transform="translate(65.10602602061155,32.68333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.59166666666665" y="33.483333333333334">SDA2</text>
</svg>

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

44
boards/wb3l/variant.cpp Normal file
View File

@@ -0,0 +1,44 @@
/* This file was auto-generated from wb3l.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P23, ADC3, TDO, FSO
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
// D1: P14, SD_CLK, SCK
{GPIO14, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D2: P26, PWM5, IRDA
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: P24, PWM4
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D4: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D5: P9, PWM3
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D6: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D7: P16, SD_D0, MOSI
{GPIO16, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D8: P8, PWM2
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D9: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D10: P10, UART1_RX
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D11: P11, UART1_TX
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D12: P22, TDI, FSI
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
// D13: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
// D14: P20, I2C1_SCL, TCK, FSCK
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
// D15: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

41
boards/wb3l/variant.h Normal file
View File

@@ -0,0 +1,41 @@
/* This file was auto-generated from wb3l.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 16
#define NUM_DIGITAL_PINS 16
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 0u // GPIO23
#define PIN_A0 0u // GPIO23
#define A0 PIN_A0
#define A0 PIN_A0
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE1_SCL 14u // GPIO20
#define PIN_WIRE1_SDA 13u // GPIO21
#define PIN_WIRE2_SCL 6u // GPIO0
#define PIN_WIRE2_SDA 15u // GPIO1
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL1_RX 10u // GPIO10
#define PIN_SERIAL1_TX 11u // GPIO11
#define PIN_SERIAL2_RX 15u // GPIO1
#define PIN_SERIAL2_TX 6u // GPIO0

19
boards/wb3s.json Normal file
View File

@@ -0,0 +1,19 @@
{
"_base": [
"beken-72xx",
"beken-7231t",
"beken-7231t-tuya",
"pcb/ic-bk7231-qfn32",
"pcb/wb3s"
],
"build": {
"mcu": "bk7231t",
"variant": "wb3s"
},
"name": "WB3S Wi-Fi Module",
"url": "https://developer.tuya.com/en/docs/iot/wb3s-module-datasheet?id=K9dx20n6hz5n4",
"vendor": "Tuya Inc.",
"pcb": {
"symbol": "WB3S"
}
}

65
boards/wb3s/README.md Normal file
View File

@@ -0,0 +1,65 @@
# WB3S Wi-Fi Module
*by Tuya Inc.*
[Product page](https://developer.tuya.com/en/docs/iot/wb3s-module-datasheet?id=K9dx20n6hz5n4)
- [General info](../../docs/platform/beken-72xx/README.md)
- [Flashing guide](../../docs/platform/beken-72xx/flashing.md)
- [BkWriter v1.6.0](https://images.tuyacn.com/smart/bk_writer1.60/bk_writer1.60.exe)
Parameter | Value
-------------|----------------------------------
MCU | BK7231T
Manufacturer | Beken
Series | BK72XX
Frequency | 120 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 15x GPIO, 6x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v4.2
## Pinout
![Pinout](pinout_wb3s.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|-----|------|------
D0 | P23 | | | | | TDO
D1 | P14 | | | SCK | |
D2 | P26 | | | | PWM5 |
D3 | P24 | | | | PWM4 |
D4 | P6 | | | | PWM0 |
D5 | P7 | | | | PWM1 |
D6 | P0 | UART2_TX | I2C2_SCL | | |
D7 | P1 | UART2_RX | I2C2_SDA | | |
D8 | P9 | | | | PWM3 |
D9 | P8 | | | | PWM2 |
D10 | P10 | UART1_RX | | | |
D11 | P11 | UART1_TX | | | |
D12 | P22 | | | | | TDI
D13 | P21 | | I2C1_SDA | | | TMS
D14 | P20 | | I2C1_SCL | | | TCK
A0 | P23, ADC3 | | | | |
## 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
TLV Store | 0x1E0000 | 4 KiB / 0x1000 | 0x1E1000
Network Data | 0x1E1000 | 8 KiB / 0x2000 | 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.

370
boards/wb3s/pinout_wb3s.svg Normal file
View File

@@ -0,0 +1,370 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,85.33333333333333,41.666666666666664" width="1024">
<defs/>
<rect fill="white" height="41.666666666666664" stroke="black" stroke-width="0.1" width="85.33333333333333" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id1) none" height="23.9" stroke="#b5a739" stroke-width="0.1" width="15.9" x="37.79166666666666" y="5.433333333333331"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin1.trace" width="0.7" x="37.74166666666666" y="13.133333333333331"/>
<circle cx="37.74166666666666" cy="13.73333333333333" fill="#fff" id="esp12e-22.front.left.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin2.trace" width="0.7" x="37.74166666666666" y="15.133333333333331"/>
<circle cx="37.74166666666666" cy="15.73333333333333" fill="#fff" id="esp12e-22.front.left.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin3.trace" width="0.7" x="37.74166666666666" y="17.133333333333333"/>
<circle cx="37.74166666666666" cy="17.73333333333333" fill="#fff" id="esp12e-22.front.left.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin4.trace" width="0.7" x="37.74166666666666" y="19.133333333333333"/>
<circle cx="37.74166666666666" cy="19.73333333333333" fill="#fff" id="esp12e-22.front.left.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin5.trace" width="0.7" x="37.74166666666666" y="21.133333333333333"/>
<circle cx="37.74166666666666" cy="21.733333333333334" fill="#fff" id="esp12e-22.front.left.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin6.trace" width="0.7" x="37.74166666666666" y="23.133333333333333"/>
<circle cx="37.74166666666666" cy="23.733333333333334" fill="#fff" id="esp12e-22.front.left.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin7.trace" width="0.7" x="37.74166666666666" y="25.133333333333333"/>
<circle cx="37.74166666666666" cy="25.733333333333334" fill="#fff" id="esp12e-22.front.left.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.left.pin8.trace" width="0.7" x="37.74166666666666" y="27.133333333333333"/>
<circle cx="37.74166666666666" cy="27.733333333333334" fill="#fff" id="esp12e-22.front.left.pin8.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin1.trace" width="0.7" x="53.04166666666666" y="13.133333333333331"/>
<circle cx="53.74166666666666" cy="13.73333333333333" fill="#fff" id="esp12e-22.front.right.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin2.trace" width="0.7" x="53.04166666666666" y="15.133333333333331"/>
<circle cx="53.74166666666666" cy="15.73333333333333" fill="#fff" id="esp12e-22.front.right.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin3.trace" width="0.7" x="53.04166666666666" y="17.133333333333333"/>
<circle cx="53.74166666666666" cy="17.73333333333333" fill="#fff" id="esp12e-22.front.right.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin4.trace" width="0.7" x="53.04166666666666" y="19.133333333333333"/>
<circle cx="53.74166666666666" cy="19.73333333333333" fill="#fff" id="esp12e-22.front.right.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin5.trace" width="0.7" x="53.04166666666666" y="21.133333333333333"/>
<circle cx="53.74166666666666" cy="21.733333333333334" fill="#fff" id="esp12e-22.front.right.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin6.trace" width="0.7" x="53.04166666666666" y="23.133333333333333"/>
<circle cx="53.74166666666666" cy="23.733333333333334" fill="#fff" id="esp12e-22.front.right.pin6.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin7.trace" width="0.7" x="53.04166666666666" y="25.133333333333333"/>
<circle cx="53.74166666666666" cy="25.733333333333334" fill="#fff" id="esp12e-22.front.right.pin7.cast" r="0.35"/>
<rect fill="#e5b472" height="1.2" id="esp12e-22.front.right.pin8.trace" width="0.7" x="53.04166666666666" y="27.133333333333333"/>
<circle cx="53.74166666666666" cy="27.733333333333334" fill="#fff" id="esp12e-22.front.right.pin8.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin1.trace" width="1.2" x="40.19166666666666" y="28.68333333333333"/>
<circle cx="40.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin1.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin2.trace" width="1.2" x="42.19166666666666" y="28.68333333333333"/>
<circle cx="42.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin2.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin3.trace" width="1.2" x="44.19166666666666" y="28.68333333333333"/>
<circle cx="44.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin3.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin4.trace" width="1.2" x="46.19166666666666" y="28.68333333333333"/>
<circle cx="46.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin4.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin5.trace" width="1.2" x="48.19166666666666" y="28.68333333333333"/>
<circle cx="48.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin5.cast" r="0.35"/>
<rect fill="#e5b472" height="0.7" id="pins_horz6_2mm_0.7mm.pin6.trace" width="1.2" x="50.19166666666666" y="28.68333333333333"/>
<circle cx="50.79166666666666" cy="29.383333333333333" fill="#fff" id="pins_horz6_2mm_0.7mm.pin6.cast" r="0.35"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="40.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="40.49166666666666" y="31.383333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label1.anchor" width="0.0" x="40.99166666666666" y="31.483333333333334"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="42.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="40.49166666666666" y="33.38333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label2.anchor" width="0.0" x="40.99166666666666" y="33.483333333333334"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="44.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="40.49166666666666" y="35.38333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label3.anchor" width="0.0" x="40.99166666666666" y="35.483333333333334"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="46.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="46.79166666666666" y="35.38333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label4.anchor" width="0.0" x="50.49166666666666" y="35.483333333333334"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="48.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="48.79166666666666" y="33.38333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label5.anchor" width="0.0" x="50.49166666666666" y="33.483333333333334"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="50.69166666666666" y="29.58333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="50.79166666666666" y="31.383333333333333"/>
<rect height="0.0" id="esp12e-22.front.down.label6.anchor" width="0.0" x="50.49166666666666" y="31.483333333333334"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="15.8" rx="0.5" ry="0.5" width="13.6" x="38.94166666666666" y="12.333333333333332"/>
<rect fill="#fff" height="0.15" width="15.0" x="38.24166666666666" y="11.583333333333332"/>
<text fill="#fff" font-family="Consolas" font-size="1.0" x="44.74166666666666" y="10.883333333333331">WB3S</text>
<rect fill="#58839b" height="5.2" width="0.5" x="38.84166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="0.5" width="4.6" x="38.84166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="5.2" width="0.5" x="41.04166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="3.0" width="0.5" x="42.94166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="0.5" width="3.0" x="42.94166666666666" y="8.68333333333333"/>
<rect fill="#58839b" height="3.0" width="0.5" x="45.44166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="0.5" width="2.7" x="45.44166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="3.0" width="0.5" x="47.64166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="0.5" width="3.0" x="47.64166666666666" y="8.68333333333333"/>
<rect fill="#58839b" height="3.0" width="0.5" x="50.14166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="0.5" width="2.5" x="50.14166666666666" y="6.183333333333331"/>
<rect fill="#58839b" height="4.4" width="0.5" x="52.14166666666666" y="6.183333333333331"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="13.633333333333331"/>
<g transform="translate(30.856026020611555,12.93333333333333)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="13.73333333333333">CEN</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="15.633333333333331"/>
<g transform="translate(30.856026020611555,14.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="15.73333333333333">P23</text>
<g transform="translate(27.256026020611557,14.93333333333333)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.74166666666666" y="15.73333333333333">ADC3</text>
<g transform="translate(24.256026020611557,14.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.44166666666666" y="15.73333333333333">D0</text>
<g transform="translate(21.256026020611557,14.93333333333333)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.44166666666666" y="15.73333333333333">A0</text>
<g transform="translate(17.656026020611556,14.93333333333333)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="19.14166666666666" y="15.73333333333333">TDO</text>
<g transform="translate(14.056026020611556,14.93333333333333)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="15.541666666666657" y="15.73333333333333">FSO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="17.63333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="19.63333333333333"/>
<g transform="translate(30.856026020611555,18.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="19.73333333333333">P14</text>
<g transform="translate(27.85602602061156,18.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.04166666666666" y="19.73333333333333">D1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="21.633333333333333"/>
<g transform="translate(30.856026020611555,20.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="21.733333333333334">P26</text>
<g transform="translate(27.85602602061156,20.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.04166666666666" y="21.733333333333334">D2</text>
<g transform="translate(24.256026020611557,20.933333333333334)">
<rect fill="#aeafc1" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.74166666666666" y="21.733333333333334">IRDA</text>
<g transform="translate(20.65602602061156,20.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.141666666666662" y="21.733333333333334">PWM5</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="23.633333333333333"/>
<g transform="translate(30.856026020611555,22.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="23.733333333333334">P24</text>
<g transform="translate(27.85602602061156,22.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.04166666666666" y="23.733333333333334">D3</text>
<g transform="translate(24.256026020611557,22.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.74166666666666" y="23.733333333333334">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="25.633333333333333"/>
<g transform="translate(30.856026020611555,24.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="25.733333333333334">P6</text>
<g transform="translate(27.85602602061156,24.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="29.04166666666666" y="25.733333333333334">D4</text>
<g transform="translate(24.256026020611557,24.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.74166666666666" y="25.733333333333334">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="34.64166666666666" y="27.633333333333333"/>
<g transform="translate(30.856026020611555,26.933333333333334)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.34166666666666" y="27.733333333333334">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="27.633333333333333"/>
<g transform="translate(57.65602602061156,26.933333333333334)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="27.733333333333334">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="25.633333333333333"/>
<g transform="translate(57.65602602061156,24.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="25.733333333333334">P7</text>
<g transform="translate(61.256026020611564,24.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="25.733333333333334">D5</text>
<g transform="translate(64.25602602061156,24.933333333333334)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="25.733333333333334">PWM1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="23.633333333333333"/>
<g transform="translate(57.65602602061156,22.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="23.733333333333334">P0</text>
<g transform="translate(61.256026020611564,22.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="23.733333333333334">D6</text>
<g transform="translate(64.25602602061156,22.933333333333334)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="23.733333333333334">TX2</text>
<g transform="translate(67.85602602061155,22.933333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.34166666666665" y="23.733333333333334">SCL2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="21.633333333333333"/>
<g transform="translate(57.65602602061156,20.933333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="21.733333333333334">P1</text>
<g transform="translate(61.256026020611564,20.933333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="21.733333333333334">D7</text>
<g transform="translate(64.25602602061156,20.933333333333334)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="21.733333333333334">RX2</text>
<g transform="translate(67.85602602061155,20.933333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.34166666666665" y="21.733333333333334">SDA2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="19.63333333333333"/>
<g transform="translate(57.65602602061156,18.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="19.73333333333333">P9</text>
<g transform="translate(61.256026020611564,18.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="19.73333333333333">D8</text>
<g transform="translate(64.25602602061156,18.93333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="19.73333333333333">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="17.63333333333333"/>
<g transform="translate(57.65602602061156,16.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="17.73333333333333">P8</text>
<g transform="translate(61.256026020611564,16.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="17.73333333333333">D9</text>
<g transform="translate(64.25602602061156,16.93333333333333)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="17.73333333333333">PWM2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="15.633333333333331"/>
<g transform="translate(57.65602602061156,14.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="15.73333333333333">P10</text>
<g transform="translate(61.256026020611564,14.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="15.73333333333333">D10</text>
<g transform="translate(64.25602602061156,14.93333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="15.73333333333333">RX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="54.24166666666666" y="13.633333333333331"/>
<g transform="translate(57.65602602061156,12.93333333333333)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.141666666666666" y="13.73333333333333">P11</text>
<g transform="translate(61.256026020611564,12.93333333333333)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.44166666666666" y="13.73333333333333">D11</text>
<g transform="translate(64.25602602061156,12.93333333333333)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="65.74166666666666" y="13.73333333333333">TX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="37.89166666666666" y="31.383333333333333"/>
<g transform="translate(34.10602602061156,30.683333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="35.59166666666666" y="31.483333333333334">P23</text>
<g transform="translate(30.506026020611554,30.683333333333334)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="31.991666666666656" y="31.483333333333334">ADC3</text>
<g transform="translate(27.506026020611557,30.683333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.69166666666666" y="31.483333333333334">D0</text>
<g transform="translate(24.506026020611557,30.683333333333334)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.69166666666666" y="31.483333333333334">A0</text>
<g transform="translate(20.906026020611556,30.683333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="22.39166666666666" y="31.483333333333334">TDO</text>
<g transform="translate(17.306026020611554,30.683333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="18.791666666666657" y="31.483333333333334">FSO</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="37.89166666666666" y="33.38333333333333"/>
<g transform="translate(34.10602602061156,32.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="35.59166666666666" y="33.483333333333334">P22</text>
<g transform="translate(31.106026020611555,32.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.29166666666666" y="33.483333333333334">D12</text>
<g transform="translate(27.506026020611557,32.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.99166666666666" y="33.483333333333334">TDI</text>
<g transform="translate(23.906026020611556,32.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.39166666666666" y="33.483333333333334">FSI</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="37.89166666666666" y="35.38333333333333"/>
<g transform="translate(34.10602602061156,34.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="35.59166666666666" y="35.483333333333334">P21</text>
<g transform="translate(31.106026020611555,34.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.29166666666666" y="35.483333333333334">D13</text>
<g transform="translate(27.506026020611557,34.68333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="28.99166666666666" y="35.483333333333334">SDA1</text>
<g transform="translate(23.906026020611556,34.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="25.39166666666666" y="35.483333333333334">TMS</text>
<g transform="translate(20.306026020611558,34.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="middle" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="21.79166666666666" y="34.47083333333334">___</text>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="21.79166666666666" y="35.58958333333334">FCS</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="50.99166666666666" y="35.38333333333333"/>
<g transform="translate(54.40602602061156,34.68333333333334)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="55.891666666666666" y="35.483333333333334">P20</text>
<g transform="translate(58.006026020611564,34.68333333333334)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="59.19166666666666" y="35.483333333333334">D14</text>
<g transform="translate(61.006026020611564,34.68333333333334)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="62.49166666666667" y="35.483333333333334">SCL1</text>
<g transform="translate(64.60602602061155,34.68333333333334)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="66.09166666666665" y="35.483333333333334">TCK</text>
<g transform="translate(68.20602602061156,34.68333333333334)">
<rect fill="#f68a1e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="69.69166666666666" y="35.483333333333334">FSCK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="50.99166666666666" y="33.38333333333333"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="50.99166666666666" y="31.383333333333333"/>
</svg>

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

42
boards/wb3s/variant.cpp Normal file
View File

@@ -0,0 +1,42 @@
/* This file was auto-generated from wb3s.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P23, ADC3, TDO, FSO
{GPIO23, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_JTAG, PIN_NONE, 0},
// D1: P14, SD_CLK, SCK
{GPIO14, PIN_GPIO | PIN_IRQ | PIN_SPI, PIN_NONE, 0},
// D2: P26, PWM5, IRDA
{GPIO26, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: P24, PWM4
{GPIO24, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D4: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D5: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D6: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D7: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D8: P9, PWM3
{GPIO9, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D9: P8, PWM2
{GPIO8, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D10: P10, UART1_RX
{GPIO10, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D11: P11, UART1_TX
{GPIO11, PIN_GPIO | PIN_IRQ | PIN_UART, PIN_NONE, 0},
// D12: P22, TDI, FSI
{GPIO22, PIN_GPIO | PIN_IRQ | PIN_JTAG, PIN_NONE, 0},
// D13: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
// D14: P20, I2C1_SCL, TCK, FSCK
{GPIO20, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_JTAG, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

41
boards/wb3s/variant.h Normal file
View File

@@ -0,0 +1,41 @@
/* This file was auto-generated from wb3s.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 15
#define NUM_DIGITAL_PINS 15
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 0u // GPIO23
#define PIN_A0 0u // GPIO23
#define A0 PIN_A0
#define A0 PIN_A0
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE1_SCL 14u // GPIO20
#define PIN_WIRE1_SDA 13u // GPIO21
#define PIN_WIRE2_SCL 6u // GPIO0
#define PIN_WIRE2_SDA 7u // GPIO1
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 2
#define PIN_SERIAL1_RX 10u // GPIO10
#define PIN_SERIAL1_TX 11u // GPIO11
#define PIN_SERIAL2_RX 7u // GPIO1
#define PIN_SERIAL2_TX 6u // GPIO0

19
boards/wr2.json Normal file
View File

@@ -0,0 +1,19 @@
{
"_base": [
"realtek-ambz",
"realtek-ambz-2mb-788k",
"pcb/ic-rtl8710bn",
"pcb/wr2-base",
"pcb/wr2"
],
"build": {
"mcu": "rtl8710bn",
"variant": "wr2"
},
"name": "WR2 Wi-Fi Module",
"url": "https://developer.tuya.com/en/docs/iot/wifiwr2module?id=K9605tko0juc3",
"vendor": "Tuya Inc.",
"pcb": {
"symbol": "WR2"
}
}

62
boards/wr2/README.md Normal file
View File

@@ -0,0 +1,62 @@
# WR2 Wi-Fi Module
*by Tuya Inc.*
[Product page](https://developer.tuya.com/en/docs/iot/wifiwr2module?id=K9605tko0juc3)
- [General info](../../docs/platform/realtek/README.md)
- [Debugging](../../docs/platform/realtek/debugging.md)
- [Flashing guide](../../docs/platform/realtek-ambz/flashing.md)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
Parameter | Value
-------------|---------------------------------
MCU | RTL8710BN
Manufacturer | Realtek
Series | AmebaZ
Frequency | 125 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 7x GPIO, 5x PWM, 1x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
## Pinout
![Pinout](pinout_wr2.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|------|----------|----------|----------------------|------|------
D0 | PA12 | | | | PWM3 |
D1 | PA00 | | | | PWM2 |
D2 | PA05 | | | | PWM4 |
D4 | PA18 | UART0_RX | I2C1_SCL | SPI0_SCK, SPI1_SCK | |
D5 | PA23 | UART0_TX | I2C1_SDA | SPI0_MOSI, SPI1_MOSI | PWM0 |
D6 | PA14 | | | | PWM0 | SWCLK
D7 | PA15 | | | | PWM1 | SWDIO
A1 | ADC2 | | | | |
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Boot XIP | 0x000000 | 16 KiB / 0x4000 | 0x004000
Boot RAM | 0x004000 | 16 KiB / 0x4000 | 0x008000
(reserved) | 0x008000 | 4 KiB / 0x1000 | 0x009000
System Data | 0x009000 | 4 KiB / 0x1000 | 0x00A000
Calibration | 0x00A000 | 4 KiB / 0x1000 | 0x00B000
OTA1 Image | 0x00B000 | 788 KiB / 0xC5000 | 0x0D0000
OTA2 Image | 0x0D0000 | 788 KiB / 0xC5000 | 0x195000
Key-Value Store | 0x195000 | 24 KiB / 0x6000 | 0x19B000
User Data | 0x19B000 | 400 KiB / 0x64000 | 0x1FF000
RDP | 0x1FF000 | 4 KiB / 0x1000 | 0x200000
RDP is most likely not used in Tuya firmwares, as the System Data partition contains an incorrect offset 0xFF000 for RDP, which is in the middle of OTA2 image.
Additionally, Tuya firmware uses an encrypted KV or file storage, which resides at the end of flash memory. This seems to overlap system RDP area.

224
boards/wr2/pinout_wr2.svg Normal file
View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,97.52380952380952,47.61904761904762" width="1024">
<defs/>
<rect fill="white" height="47.61904761904762" stroke="black" stroke-width="0.1" width="97.52380952380952" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id1) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="15.930952380952377" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="15.880952380952376" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="17.480952380952377" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="15.780952380952376" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="29.180952380952377" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="29.180952380952377" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="29.280952380952378" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="18.880952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="20.880952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="22.880952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="24.880952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="26.880952380952376" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="19.280952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="19.080952380952375" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label1.anchor" width="0.0" x="19.580952380952375" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="21.280952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="19.080952380952375" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label2.anchor" width="0.0" x="19.580952380952375" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="23.280952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="19.080952380952375" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label3.anchor" width="0.0" x="19.580952380952375" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="25.280952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="25.380952380952376" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label4.anchor" width="0.0" x="29.080952380952375" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="27.280952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="27.380952380952376" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label5.anchor" width="0.0" x="29.080952380952375" y="33.40952380952381"/>
<text fill="#fff" font-family="Consolas" font-size="1.0" x="22.880952380952376" y="16.40952380952381">WR2</text>
<rect fill="#58839b" height="5.2" width="0.5" x="16.680952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="4.6" x="16.680952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="5.2" width="0.5" x="18.880952380952376" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="20.780952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="20.780952380952378" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="23.280952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.7" x="23.280952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="25.480952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="25.480952380952374" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="27.980952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.5" x="27.980952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="4.4" width="0.5" x="29.980952380952374" y="11.90952380952381"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="8.0" rx="0.5" ry="0.5" width="14.4" x="16.180952380952377" y="17.40952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.580952380952375" y="33.30952380952381"/>
<g transform="translate(32.99531173489728,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="34.48095238095238" y="33.40952380952381">PA12</text>
<g transform="translate(36.59531173489728,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="37.78095238095238" y="33.40952380952381">D0</text>
<g transform="translate(39.59531173489728,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="41.08095238095238" y="33.40952380952381">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.580952380952375" y="35.30952380952381"/>
<g transform="translate(32.99531173489728,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="34.48095238095238" y="35.40952380952381">PA00</text>
<g transform="translate(36.59531173489728,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="37.78095238095238" y="35.40952380952381">D1</text>
<g transform="translate(39.59531173489728,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="41.08095238095238" y="35.40952380952381">PWM2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.480952380952374" y="35.30952380952381"/>
<g transform="translate(12.695311734897274,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="14.180952380952375" y="35.40952380952381">PA05</text>
<g transform="translate(9.695311734897274,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="10.880952380952376" y="35.40952380952381">D2</text>
<g transform="translate(6.095311734897274,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="7.580952380952376" y="35.40952380952381">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.480952380952374" y="33.30952380952381"/>
<g transform="translate(12.695311734897274,32.609523809523814)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="14.180952380952375" y="33.40952380952381">ADC2</text>
<g transform="translate(9.695311734897274,32.609523809523814)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="10.880952380952376" y="33.40952380952381">A1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.480952380952374" y="31.30952380952381"/>
<g transform="translate(12.695311734897274,30.60952380952381)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="14.180952380952375" y="31.40952380952381">CEN</text>
<linearGradient gradientUnits="objectBoundingBox" id="id3" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id3) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="63.942857142857136" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="63.89285714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="65.49285714285713" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="63.79285714285714" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="77.19285714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="77.19285714285714" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="77.29285714285714" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="65.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="67.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="69.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="71.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="73.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin6.pad" rx="0.2" ry="0.2" width="1.0" x="75.84285714285714" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="66.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="66.04285714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label1.anchor" width="0.0" x="66.54285714285714" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="68.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="66.04285714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label2.anchor" width="0.0" x="66.54285714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="70.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="66.04285714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label3.anchor" width="0.0" x="66.54285714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="72.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="72.34285714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label4.anchor" width="0.0" x="76.04285714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="74.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="74.34285714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label5.anchor" width="0.0" x="76.04285714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="76.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="76.34285714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label6.anchor" width="0.0" x="76.04285714285714" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="31.30952380952381"/>
<g transform="translate(59.657216496802036,30.60952380952381)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="31.40952380952381">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="33.30952380952381"/>
<g transform="translate(59.657216496802036,32.609523809523814)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="33.40952380952381">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="35.30952380952381"/>
<g transform="translate(59.657216496802036,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="35.40952380952381">PA18</text>
<g transform="translate(56.65721649680204,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="57.84285714285714" y="35.40952380952381">D4</text>
<g transform="translate(53.05721649680204,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.542857142857144" y="35.40952380952381">RX0</text>
<g transform="translate(49.45721649680204,34.609523809523814)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="50.94285714285714" y="35.40952380952381">SCL1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="35.30952380952381"/>
<g transform="translate(79.95721649680203,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="35.40952380952381">PA23</text>
<g transform="translate(83.55721649680203,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="35.40952380952381">D5</text>
<g transform="translate(86.55721649680203,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="35.40952380952381">TX0</text>
<g transform="translate(90.15721649680204,34.609523809523814)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="35.40952380952381">SDA1</text>
<g transform="translate(93.75721649680204,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="95.24285714285715" y="35.40952380952381">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="33.30952380952381"/>
<g transform="translate(79.95721649680203,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="33.40952380952381">PA14</text>
<g transform="translate(83.55721649680203,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="33.40952380952381">D6</text>
<g transform="translate(86.55721649680203,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="33.40952380952381">PWM0</text>
<g transform="translate(90.15721649680204,32.609523809523814)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="33.40952380952381">SWCLK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="31.30952380952381"/>
<g transform="translate(79.95721649680203,30.60952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="31.40952380952381">PA15</text>
<g transform="translate(83.55721649680203,30.60952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="31.40952380952381">D7</text>
<g transform="translate(86.55721649680203,30.60952380952381)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="31.40952380952381">PWM1</text>
<g transform="translate(90.15721649680204,30.60952380952381)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="31.40952380952381">SWDIO</text>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

28
boards/wr2/variant.cpp Normal file
View File

@@ -0,0 +1,28 @@
/* This file was auto-generated from wr2.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: PA12, PWM3
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: PA00, PWM2
{PA_0, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D2: PA05, PWM4, WAKE1
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D4: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D5: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D6: PA14, PWM0, SWCLK
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D7: PA15, PWM1, SWDIO
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// A1: ADC2
{AD_2, PIN_ADC, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

35
boards/wr2/variant.h Normal file
View File

@@ -0,0 +1,35 @@
/* This file was auto-generated from wr2.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 8
#define NUM_DIGITAL_PINS 7
#define NUM_ANALOG_INPUTS 1
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A1 7u // AD_2
#define A1 PIN_A1
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE1_SCL 3u // PA_18
#define PIN_WIRE1_SDA 4u // PA_23
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 1
#define PIN_SERIAL0_RX 3u // PA_18
#define PIN_SERIAL0_TX 4u // PA_23

19
boards/wr2e.json Normal file
View File

@@ -0,0 +1,19 @@
{
"_base": [
"realtek-ambz",
"realtek-ambz-2mb-788k",
"pcb/ic-rtl8710bn",
"pcb/wr2-base",
"pcb/wr2e"
],
"build": {
"mcu": "rtl8710bn",
"variant": "wr2e"
},
"name": "WR2E Wi-Fi Module",
"url": "https://developer.tuya.com/en/docs/iot/wr2e?id=K97scnsjhue4h",
"vendor": "Tuya Inc.",
"pcb": {
"symbol": "WR2E"
}
}

63
boards/wr2e/README.md Normal file
View File

@@ -0,0 +1,63 @@
# WR2E Wi-Fi Module
*by Tuya Inc.*
[Product page](https://developer.tuya.com/en/docs/iot/wr2e?id=K97scnsjhue4h)
- [General info](../../docs/platform/realtek/README.md)
- [Debugging](../../docs/platform/realtek/debugging.md)
- [Flashing guide](../../docs/platform/realtek-ambz/flashing.md)
- [ImageTool (AmebaZ/AmebaD)](https://images.tuyacn.com/smart/Image_Tool/Image_Tool.zip)
Parameter | Value
-------------|---------------------------------
MCU | RTL8710BN
Manufacturer | Realtek
Series | AmebaZ
Frequency | 125 MHz
Flash size | 2 MiB
RAM size | 256 KiB
Voltage | 3.0V - 3.6V
I/O | 7x GPIO, 4x PWM, 1x UART, 2x ADC
Wi-Fi | 802.11 b/g/n
## Pinout
![Pinout](pinout_wr2e.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|------------|-----------|----------|----------------------|------|------
D0 | PA12 | | | | PWM3 |
D1 | PA19 | UART0_CTS | I2C0_SDA | SPI0_CS, SPI1_CS | |
D2 | PA05 | | | | PWM4 |
D3 | PA18 | UART0_RX | I2C1_SCL | SPI0_SCK, SPI1_SCK | |
D4 | PA23 | UART0_TX | I2C1_SDA | SPI0_MOSI, SPI1_MOSI | PWM0 |
D5 | PA14 | | | | PWM0 | SWCLK
D6 | PA15 | | | | PWM1 | SWDIO
A0 | PA19, ADC1 | | | | |
A1 | ADC2 | | | | |
## Flash memory map
Flash size: 2 MiB / 2,097,152 B / 0x200000
Hex values are in bytes.
Name | Start | Length | End
----------------|----------|-------------------|---------
Boot XIP | 0x000000 | 16 KiB / 0x4000 | 0x004000
Boot RAM | 0x004000 | 16 KiB / 0x4000 | 0x008000
(reserved) | 0x008000 | 4 KiB / 0x1000 | 0x009000
System Data | 0x009000 | 4 KiB / 0x1000 | 0x00A000
Calibration | 0x00A000 | 4 KiB / 0x1000 | 0x00B000
OTA1 Image | 0x00B000 | 788 KiB / 0xC5000 | 0x0D0000
OTA2 Image | 0x0D0000 | 788 KiB / 0xC5000 | 0x195000
Key-Value Store | 0x195000 | 24 KiB / 0x6000 | 0x19B000
User Data | 0x19B000 | 400 KiB / 0x64000 | 0x1FF000
RDP | 0x1FF000 | 4 KiB / 0x1000 | 0x200000
RDP is most likely not used in Tuya firmwares, as the System Data partition contains an incorrect offset 0xFF000 for RDP, which is in the middle of OTA2 image.
Additionally, Tuya firmware uses an encrypted KV or file storage, which resides at the end of flash memory. This seems to overlap system RDP area.

228
boards/wr2e/pinout_wr2e.svg Normal file
View File

@@ -0,0 +1,228 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="500" version="1.1" viewBox="0,0,97.52380952380952,47.61904761904762" width="1024">
<defs/>
<rect fill="white" height="47.61904761904762" stroke="black" stroke-width="0.1" width="97.52380952380952" x="0" y="0"/>
<linearGradient gradientUnits="objectBoundingBox" id="id1" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id1) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="14.430952380952377" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="14.380952380952376" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="15.980952380952376" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="14.280952380952376" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="27.680952380952377" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="27.680952380952377" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="27.780952380952378" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="17.380952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="19.380952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="21.380952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="23.380952380952376" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="25.380952380952376" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="17.780952380952375" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="17.580952380952375" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label1.anchor" width="0.0" x="18.080952380952375" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="19.780952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="17.580952380952375" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label2.anchor" width="0.0" x="18.080952380952375" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="21.780952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="17.580952380952375" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label3.anchor" width="0.0" x="18.080952380952375" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="23.780952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="23.880952380952376" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label4.anchor" width="0.0" x="27.580952380952375" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="25.780952380952378" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="25.880952380952376" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.front.pins.label5.anchor" width="0.0" x="27.580952380952375" y="33.40952380952381"/>
<text fill="#fff" font-family="Consolas" font-size="1.0" x="21.380952380952376" y="16.40952380952381">WR2E</text>
<rect fill="#58839b" height="5.2" width="0.5" x="15.180952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="4.6" x="15.180952380952377" y="11.90952380952381"/>
<rect fill="#58839b" height="5.2" width="0.5" x="17.380952380952376" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="19.280952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="19.280952380952378" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="21.780952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.7" x="21.780952380952378" y="11.90952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="23.980952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="3.0" x="23.980952380952374" y="14.40952380952381"/>
<rect fill="#58839b" height="3.0" width="0.5" x="26.480952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="0.5" width="2.5" x="26.480952380952374" y="11.90952380952381"/>
<rect fill="#58839b" height="4.4" width="0.5" x="28.480952380952374" y="11.90952380952381"/>
<linearGradient gradientUnits="objectBoundingBox" id="id2" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="whitesmoke"/>
<stop offset="100%" stop-color="#999"/>
</linearGradient>
<rect fill="url(#id2) none" height="8.0" rx="0.5" ry="0.5" width="14.4" x="14.680952380952377" y="17.40952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="28.080952380952375" y="33.30952380952381"/>
<g transform="translate(31.495311734897275,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.98095238095238" y="33.40952380952381">PA12</text>
<g transform="translate(35.09531173489728,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="36.28095238095238" y="33.40952380952381">D0</text>
<g transform="translate(38.09531173489728,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="39.58095238095238" y="33.40952380952381">PWM3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="28.080952380952375" y="35.30952380952381"/>
<g transform="translate(31.495311734897275,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="32.98095238095238" y="35.40952380952381">PA19</text>
<g transform="translate(35.09531173489728,34.609523809523814)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="36.58095238095238" y="35.40952380952381">ADC1</text>
<g transform="translate(38.69531173489728,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="39.88095238095238" y="35.40952380952381">D1</text>
<g transform="translate(41.69531173489728,34.609523809523814)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="42.88095238095238" y="35.40952380952381">A0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="14.980952380952376" y="35.30952380952381"/>
<g transform="translate(11.195311734897274,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="12.680952380952375" y="35.40952380952381">PA05</text>
<g transform="translate(8.195311734897274,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="9.380952380952376" y="35.40952380952381">D2</text>
<g transform="translate(4.595311734897274,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="6.080952380952376" y="35.40952380952381">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="14.980952380952376" y="33.30952380952381"/>
<g transform="translate(11.195311734897274,32.609523809523814)">
<rect fill="#8ad039" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="12.680952380952375" y="33.40952380952381">ADC2</text>
<g transform="translate(8.195311734897274,32.609523809523814)">
<rect fill="#16a352" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="9.380952380952376" y="33.40952380952381">A1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="14.980952380952376" y="31.30952380952381"/>
<g transform="translate(11.195311734897274,30.60952380952381)">
<rect fill="#ed602e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="12.680952380952375" y="31.40952380952381">CEN</text>
<linearGradient gradientUnits="objectBoundingBox" id="id3" x1="1.0" x2="0.0" y1="0.0" y2="1.0">
<stop offset="0%" stop-color="#47a8cd"/>
<stop offset="100%" stop-color="#008fb5"/>
</linearGradient>
<rect fill="url(#id3) none" height="17.799999999999997" stroke="#b5a739" stroke-width="0.1" width="14.9" x="63.942857142857136" y="11.45952380952381"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="63.89285714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="65.49285714285713" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="63.79285714285714" y="25.859523809523807"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="77.19285714285714" y="25.75952380952381"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="77.19285714285714" y="25.75952380952381"/>
<rect fill="#fff" height="3.55" width="1.7" x="77.29285714285714" y="25.859523809523807"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="65.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="67.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="69.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="71.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="73.84285714285714" y="26.45952380952381"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin6.pad" rx="0.2" ry="0.2" width="1.0" x="75.84285714285714" y="26.45952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="66.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="66.04285714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label1.anchor" width="0.0" x="66.54285714285714" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="68.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="66.04285714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label2.anchor" width="0.0" x="66.54285714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="70.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="66.04285714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label3.anchor" width="0.0" x="66.54285714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="72.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="72.34285714285714" y="35.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label4.anchor" width="0.0" x="76.04285714285714" y="35.40952380952381"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="74.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="74.34285714285714" y="33.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label5.anchor" width="0.0" x="76.04285714285714" y="33.40952380952381"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="76.24285714285713" y="29.509523809523806"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="76.34285714285714" y="31.30952380952381"/>
<rect height="0.0" id="tuya2.back.pins.label6.anchor" width="0.0" x="76.04285714285714" y="31.40952380952381"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="31.30952380952381"/>
<g transform="translate(59.657216496802036,30.60952380952381)">
<rect fill="#cd3c24" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="31.40952380952381">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="33.30952380952381"/>
<g transform="translate(59.657216496802036,32.609523809523814)">
<rect fill="#000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="33.40952380952381">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="63.44285714285714" y="35.30952380952381"/>
<g transform="translate(59.657216496802036,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="61.14285714285714" y="35.40952380952381">PA18</text>
<g transform="translate(56.65721649680204,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="57.84285714285714" y="35.40952380952381">D3</text>
<g transform="translate(53.05721649680204,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="54.542857142857144" y="35.40952380952381">RX0</text>
<g transform="translate(49.45721649680204,34.609523809523814)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="50.94285714285714" y="35.40952380952381">SCL1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="35.30952380952381"/>
<g transform="translate(79.95721649680203,34.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="35.40952380952381">PA23</text>
<g transform="translate(83.55721649680203,34.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="35.40952380952381">D4</text>
<g transform="translate(86.55721649680203,34.609523809523814)">
<rect fill="#dcd4ee" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="35.40952380952381">TX0</text>
<g transform="translate(90.15721649680204,34.609523809523814)">
<rect fill="#f95" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="35.40952380952381">SDA1</text>
<g transform="translate(93.75721649680204,34.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="95.24285714285715" y="35.40952380952381">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="33.30952380952381"/>
<g transform="translate(79.95721649680203,32.609523809523814)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="33.40952380952381">PA14</text>
<g transform="translate(83.55721649680203,32.609523809523814)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="33.40952380952381">D5</text>
<g transform="translate(86.55721649680203,32.609523809523814)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="33.40952380952381">PWM0</text>
<g transform="translate(90.15721649680204,32.609523809523814)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="33.40952380952381">SWCLK</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="76.54285714285714" y="31.30952380952381"/>
<g transform="translate(79.95721649680203,30.60952380952381)">
<rect fill="#800000" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="81.44285714285714" y="31.40952380952381">PA15</text>
<g transform="translate(83.55721649680203,30.60952380952381)">
<rect fill="#99188d" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="2.8" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="white" font-family="Consolas" font-size="1.2" text-anchor="middle" x="84.74285714285713" y="31.40952380952381">D6</text>
<g transform="translate(86.55721649680203,30.60952380952381)">
<rect fill="#afa35e" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="88.04285714285713" y="31.40952380952381">PWM1</text>
<g transform="translate(90.15721649680204,30.60952380952381)">
<rect fill="#ffe680" height="1.6" rx="0.3" ry="0.3" transform="skewX(-15)" width="3.4" x="0" y="0"/>
</g>
<text dominant-baseline="central" fill="#423F42" font-family="Consolas" font-size="1.2" text-anchor="middle" x="91.64285714285714" y="31.40952380952381">SWDIO</text>
</svg>

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1 @@
#include "variant.h"

28
boards/wr2e/variant.cpp Normal file
View File

@@ -0,0 +1,28 @@
/* This file was auto-generated from wr2e.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: PA12, PWM3
{PA_12, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: PA19, ADC1, UART0_CTS, SPI0_CS, SPI1_CS, I2C0_SDA, SD_D3, TMR5_TRIG, I2S0_TX
{PA_19, PIN_GPIO | PIN_IRQ | PIN_ADC | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D2: PA05, PWM4, WAKE1
{PA_5, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D3: PA18, UART0_RX, SPI0_SCK, SPI1_SCK, I2C1_SCL, SD_D2, TMR4_TRIG, I2S0_MCK, WAKE0
{PA_18, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D4: PA23, UART0_TX, SPI0_MOSI, SPI1_MOSI, I2C1_SDA, SD_D1, PWM0, WAKE3
{PA_23, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_I2C | PIN_SPI | PIN_UART, PIN_NONE, 0},
// D5: PA14, PWM0, SWCLK
{PA_14, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// D6: PA15, PWM1, SWDIO
{PA_15, PIN_GPIO | PIN_IRQ | PIN_PWM | PIN_SWD, PIN_NONE, 0},
// A1: ADC2
{AD_2, PIN_ADC, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

38
boards/wr2e/variant.h Normal file
View File

@@ -0,0 +1,38 @@
/* This file was auto-generated from wr2e.json using boardgen */
#pragma once
#include <WVariant.h>
// clang-format off
// Pins
// ----
#define PINS_COUNT 8
#define NUM_DIGITAL_PINS 7
#define NUM_ANALOG_INPUTS 2
#define NUM_ANALOG_OUTPUTS 0
// Analog pins
// -----------
#define PIN_A0 1u // PA_19
#define PIN_A1 7u // AD_2
#define A0 PIN_A0
#define A1 PIN_A1
// SPI Interfaces
// --------------
#define SPI_INTERFACES_COUNT 0
// Wire Interfaces
// ---------------
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE1_SCL 3u // PA_18
#define PIN_WIRE1_SDA 4u // PA_23
// Serial ports
// ------------
#define SERIAL_INTERFACES_COUNT 1
#define PIN_SERIAL0_CTS 1u // PA_19
#define PIN_SERIAL0_RX 3u // PA_18
#define PIN_SERIAL0_TX 4u // PA_23

Some files were not shown because too many files have changed in this diff Show More