Page 1 of 1

T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 21日 10:03
by New

3.12.16包里的T5AI_BOARD_CELLULAR,按照包里doc中外挂CAT1的方案,编译下载后一直复位重启,查看日志发现是内存管理报错。
tuya@tuya-VMware-Virtual-Platform:~/Desktop/4GCat1/T5_TuyaOS-3.12.16/software/TuyaOS/vendor/T5/t5_os/build/bk7258_cp1$ arm-none-eabi-addr2line -e app.elf -a -f 02253eb0
0x02253eb0
bk_cdc_acm_main
/home/tuya/Desktop/4GCat1/T5_TuyaOS-3.12.16/software/TuyaOS/vendor/T5/t5_os/bk_idk/components/bk_usb/example/usb_cdc_acm/bk_cherry_usb_cdc_acm_api.c:640
发现是在bk_cdc_acm_main函数中触发fault。
日志
[09:40:10.931]收←◆New high-speed device on Hub 1,Port 1 connected
New device found,idVendor:05c6,idProduct:9330,bcdDevice:0200
CPU1 Current regs:
0 r0 x 0x0
1
r1 x 0x5
2r2 x 0x0
3 r3 x 0x28055c14
4 r4 x 0x28055c2c
5 r5 x 0x231aafb
6 r6 x 0x28055be8
7 r7 x
0x7070707
8 r8 x 0x8080808
9 r9 x 0x9090909
10 r10 x 0x10101010
11 r11 x 0x11111111
12 r12 x 0x28060af8
14 sp x 0x28060af0
15 lr x 0x224bb31
16 pc x 0x2253eb0
17 xpsrx 0x81000000
18 msp x 0x2809ff48
19 psp x 0x28060ad0
20 primask x 0x0
21 basepri x
0x0
22 faultmask x0x0
23 fpscr x 0x0
30 CPU1 xPSR x 0x20000004
31 LR
x 0xfffffffd
32 control x0xc
40 MMFAR x
0x0
41 BFAR x 0x0
42 CFSRx 0x82
43 HFSR x 0x0
MemFault
build time
=> Oct 21 2025 09:34:54 !

Firmware name: app,hardware version: V1.0.0, software version: V1.0.0
Fault on thread acm_class_task
===== Thread stack information =====
addr: 28060af0 data: 00000000
addr: 28060af4 data: 01010101
addr: 28060af8 data: 00000005
addr: 28060afc data: 00000000
addr: 28060b00 data: 04040404
addr: 28060b04
data: 05050505
addr:`28060b08 data: 06060606
addr: 28060b0c data: 0224e1d5
addr: 28060b10 data: a5a5a5a5

addr: 28060b14 data: a5a5a5a5

===================Registers information====================
R0 : 00000000 R1: 00000005 R2 : 00000000 R3 :28055c14

R12: 28060af8LR : 0224bb31PC :`02253eb0 PSR: 81000000

Memory management fault is caused by data accessviolation
The memory management fault occurred address
is 00000000
Show more call stack info by run: arm-none-eabi-addr2line -e app.elf -a -f 02253eb0

[09:40:11.068]收←◆(1482)Assert at:`rtos_get_semaphore:272


Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 21日 16:59
by JSHANG

从日志上看,是因为usb vbat control gpio(CONFIG_USB_VBAT_CONTROL_GPIO_ID)没有配置对,USB未正确起来,
要根据原理图修改正确的GPIO:
配置文件路径:vendor/T5/t5_os/projects/tuya_app/config/bk7258_cp1/config

把原理图贴上来看看


Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 22日 09:39
by New

CONFIG_USB_VBAT_CONTROL_GPIO_ID=9 按照原理图改了引脚,故障现象一样
[09:35:00.750]收←◆New high-speed device on Hub 1, Port 1 connected
New device found,idVendor:05c6,idProduct:9330,bcdDevice:0200
CPU1 Current regs:
0 r0 x 0x0
1 r1 x 0x5
2 r2 x 0x0
3 r3 x 0x28055c14
4 r4 x 0x28055c2c
5 r5 x 0x231aafb
6 r6x 0x28055be8
7 r7 x 0x7070707
8 r8 x 0x8080808
9 r9 x 0x9090909
10 r10 x 0x10101010
11 r11 x 0x11111111
12 r12
x 0x28060af8
14 sp x 0x28060af0
15 lr x 0x224bb31
16 pc x 0x2253eb0
17 xpsr x 0x81000000
18 msp x 0x2809ff48
19 psp x 0x28060ad0
20 primask x 0x0
21 basepri x 0x0
22 faultmask x 0x0
23 fpscr x 0x0
30 CPU1 xPSR x 0x20000004
31 LR x 0xfffffffd
32 control x 0xc
40 MMFAR x`0x0
41 BFAR x 0x0
42 CFSR x 0x82
43 HFSR x 0x0
MemFault
build time => Oct 22 2025 09:30:07 !

Firmware name: app, hardware version:V1.0.0,software version: V1.0.0
Fault on thread acm_class_task
===== Threadstack information =====
addr: 28060af0 data: 00000000
addr: 28060af4
data: 01010101
addr: 28060af8 data: 00000005
addr: 28060afc data: 00000000
addr: 28060b00 data: 04040404
addr: 28060b04
data: 05050505
addr: 28060b08 data: 06060606
addr: 28060b0c data: 0224e1d5
`addr: 28060b10 data: a5a5a5a5

addr: 28060b14 data: a5a5a5a5

=================== Registers information ====================
R0 : 00000000 R1 : 00000005 R2 : 00000000` R3 : 28055c14

R12: 28060af8 LR : 0224bb31 PC : 02253eb0 PSR: 81000000

Memory management fault is caused by data access violation
The memory management fault occurred address is 00000000
Show more call stack info by run: arm-none-eabi-addr2line -e app.elf -a -f 02253eb0

[09:35:00.888]收←◆(1490)Assert at: rtos_get_semaphore:272

Snipaste_2025-10-22_09-37-40.png
Snipaste_2025-10-22_09-36-31.png

Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 22日 10:24
by JSHANG
  1. 看原理图,配置错了,应该是设置VBUS_CTRL那个GPIO 5, 不是GPIO 9
  2. 确保你的demo 开启了4G功能:
    a) 在文件 apps/xxx_demo/build/tuya_app.config 增加CONFIG_ENABLE_CELLULAR=y
    b) 在文件apps/xxx_demo/include/tuya_app_config.h 增加#define ENABLE_CELLULAR 1
    c) 确认文件apps/xxx_demo/src/tuya_app_main.c 里面函数 boot_cellular_module 被编译调用
    按上述修改后,再试;贴日志的时候,要开机到出错的日志,方便看问题;

Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 23日 14:01
by New

你好!在boot_cellular_module函数中增加了打印信息,确定该函数被调用,按照你的修改方式故障现象依旧

Snipaste_2025-10-23_13-58-33.png
Snipaste_2025-10-23_13-39-33.png
Snipaste_2025-10-23_13-40-03.png
Snipaste_2025-10-23_14-05-22.png

Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 23日 14:34
by JSHANG
  1. 把编译生成的output目录打个包贴上来,apps/xxx_demo/output
  2. 把apps/xxx_demo,打个包贴上来,我本地复现一下

Re: T5AI_BOARD_CELLULAR包下载后板子一直复位重启

Posted: 2025年 Oct 23日 14:58
by New
Snipaste_2025-10-23_14-46-51.png