串口接受数据失败

Viewed 77

一、描述你遇到的问题

为啥串口收发数据历程中uart_read接受不到数据并且执行到此处会重启程序,并没有打印接受成功的信息

二、你具体做的所有步骤结果截图


三、当前开发板状态全景照片


四、开发板串口所有日志

Name TaskEntryAddr TID Priority Status StackSize WaterLine StackPoint TopOfStack SemID EventMask CPUP CPUP 10.0s CPUP 1.0s


Swt_Task 0x00a0cb00 0x1 0 Suspend 0x800 0x478 0x00a2f030 0x00a2e9a0 0xffffffff 0x0 0.0 0.0 0.0
IdleCore000 0x00a0c212 0x2 31 Ready 0x400 0x284 0x00a2f350 0x00a2f1c0 0xffffffff 0x0 6.0 0.0 0.0
dfx_msg 0x002505be 0x3 5 Pend 0x800 0x1b4 0x00a31f30 0x00a318e0 0xffffffff 0x0 0.0 0.0 0.0
app 0x00253ca2 0x4 27 Ready 0x800 0x194 0x00a32970 0x00a32300 0xffffffff 0x0 0.0 0.0 0.0
log 0x0035d3bc 0x5 25 Pend 0x800 0x194 0x00a33190 0x00a32b20 0x1 0x0 0.0 0.0 0.0
bt 0x0014d32a 0x6 1 Pend 0xe00 0x3b4 0x00a33f90 0x00a33340 0xffffffff 0x0 0.3 0.0 0.0
bt_sdk 0x003150ea 0x7 12 Pend 0x800 0x1b4 0x00a347b0 0x00a34160 0xffffffff 0x0 0.0 0.0 0.0
bth_sdk 0x00329686 0x8 13 Pend 0x800 0x164 0x00a35010 0x00a34970 0x4 0x0 0.0 0.0 0.0
recvBthDataTask 0x0032d20c 0x9 10 Pend 0x800 0x194 0x00a35800 0x00a35190 0xffffffff 0x0 0.0 0.0 0.0
bt_service 0x00313ce4 0xa 12 Pend 0x1000 0x1c4 0x00a367f0 0x00a359b0 0xffffffff 0x0 0.0 0.0 0.0
at 0x002476a2 0xb 1 Pend 0x2000 0x194 0x00a38840 0x00a369d0 0xffffffff 0x0 0.0 0.0 0.0
radar_driver 0x0034d67c 0xd 23 Pend 0x800 0x194 0x00a3b070 0x00a3aa00 0xffffffff 0x3 0.0 0.0 0.0
radar_feature 0x0034ddbe 0xe 24 Pend 0x2600 0x478 0x00a3d690 0x00a3b220 0xffffffff 0xf 0.0 0.0 0.0
UartTask 0x0034ac92 0xf 17 Running 0x1000 0x448 0x00a3e5b0 0x00a3d840 0xffffffff 0x0 93.3 100.0 100.0
schedule_loop 0x0031431c 0x10 11 Pend 0xa00 0x164 0x00a3fe50 0x00a3f5b0 0x3 0x0 0.0 0.0 0.0
wifi_frw_msg 0x0026754e 0x11 4 Pend 0x1400 0x2c4 0x00a41770 0x00a404e0 0xffffffff 0x1 0.0 0.0 0.0
wifi_frw_txdata 0x0026754e 0x12 4 Pend 0x1000 0x174 0x00a42800 0x00a41970 0xffffffff 0x1 0.0 0.0 0.0
wifi_frw 0x00128d80 0x13 5 Pend 0x1000 0x6e8 0x00a44de0 0x00a43f50 0xffffffff 0x1 0.1 0.0 0.0
tcpip_thread 0x0026c6a8 0x14 5 PendTime 0x1000 0x1c4 0x00a45f90 0x00a45150 0xffffffff 0x1 0.0 0.0 0.0
APP|exception:8000000c
APP|Oops:NMI
task:UartTask
thrdPid:0xf
type:0xc
nestCnt:0
phase:Task
ccause:0x4
mcause:0x8000000c
mtval:0x0
gp:0xa11c44
mstatus:0x80007880
mepc:0x23de4a
ra:0x23de46
sp:0xa3e6d0
tp:0x0
t0:0xa3e7b4
t1:0xa0f0a4
t2:0xa1429c
s0:0xa2af80
s1:0xa2ad80
a0:0x0
a1:0x9
a2:0xa3e7ef
a3:0x1
a4:0xa2adcf
a5:0x1
a6:0xff
a7:0xa3e7a0
s2:0x1
s3:0xa2add0
s4:0x50
s5:0x0
s6:0x9090909
s7:0x8080808
s8:0x7070707
s9:0x6060606
s10:0x5050505
s11:0x4040404
t3:0x13131313
t4:0x12121212
t5:0x11111111
t6:0x10101010
APP|cxcptsc = 0x4
APP|backtrace begin
traceback 0 -- ra = 0x0 fp = 0x0
APP|backtrace end
APP|stack txt info begin
APP|traceback 1 -- sp addr= 0xa3e6d4 sp content= 0x23de4a
APP|traceback 29 -- sp addr= 0xa3e744 sp content= 0xa0f0a4
APP|traceback 31 -- sp addr= 0xa3e74c sp content= 0x23de46
APP|traceback 55 -- sp addr= 0xa3e7ac sp content= 0xa0c1ba
APP|traceback 59 -- sp addr= 0xa3e7bc sp content= 0xa0d39c
APP|traceback 67 -- sp addr= 0xa3e7dc sp content= 0x23de22
APP|traceback 79 -- sp addr= 0xa3e80c sp content= 0x34ad18
APP|traceback 87 -- sp addr= 0xa3e82c sp content= 0xa0c256
APP|traceback 91 -- sp addr= 0xa3e83c sp content= 0xa0e1ea
APP|stack txt info end
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
APP|Reboot core:2 cause 0x2008boot.
Flash Init Fail! ret = 0x80001341
verify_public_rootkey secure verify disable!
verify_params_key_area secure verify disable!
verify_params_area_info secure verify disable!
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
SSB Uart Init Succ!
SSB Flash Init Succ!
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
Flashboot Uart Init Succ!
Flashboot Malloc Init Succ!
Flash Init Succ!
No need to fix SR!
flashboot version : 1.10.101
[UPG] upgrade init OK!
No need to upgrade...
flash_encrypt disable.
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
APP|Debug uart init succ.
[UPG] upgrade init OK!
APP|init_dev_addr, mac_addr:0x53,0x 0,0x73,0x91,0x**,0x**,
xo_trim_temp_comp val:0 0
APP|AT uart init succ.
los_at_plt_cmd_register EXCUTE
APP|WARNING: main_initialise::thread[11] func is null
cpu 0 entering scheduler
APP|btc open
[RADAR_LOG] alg ctrl read from nv [1][2][0][0][1][1][20]
device_main_init: 0!
===hal_initialize_phy===225===
device_module_init:: succ!
cali_set_cali_mask:old[0x0] -> new[0x1fa2]

