Skip to content

Commit 15e60a5

Browse files
committed
riscv: telink:tl3218x: add ble optimize.
- add optimize for ble. - low down the ramcost. - revert nvs cache to pass certify. Signed-off-by: Haiwen Xia <haiwen.xia@telink-semi.com>
1 parent cbebbec commit 15e60a5

File tree

6 files changed

+21
-28
lines changed

6 files changed

+21
-28
lines changed

.github/workflows/chef.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
platform: telink
111111
- name: Update Zephyr to specific revision (for developers purpose)
112112
shell: bash
113-
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py e9249e2769bde058c729a9b1f940bfc8b35958a3"
113+
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py b4a43d87fa1bc087981a72154e503036229e1e99"
114114
- name: CI Examples Telink
115115
shell: bash
116116
run: |

.github/workflows/examples-telink.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
gh-context: ${{ toJson(github) }}
5858

5959
- name: Update Zephyr to specific revision (for developers purpose)
60-
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py e9249e2769bde058c729a9b1f940bfc8b35958a3"
60+
run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py b4a43d87fa1bc087981a72154e503036229e1e99"
6161

6262
- name: Build example Telink (B92 retention) Air Quality Sensor App
6363
run: |

config/telink/chip-module/Kconfig.defaults

+5-24
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ choice LOG_MODE
3434
endchoice
3535

3636
choice MATTER_LOG_LEVEL_CHOICE
37+
default MATTER_LOG_LEVEL_WRN if SOC_RISCV_TELINK_TL321X
3738
default MATTER_LOG_LEVEL_DBG
3839
endchoice
3940

@@ -113,7 +114,6 @@ config GPIO
113114
# Bluetooth Low Energy configs
114115

115116
config BT
116-
default n if SOC_SERIES_RISCV_TELINK_TLX
117117
default y
118118

119119
if BT
@@ -175,7 +175,7 @@ config BT_DEVICE_NAME_GATT_WRITABLE
175175
bool
176176
default n
177177

178-
if SOC_SERIES_RISCV_TELINK_B9X
178+
if SOC_SERIES_RISCV_TELINK_B9X || SOC_SERIES_RISCV_TELINK_TLX
179179

180180
config B9X_BLE_CTRL_THREAD_STACK_SIZE
181181
default 576
@@ -194,28 +194,8 @@ choice B9X_BLE_CTRL_MAC_TYPE
194194
default B9X_BLE_CTRL_MAC_TYPE_RANDOM_STATIC
195195
endchoice
196196

197-
endif # SOC_SERIES_RISCV_TELINK_B9X
198-
199-
if SOC_SERIES_RISCV_TELINK_TLX
200-
201-
# config TLX_BLE_CTRL_THREAD_STACK_SIZE
202-
# default 576
203-
#
204-
# config TLX_BLE_CTRL_MASTER_MAX_NUM
205-
# default 0
206-
#
207-
# config TLX_BLE_CTRL_SLAVE_MAX_NUM
208-
# default 1
209-
#
210-
# config TLX_BLE_CTRL_RF_POWER
211-
# default 3 if PM
212-
# default 9
213-
#
214-
# choice TLX_BLE_CTRL_MAC_TYPE
215-
# default TLX_BLE_CTRL_MAC_TYPE_RANDOM_STATIC
216-
# endchoice
217-
218-
endif # TLX_BLE_CTRL_MASTER_MAX_NUM
197+
endif # SOC_SERIES_RISCV_TELINK_B9X || SOC_SERIES_RISCV_TELINK_TLX
198+
219199

220200
endif # BT
221201

@@ -489,6 +469,7 @@ config OPENTHREAD_SHELL
489469
default n
490470

491471
config CHIP_TASK_STACK_SIZE
472+
default 6192 if SOC_RISCV_TELINK_TL321X
492473
default 4864 if PM
493474

494475
endif

examples/platform/telink/project_include/OpenThreadConfig.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@
2727

2828
/* Number of message buffers reduced to save RAM */
2929
#undef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS
30-
#if CONFIG_PM
30+
#if CONFIG_PM || CONFIG_SOC_RISCV_TELINK_TL321X
3131
#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22
3232
#else
3333
#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44
3434
#endif
3535

36+
#if CONFIG_SOC_RISCV_TELINK_TL321X
37+
#undef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
38+
#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 5
39+
#endif
40+
3641
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
3742

3843
#undef OPENTHREAD_CONFIG_LOG_LEVEL

src/platform/telink/CHIPDevicePlatformConfig.h

+7
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@
103103
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0
104104
#endif
105105

106+
#ifdef CONFIG_SOC_RISCV_TELINK_TL321X
107+
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (256)
108+
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (256)
109+
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256)
110+
#endif
111+
112+
106113
#ifdef CONFIG_BT
107114
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE CONFIG_BT
108115
#else

src/platform/telink/SystemPlatformConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct ChipDeviceEvent;
4848
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_HEAP 1
4949
#define CHIP_SYSTEM_PACKETBUFFER_FROM_CHIP_POOL 0
5050
#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1
51-
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1200
51+
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1280
5252
#endif
5353

5454

0 commit comments

Comments
 (0)