[boards] Add CB2S board definition

This commit is contained in:
Kuba Szczodrzyński
2022-07-07 14:57:35 +02:00
parent 15facd8866
commit 02f972bd5f
19 changed files with 628 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
<!-- This file is auto-generated -->
- [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)
- [Generic - Host-native](../boards/generic-native/README.md)

View File

@@ -0,0 +1,24 @@
{
"build": {
"bkcrypt_coeffs": "510fb093a3cbeadc5993a17ec7adeb03",
"bkboot_version": "1.0.1-bk7231n",
"bkrbl_size_app": "0x107800"
},
"flash": {
"bootloader": "0x000000+0x11000",
"app": "0x011000+0x119000",
"download": "0x12A000+0xA6000",
"tlv": "0x1D0000+0x1000",
"net": "0x1D1000+0x2000",
"kvs": "0x1D3000+0x8000",
"userdata": "0x1DB000+0x25000"
},
"upload": {
"maximum_size": 1083136
},
"doc": {
"extra": [
"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,14 @@
{
"build": {
"family": "BK7231N",
"ldscript_sdk": "TBD.ld",
"ldscript_arduino": "TBD.ld"
},
"doc": {
"params": {
"extra": {
"Bluetooth": "BLE v5.1"
}
}
}
}

View File

@@ -0,0 +1,60 @@
{
"pcb": {
"scale": 11,
"test_pads": {
"TTX2": "cb2s.back.u2_txd.anchor",
"TRX2": "cb2s.back.u2_rxd.anchor",
"TCSN": "cb2s.back.csn.anchor"
},
"back": [
{
"type": "rect",
"pos": "6.0,8.9",
"size": "2.9,2.9",
"preset": "copper1"
},
{
"id": "u2_txd",
"name": "label_line_2mm_up",
"pos": "6.7,6.1",
"vars": {
"DIR": "left",
"W": 2.5,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "7.5,6.0"
},
{
"id": "u2_rxd",
"name": "label_line_2mm_up",
"pos": "6.2,8.1",
"vars": {
"DIR": "left",
"W": 2.0,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "7.0,8.0"
},
{
"id": "csn",
"name": "label_line_2mm_up",
"pos": "4.2,11.1",
"vars": {
"DIR": "left",
"W": 0,
"H": 0
}
},
{
"name": "test_pad_1mm",
"pos": "5.0,11.0"
}
]
}
}

View File

@@ -0,0 +1,74 @@
{
"pcb": {
"templates": [
"tuya2",
"rf-15mm-type1",
"tuya2-shield"
],
"vars": {
"MASK_PRESET": "mask_blue_light",
"TRACE_COLOR": "#58839B",
"SILK_COLOR": "white",
"PINTYPE_HORZ": "pin_horz_2mm_cast_hole"
},
"pinout_hidden": "I2S,JTAG,FLASH",
"pinout": {
"1": {
"PWR": 3.3
},
"2": {
"IC": 22,
"ARD": "D0"
},
"3": {
"GND": null
},
"4": {
"IC": 23,
"ARD": "D1"
},
"5": {
"IC": 26,
"ARD": "D4"
},
"6": {
"IC": 24,
"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"
},
"TRX2": {
"IC": 28,
"ARD": "D9"
},
"TTX2": {
"IC": 29,
"ARD": "D8"
},
"TCSN": {
"IC": 19,
"ARD": "D10"
}
}
}
}

20
boards/cb2s.json Normal file
View File

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

61
boards/cb2s/README.md Normal file
View File

@@ -0,0 +1,61 @@
# CB2S Wi-Fi Module
*by Tuya Inc.*
[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)
- [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 | 11x GPIO, 5x PWM, 2x UART, 1x ADC
Wi-Fi | 802.11 b/g/n
Bluetooth | BLE v5.1
## Pinout
![Pinout](pinout_cb2s.svg)
## Arduino Core pin mapping
No. | Pin | UART | I²C | SPI | PWM | Other
----|-----------|----------|----------|-----|------|------
D0 | P6 | | | | PWM0 |
D1 | P7 | | | | PWM1 |
D2 | P8 | | | | PWM2 |
D3 | P23 | | | | | TDO
D4 | P10 | UART1_RX | | | |
D5 | P11 | UART1_TX | | | |
D6 | P24 | | | | PWM4 |
D7 | P26 | | | | PWM5 |
D8 | P0 | UART2_TX | I2C2_SCL | | |
D9 | P1 | UART2_RX | I2C2_SDA | | |
D10 | P21 | | I2C1_SDA | | | TMS
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.

276
boards/cb2s/pinout_cb2s.svg Normal file
View File

@@ -0,0 +1,276 @@
<?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,93.0909090909091,45.45454545454545" width="1024">
<defs/>
<rect fill="white" height="45.45454545454545" stroke="black" stroke-width="0.1" width="93.0909090909091" 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="16.32272727272727" y="10.377272727272727"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="16.27272727272727" y="24.677272727272726"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="17.87272727272727" y="24.677272727272726"/>
<rect fill="#fff" height="3.55" width="1.7" x="16.17272727272727" y="24.777272727272724"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="29.57272727272727" y="24.677272727272726"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="29.57272727272727" y="24.677272727272726"/>
<rect fill="#fff" height="3.55" width="1.7" x="29.672727272727272" y="24.777272727272724"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="19.27272727272727" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="21.27272727272727" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="23.27272727272727" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="25.27272727272727" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz5_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="27.27272727272727" y="25.377272727272725"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="19.67272727272727" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="19.47272727272727" y="30.227272727272727"/>
<rect height="0.0" id="tuya2.front.pins.label1.anchor" width="0.0" x="19.97272727272727" y="30.327272727272728"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="21.672727272727272" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="19.47272727272727" y="32.22727272727273"/>
<rect height="0.0" id="tuya2.front.pins.label2.anchor" width="0.0" x="19.97272727272727" y="32.32727272727273"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="23.672727272727272" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="19.47272727272727" y="34.22727272727273"/>
<rect height="0.0" id="tuya2.front.pins.label3.anchor" width="0.0" x="19.97272727272727" y="34.32727272727273"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="25.672727272727272" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="25.77272727272727" y="34.22727272727273"/>
<rect height="0.0" id="tuya2.front.pins.label4.anchor" width="0.0" x="29.47272727272727" y="34.32727272727273"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="27.672727272727272" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="27.77272727272727" y="32.22727272727273"/>
<rect height="0.0" id="tuya2.front.pins.label5.anchor" width="0.0" x="29.47272727272727" y="32.32727272727273"/>
<text fill="#fff" font-family="Consolas" font-size="1.0" x="23.27272727272727" y="15.327272727272726">CB2S</text>
<rect fill="#58839b" height="5.2" width="0.5" x="17.07272727272727" y="10.827272727272726"/>
<rect fill="#58839b" height="0.5" width="4.6" x="17.07272727272727" y="10.827272727272726"/>
<rect fill="#58839b" height="5.2" width="0.5" x="19.27272727272727" y="10.827272727272726"/>
<rect fill="#58839b" height="3.0" width="0.5" x="21.172727272727272" y="10.827272727272726"/>
<rect fill="#58839b" height="0.5" width="3.0" x="21.172727272727272" y="13.327272727272726"/>
<rect fill="#58839b" height="3.0" width="0.5" x="23.672727272727272" y="10.827272727272726"/>
<rect fill="#58839b" height="0.5" width="2.7" x="23.672727272727272" y="10.827272727272726"/>
<rect fill="#58839b" height="3.0" width="0.5" x="25.872727272727268" y="10.827272727272726"/>
<rect fill="#58839b" height="0.5" width="3.0" x="25.872727272727268" y="13.327272727272726"/>
<rect fill="#58839b" height="3.0" width="0.5" x="28.372727272727268" y="10.827272727272726"/>
<rect fill="#58839b" height="0.5" width="2.5" x="28.372727272727268" y="10.827272727272726"/>
<rect fill="#58839b" height="4.4" width="0.5" x="30.372727272727268" y="10.827272727272726"/>
<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.57272727272727" y="16.327272727272728"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.97272727272727" y="32.22727272727273"/>
<g transform="translate(33.38708662667217,31.527272727272727)">
<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.872727272727275" y="32.32727272727273">P6</text>
<g transform="translate(36.98708662667217,31.527272727272727)">
<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="38.17272727272727" y="32.32727272727273">D0</text>
<g transform="translate(39.98708662667217,31.527272727272727)">
<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.472727272727276" y="32.32727272727273">PWM0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="29.97272727272727" y="34.22727272727273"/>
<g transform="translate(33.38708662667217,33.52727272727273)">
<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.872727272727275" y="34.32727272727273">P7</text>
<g transform="translate(36.98708662667217,33.52727272727273)">
<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="38.17272727272727" y="34.32727272727273">D1</text>
<g transform="translate(39.98708662667217,33.52727272727273)">
<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.472727272727276" y="34.32727272727273">PWM1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.872727272727268" y="34.22727272727273"/>
<g transform="translate(13.087086626672166,33.52727272727273)">
<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.572727272727267" y="34.32727272727273">P8</text>
<g transform="translate(10.087086626672168,33.52727272727273)">
<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="11.27272727272727" y="34.32727272727273">D2</text>
<g transform="translate(6.487086626672168,33.52727272727273)">
<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.97272727272727" y="34.32727272727273">PWM2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.872727272727268" y="32.22727272727273"/>
<g transform="translate(13.08708662667217,31.527272727272727)">
<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.57272727272727" y="32.32727272727273">P23</text>
<g transform="translate(9.487086626672168,31.527272727272727)">
<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="10.972727272727269" y="32.32727272727273">ADC3</text>
<g transform="translate(6.487086626672168,31.527272727272727)">
<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="7.67272727272727" y="32.32727272727273">D3</text>
<g transform="translate(3.4870866266721685,31.527272727272727)">
<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="4.67272727272727" y="32.32727272727273">A0</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="16.872727272727268" y="30.227272727272727"/>
<g transform="translate(13.08708662667217,29.527272727272727)">
<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.57272727272727" y="30.327272727272728">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="61.543181818181814" y="10.377272727272727"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="61.49318181818182" y="24.677272727272726"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="63.09318181818182" y="24.677272727272726"/>
<rect fill="#fff" height="3.55" width="1.7" x="61.393181818181816" y="24.777272727272724"/>
<rect fill="#b5a739" height="0.1" width="1.6" x="74.79318181818182" y="24.677272727272726"/>
<rect fill="#b5a739" height="3.45" width="0.1" x="74.79318181818182" y="24.677272727272726"/>
<rect fill="#fff" height="3.55" width="1.7" x="74.89318181818182" y="24.777272727272724"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin1.pad" rx="0.2" ry="0.2" width="1.0" x="63.44318181818182" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin2.pad" rx="0.2" ry="0.2" width="1.0" x="65.44318181818181" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin3.pad" rx="0.2" ry="0.2" width="1.0" x="67.44318181818181" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin4.pad" rx="0.2" ry="0.2" width="1.0" x="69.44318181818181" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin5.pad" rx="0.2" ry="0.2" width="1.0" x="71.44318181818181" y="25.377272727272725"/>
<rect fill="#e5b472" height="2.5" id="pads_horz6_2mm.pin6.pad" rx="0.2" ry="0.2" width="1.0" x="73.44318181818181" y="25.377272727272725"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="63.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="63.643181818181816" y="30.227272727272727"/>
<rect height="0.0" id="tuya2.back.pins.label1.anchor" width="0.0" x="64.14318181818182" y="30.327272727272728"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="65.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="63.643181818181816" y="32.22727272727273"/>
<rect height="0.0" id="tuya2.back.pins.label2.anchor" width="0.0" x="64.14318181818182" y="32.32727272727273"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="67.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="63.643181818181816" y="34.22727272727273"/>
<rect height="0.0" id="tuya2.back.pins.label3.anchor" width="0.0" x="64.14318181818182" y="34.32727272727273"/>
<rect fill="#4e4c4c" height="6.0" width="0.2" x="69.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="4.2" x="69.94318181818181" y="34.22727272727273"/>
<rect height="0.0" id="tuya2.back.pins.label4.anchor" width="0.0" x="73.64318181818182" y="34.32727272727273"/>
<rect fill="#4e4c4c" height="4.0" width="0.2" x="71.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="71.94318181818181" y="32.22727272727273"/>
<rect height="0.0" id="tuya2.back.pins.label5.anchor" width="0.0" x="73.64318181818182" y="32.32727272727273"/>
<rect fill="#4e4c4c" height="2.0" width="0.2" x="73.84318181818182" y="28.427272727272722"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="73.94318181818181" y="30.227272727272727"/>
<rect height="0.0" id="tuya2.back.pins.label6.anchor" width="0.0" x="73.64318181818182" y="30.327272727272728"/>
<rect fill="#e5b472" height="2.9" width="2.9" x="67.49318181818182" y="19.227272727272727"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="68.09318181818182" y="16.227272727272727"/>
<rect fill="#4e4c4c" height="0.2" width="2.7" x="65.39318181818182" y="16.227272727272727"/>
<rect height="0.0" id="cb2s.back.u2_txd.anchor" width="0.0" x="65.89318181818182" y="16.327272727272728"/>
<circle cx="68.99318181818182" cy="16.327272727272728" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="67.59318181818182" y="18.227272727272727"/>
<rect fill="#4e4c4c" height="0.2" width="2.2" x="65.39318181818182" y="18.227272727272727"/>
<rect height="0.0" id="cb2s.back.u2_rxd.anchor" width="0.0" x="65.89318181818182" y="18.327272727272728"/>
<circle cx="68.49318181818182" cy="18.327272727272728" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.0" width="0.2" x="65.59318181818182" y="21.227272727272727"/>
<rect fill="#4e4c4c" height="0.2" width="0.2" x="65.39318181818182" y="21.227272727272727"/>
<rect height="0.0" id="cb2s.back.csn.anchor" width="0.0" x="65.89318181818182" y="21.327272727272728"/>
<circle cx="66.49318181818182" cy="21.327272727272728" fill="#e5b472" r="0.5"/>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="61.043181818181814" y="30.227272727272727"/>
<g transform="translate(57.257541172126714,29.527272727272727)">
<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="58.74318181818182" y="30.327272727272728">3V3</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="61.043181818181814" y="32.22727272727273"/>
<g transform="translate(57.257541172126714,31.527272727272727)">
<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.74318181818182" y="32.32727272727273">GND</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="61.043181818181814" y="34.22727272727273"/>
<g transform="translate(57.257541172126714,33.52727272727273)">
<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.74318181818182" y="34.32727272727273">P10</text>
<g transform="translate(54.257541172126714,33.52727272727273)">
<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="55.44318181818181" y="34.32727272727273">D4</text>
<g transform="translate(50.65754117212671,33.52727272727273)">
<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="52.143181818181816" y="34.32727272727273">RX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="74.14318181818182" y="34.22727272727273"/>
<g transform="translate(77.55754117212672,33.52727272727273)">
<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="79.04318181818182" y="34.32727272727273">P11</text>
<g transform="translate(81.15754117212671,33.52727272727273)">
<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="82.34318181818182" y="34.32727272727273">D5</text>
<g transform="translate(84.15754117212671,33.52727272727273)">
<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="85.64318181818182" y="34.32727272727273">TX1</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="74.14318181818182" y="32.22727272727273"/>
<g transform="translate(77.5575411721267,31.527272727272727)">
<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="79.04318181818181" y="32.32727272727273">P24</text>
<g transform="translate(81.15754117212671,31.527272727272727)">
<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="82.34318181818182" y="32.32727272727273">D6</text>
<g transform="translate(84.15754117212671,31.527272727272727)">
<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="85.64318181818182" y="32.32727272727273">PWM4</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="74.14318181818182" y="30.227272727272727"/>
<g transform="translate(77.5575411721267,29.527272727272727)">
<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="79.04318181818181" y="30.327272727272728">P26</text>
<g transform="translate(81.15754117212671,29.527272727272727)">
<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="82.34318181818182" y="30.327272727272728">D7</text>
<g transform="translate(84.15754117212671,29.527272727272727)">
<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="85.64318181818182" y="30.327272727272728">IRDA</text>
<g transform="translate(87.75754117212671,29.527272727272727)">
<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="89.24318181818181" y="30.327272727272728">PWM5</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="62.793181818181814" y="18.227272727272727"/>
<g transform="translate(59.007541172126714,17.527272727272727)">
<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="60.49318181818182" y="18.327272727272728">P1</text>
<g transform="translate(56.00754117212672,17.527272727272727)">
<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.19318181818182" y="18.327272727272728">D9</text>
<g transform="translate(52.40754117212672,17.527272727272727)">
<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="53.89318181818182" y="18.327272727272728">RX2</text>
<g transform="translate(48.80754117212672,17.527272727272727)">
<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.29318181818182" y="18.327272727272728">SDA2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="62.793181818181814" y="16.227272727272727"/>
<g transform="translate(59.007541172126714,15.527272727272727)">
<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="60.49318181818182" y="16.327272727272728">P0</text>
<g transform="translate(56.00754117212672,15.527272727272727)">
<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.19318181818182" y="16.327272727272728">D8</text>
<g transform="translate(52.40754117212672,15.527272727272727)">
<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="53.89318181818182" y="16.327272727272728">TX2</text>
<g transform="translate(48.80754117212672,15.527272727272727)">
<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.29318181818182" y="16.327272727272728">SCL2</text>
<rect fill="#4e4c4c" height="0.2" width="2.6" x="62.793181818181814" y="21.227272727272727"/>
<g transform="translate(59.007541172126714,20.527272727272727)">
<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="60.49318181818182" y="21.327272727272728">P21</text>
<g transform="translate(56.00754117212672,20.527272727272727)">
<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.19318181818182" y="21.327272727272728">D10</text>
<g transform="translate(52.40754117212672,20.527272727272727)">
<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="53.89318181818182" y="21.327272727272728">SDA1</text>
</svg>

After

Width:  |  Height:  |  Size: 25 KiB

View File

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

34
boards/cb2s/variant.cpp Normal file
View File

@@ -0,0 +1,34 @@
/* This file was auto-generated from cb2s.json using boardgen */
#include <Arduino.h>
extern "C" {
// clang-format off
PinInfo pinTable[PINS_COUNT] = {
// D0: P6, PWM0
{GPIO6, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D1: P7, PWM1
{GPIO7, PIN_GPIO | PIN_IRQ | PIN_PWM, PIN_NONE, 0},
// D2: P8, PWM2
{GPIO8, 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: P0, UART2_TX, I2C2_SCL
{GPIO0, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D9: P1, UART2_RX, I2C2_SDA
{GPIO1, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_UART, PIN_NONE, 0},
// D10: P21, I2C1_SDA, TMS, MCLK, ^FCS
{GPIO21, PIN_GPIO | PIN_IRQ | PIN_I2C | PIN_I2S | PIN_JTAG, PIN_NONE, 0},
};
// clang-format on
} // extern "C"

37
boards/cb2s/variant.h Normal file
View File

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

View File

@@ -3,7 +3,7 @@
"beken-72xx",
"beken-7231t",
"beken-7231t-tuya",
"pcb/ic-bk7231t",
"pcb/ic-bk7231-qfn32",
"pcb/wb2l",
"pcb/wb2l-test"
],

View File

@@ -5,6 +5,7 @@ Name | MCU | Flash | RAM | Pin
**Ai-Thinker Co., Ltd.** | | | | | | | |
[BW12](../boards/bw12/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz`
**Tuya Inc.** | | | | | | | |
[CB2S](../boards/cb2s/README.md) | BK7231N | 2 MiB | 256 KiB | 11 (8 I/O) | ✔️ | ✔️ | ❌ | `beken-7231n`
[WB2L](../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t`
[WR3](../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz`
**N/A** | | | | | | | |

View File

@@ -1,5 +1,6 @@
<!-- This file is auto-generated -->
- BK7231N
- BK7231S
- BK7231T
- BK7231U

View File

@@ -1,13 +1,13 @@
<!-- This file is auto-generated -->
Title | Name (parent) | Code | Short name & ID | Arduino Core | Source SDK
-------------------------------------------------------------------|------------------------------|----------------------|-------------------------|--------------|----------------------------------------------------------------------------------
Realtek Ameba1 | `-` | `-` | `RTL8710A` (0x9FFFD543) | ❌ | -
[Realtek AmebaZ](https://www.amebaiot.com/en/amebaz/) | `realtek-ambz` | `ambz` | `RTL8710B` (0x22E0D6FC) | ✔️ | `framework-realtek-amb1` ([amb1_sdk](https://github.com/ambiot/amb1_sdk))
Realtek AmebaZ2 | `-` | `-` | `RTL8720C` (0xE08F7564) | ❌ | -
Realtek AmebaD | `-` | `-` | `RTL8720D` (0x3379CFE2) | ❌ | -
[Beken 7231T](http://www.bekencorp.com/en/goods/detail/cid/7.html) | `beken-7231t` (`beken-72xx`) | `bk7231t` (`bk72xx`) | `BK7231T` (0x675A40B0) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos))
Beken 7231N | `-` | `-` | `BK7231N` (0x7B3EF230) | | -
Boufallo 602 | `-` | `-` | `BL602` (0xDE1270B7) | ❌ | -
Xradiotech 809 | `-` | `-` | `XR809` (0x51E903A8) | ❌ | -
Native host architecture | `host-native` | `native` | `NATIVE` (0xDEADBEEF) | ❌ | -
Title | Name (parent) | Code | Short name & ID | Arduino Core | Source SDK
--------------------------------------------------------------------|------------------------------|----------------------|-------------------------|--------------|----------------------------------------------------------------------------------
Realtek Ameba1 | `-` | `-` | `RTL8710A` (0x9FFFD543) | ❌ | -
[Realtek AmebaZ](https://www.amebaiot.com/en/amebaz/) | `realtek-ambz` | `ambz` | `RTL8710B` (0x22E0D6FC) | ✔️ | `framework-realtek-amb1` ([amb1_sdk](https://github.com/ambiot/amb1_sdk))
Realtek AmebaZ2 | `-` | `-` | `RTL8720C` (0xE08F7564) | ❌ | -
Realtek AmebaD | `-` | `-` | `RTL8720D` (0x3379CFE2) | ❌ | -
[Beken 7231T](http://www.bekencorp.com/en/goods/detail/cid/7.html) | `beken-7231t` (`beken-72xx`) | `bk7231t` (`bk72xx`) | `BK7231T` (0x675A40B0) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos))
[Beken 7231N](http://www.bekencorp.com/en/goods/detail/cid/39.html) | `beken-7231n` (`beken-72xx`) | `bk7231n` (`bk72xx`) | `BK7231N` (0x7B3EF230) | ✔️ | `framework-beken-bdk` ([bdk_freertos](https://github.com/bekencorp/bdk_freertos))
Boufallo 602 | `-` | `-` | `BL602` (0xDE1270B7) | ❌ | -
Xradiotech 809 | `-` | `-` | `XR809` (0x51E903A8) | ❌ | -
Native host architecture | `host-native` | `native` | `NATIVE` (0xDEADBEEF) | ❌ | -

View File

@@ -5,7 +5,6 @@ Name | MCU | Flash | RAM | Pins | Wi-Fi | BLE | ZigBee
**CB Series** | | | | | | |
CB1S | BK7231N | 2 MiB | 256 KiB | 18 | ✔️ | ✔️ | ❌
CB2L | BK7231N | 2 MiB | 256 KiB | 7 | ✔️ | ✔️ | ❌
CB2S | BK7231N | 2 MiB | 256 KiB | 11 | ✔️ | ✔️ | ❌
CB3L | BK7231N | 2 MiB | 256 KiB | 18 | ✔️ | ✔️ | ❌
CB3S | BK7231N | 2 MiB | 256 KiB | 22 | ✔️ | ✔️ | ❌
CB3S-NL | BK7231N | 2 MiB | 256 KiB | 22 | ✔️ | ✔️ | ❌

View File

@@ -48,7 +48,17 @@
{
"id": "0x7B3EF230",
"short_name": "BK7231N",
"description": "Beken 7231N"
"description": "Beken 7231N",
"name": "beken-7231n",
"parent": "beken-72xx",
"code": "bk7231n",
"parent_code": "bk72xx",
"url": "http://www.bekencorp.com/en/goods/detail/cid/39.html",
"sdk": "https://github.com/bekencorp/bdk_freertos",
"framework": "framework-beken-bdk",
"mcus": [
"BK7231N"
]
},
{
"id": "0xDE1270B7",

Submodule tools/boardgen updated: 7ab5a50be7...c41912a643