RTT线程有错误代码(-02)不知道是什么意思
我使用串口1一直发送数据时查看线程在USART1Send中游错误代码,不知道是代表什么list_thread()
threadpristatus sp stack size max used left tickerror
-------- ---- ------- ---------- ---------- ---------- ---------- ---
USART1Send 0x18 ready 0x00000080 0x00000800 0x00000480 0x0000000a -02
Decoder0x1a ready 0x00000090 0x00000800 0x0000010c 0x00000009 000
Encoder0x19 ready 0x00000320 0x00000800 0x00000638 0x00000007 000
led4 0x1b suspend 0x000000a0 0x00000100 0x000000a0 0x00000005 000
led3 0x1c suspend 0x00000078 0x00000100 0x00000088 0x00000005 000
led2 0x1d suspend 0x00000078 0x00000100 0x00000078 0x00000005 000
led1 0x1e suspend 0x00000078 0x00000800 0x00000090 0x00000005 000
tidle 0x1f ready 0x00000050 0x00000100 0x000000fc 0x0000001e 000
tshell 0x14 ready 0x00000088 0x00000800 0x000001bc 0x00000003 000
0, 0x00000000
还有,我串口一直发送时,我使用串口软件往串口一直发送数据,改了一会就会出现以下hard fault;假如我不不往串口发送数据时是不会产生hard fault
psr: 0x89000000
pc: 0x0801e7c6
lr: 0x0801e7af
r12: 0x20004298
r03: 0x00000048
r02: 0x00000007
r01: 0x0000003f
r00: 0x0000004a
hard fault on thread: Encoder
threadpristatus sp stack size max used left tickerror
-------- ---- ------- ---------- ---------- ---------- ---------- ---
USART1Send 0x18 suspend 0x00000080 0x00000800 0x00000480 0x0000000a 000
Decoder0x1a ready 0x00000090 0x00000800 0x0000010c 0x00000008 000
Encoder0x19 ready 0x00000340 0x00000800 0x00000648 0x00000001 000
led4 0x1b suspend 0x000000a0 0x00000100 0x000000a0 0x00000005 000
led3 0x1c suspend 0x00000078 0x00000100 0x00000088 0x00000005 000
led2 0x1d suspend 0x00000078 0x00000100 0x000000a8 0x00000003 000
led1 0x1e suspend 0x00000078 0x00000800 0x000000a8 0x00000001 000
tidle 0x1f ready 0x00000050 0x00000100 0x000000fc 0x00000001 000
tshell 0x14 suspend 0x00000088 0x00000800 0x000001bc 0x00000002 000
是不是USART1Send引起的hard fault呢? 找到定义了
#define RT_ETIMEOUT 2 /**< Timed out */
线程超时了,这是说明什么??
线程怎么会超时啊,和我设置的时间片有关吗?? 在我的线程中USART1Send的优先级时最高的
我把我的发送速度降低了,就没有错误了
list_thread()
threadpristatus sp stack size max used left tickerror
-------- ---- ------- ---------- ---------- ---------- ---------- ---
USART1Send 0x18 suspend 0x00000080 0x00000800 0x00000480 0x0000000a 000
Decoder0x1a ready 0x00000090 0x00000800 0x0000010c 0x00000001 000
Encoder0x19 ready 0x000000a0 0x00000800 0x00000648 0x00000002 000
led4 0x1b suspend 0x000000a0 0x00000100 0x000000a0 0x00000005 000
led3 0x1c suspend 0x00000078 0x00000100 0x00000088 0x00000005 000
led2 0x1d suspend 0x00000078 0x00000100 0x00000088 0x00000004 000
led1 0x1e suspend 0x00000078 0x00000800 0x00000098 0x00000003 000
tidle 0x1f ready 0x00000050 0x00000100 0x000000fc 0x0000000e 000
tshell 0x14 ready 0x00000088 0x00000800 0x000001c8 0x00000004 000
0, 0x00000000
但是hard fault还是存在,我想这应该是两个问题,问题找到了但是还不知道真正的原因(线程这么会超时呢??)
页:
[1]