fe_rf_initialize
cali_offline_cali_entry enter
cali_set_cali_done_flag:old[0x0] -> new[0x1]

rf cali OK. time cost:22, ret:0
uart1 poll mode send start!, len = 512
uart1 poll mode send back succ!
xo update temp:3,diff:0,xo:0x3083c

Name TaskEntryAddr TID Priority Status StackSize WaterLine StackPoint TopOfStack SemID EventMask CPUP CPUP 10.0s CPUP 1.0s


Swt_Task 0x00a0cb00 0x1 0 Suspend 0x800 0x478 0x00a2f030 0x00a2e9a0 0xffffffff 0x0 0.0 0.0 0.0
IdleCore000 0x00a0c212 0x2 31 Ready 0x400 0x284 0x00a2f360 0x00a2f1c0 0xffffffff 0x0 6.0 0.0 0.0
dfx_msg 0x002505be 0x3 5 Pend 0x800 0x1b4 0x00a31f30 0x00a318e0 0xffffffff 0x0 0.0 0.0 0.0
app 0x00253ca2 0x4 27 Ready 0x800 0x194 0x00a32970 0x00a32300 0xffffffff 0x0 0.0 0.0 0.0
log 0x0035d3bc 0x5 25 Pend 0x800 0x194 0x00a33190 0x00a32b20 0x1 0x0 0.0 0.0 0.0
bt 0x0014d32a 0x6 1 Pend 0xe00 0x3d4 0x00a33f90 0x00a33340 0xffffffff 0x0 0.3 0.0 0.0
bt_sdk 0x003150ea 0x7 12 Pend 0x800 0x1b4 0x00a347b0 0x00a34160 0xffffffff 0x0 0.0 0.0 0.0
bth_sdk 0x00329686 0x8 13 Pend 0x800 0x1b0 0x00a35010 0x00a34970 0x4 0x0 0.0 0.0 0.0
recvBthDataTask 0x0032d20c 0x9 10 Pend 0x800 0x194 0x00a35800 0x00a35190 0xffffffff 0x0 0.0 0.0 0.0
bt_service 0x00313ce4 0xa 12 Pend 0x1000 0x1c4 0x00a367f0 0x00a359b0 0xffffffff 0x0 0.0 0.0 0.0
at 0x002476a2 0xb 1 Pend 0x2000 0x194 0x00a38840 0x00a369d0 0xffffffff 0x0 0.0 0.0 0.0
radar_driver 0x0034d67c 0xd 23 Pend 0x800 0x194 0x00a3b070 0x00a3aa00 0xffffffff 0x3 0.0 0.0 0.0
radar_feature 0x0034ddbe 0xe 24 Pend 0x2600 0x478 0x00a3d690 0x00a3b220 0xffffffff 0xf 0.0 0.0 0.0
UartTask 0x0034ac92 0xf 17 Running 0x1000 0x448 0x00a3e5b0 0x00a3d840 0xffffffff 0x0 93.2 100.0 100.0
schedule_loop 0x0031431c 0x10 11 Pend 0xa00 0x164 0x00a3fe50 0x00a3f5b0 0x3 0x0 0.0 0.0 0.0
wifi_frw_msg 0x0026754e 0x11 4 Pend 0x1400 0x2c4 0x00a41770 0x00a404e0 0xffffffff 0x1 0.0 0.0 0.0
wifi_frw_txdata 0x0026754e 0x12 4 Pend 0x1000 0x174 0x00a42800 0x00a41970 0xffffffff 0x1 0.0 0.0 0.0
wifi_frw 0x00128d80 0x13 5 Pend 0x1000 0x6c8 0x00a44de0 0x00a43f50 0xffffffff 0x1 0.1 0.0 0.0
tcpip_thread 0x0026c6a8 0x14 5 PendTime 0x1000 0x1c4 0x00a45f90 0x00a45150 0xffffffff 0x1 0.0 0.0 0.0
APP|exception:8000000c
APP|Oops:NMI
task:UartTask
thrdPid:0xf
type:0xc
nestCnt:0
phase:Task
ccause:0x4
mcause:0x8000000c
mtval:0x0
gp:0xa11c44
mstatus:0x80007880
mepc:0x25d23e
ra:0x23de46
sp:0xa3e6d0
tp:0x0
t0:0xa3e7b4
t1:0xa0f0a4
t2:0xa1429c
s0:0xa2af80
s1:0xa2ad80
a0:0x1
a1:0x9
a2:0xa3e7ef
a3:0x1
a4:0xa2adcf
a5:0xa1482c
a6:0xff
a7:0xa3e7a0
s2:0x1
s3:0xa2add0
s4:0x50
s5:0x0
s6:0x9090909
s7:0x8080808
s8:0x7070707
s9:0x6060606
s10:0x5050505
s11:0x4040404
t3:0xcacacaca
t4:0xcacacaca
t5:0xcacacaca
t6:0xcacacaca
APP|cxcptsc = 0x4
APP|backtrace begin
traceback 0 -- ra = 0x0 fp = 0x0
APP|backtrace end
APP|stack txt info begin
APP|traceback 1 -- sp addr= 0xa3e6d4 sp content= 0x25d23e
APP|traceback 29 -- sp addr= 0xa3e744 sp content= 0xa0f0a4
APP|traceback 31 -- sp addr= 0xa3e74c sp content= 0x23de46
APP|traceback 55 -- sp addr= 0xa3e7ac sp content= 0xa0c1ba
APP|traceback 59 -- sp addr= 0xa3e7bc sp content= 0xa0d39c
APP|traceback 67 -- sp addr= 0xa3e7dc sp content= 0x23de22
APP|traceback 79 -- sp addr= 0xa3e80c sp content= 0x34ad18
APP|traceback 87 -- sp addr= 0xa3e82c sp content= 0xa0c256
APP|traceback 91 -- sp addr= 0xa3e83c sp content= 0xa0e1ea
APP|stack txt info end
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
diag_unconnect
APP|Reboot core:2 cause 0x2008boot.
Flash Init Fail! ret = 0x80001341
verify_public_rootkey secure verify disable!
verify_params_key_area secure verify disable!
verify_params_area_info secure verify disable!
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
SSB Uart Init Succ!
SSB Flash Init Succ!
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
Flashboot Uart Init Succ!
Flashboot Malloc Init Succ!
Flash Init Succ!
No need to fix SR!
flashboot version : 1.10.101
[UPG] upgrade init OK!
No need to upgrade...
flash_encrypt disable.
verify_image_key_area secure verify disable!
verify_image_code_info secure verify disable!
APP|Debug uart init succ.
[UPG] upgrade init OK!
APP|init_dev_addr, mac_addr:0xba,0x 0,0x73,0x3e,0x**,0x**,
xo_trim_temp_comp val:0 0
APP|AT uart init succ.
los_at_plt_cmd_register EXCUTE
APP|WARNING: main_initialise::thread[11] func is null
cpu 0 entering scheduler
APP|btc open
[RADAR_LOG] alg ctrl read from nv [1][2][0][0][1][1][20]
device_main_init: 0!
===hal_initialize_phy===225===
device_module_init:: succ!
cali_set_cali_mask:old[0x0] -> new[0x1fa2]

fe_rf_initialize
cali_offline_cali_entry enter
cali_set_cali_done_flag:old[0x0] -> new[0x1]

rf cali OK. time cost:22, ret:0
uart1 poll mode send start!, len = 512
uart1 poll mode send back succ!
xo update temp:3,diff:0,xo:0x3083c

2 Answers

@epruda 看门狗去使能就行了

不使能看门狗是不重启吧,数据接收正常吗。我这个奇怪哦,ubuntu编译的固件不关看门狗也不会重启,uapi_uart_write和uapi_uart_read函数都正常执行成功,就是数据读取g_app_uart_rx_buff的打印为空。

同样的现象,请问解决了吗?