|
rt_err_t CopyToDecoderBuf(u8 *pData)
{
static u8 i;
// RT_ASSERT(pWriteEncodeData->Ready == 0);//decoder没有缓冲区了
rt_mutex_take(EncodeDataBuffermutex,RT_WAITING_FOREVER);
if(pWriteEncodeData->Ready != 0 ) //老是有hard falut 指向这里
{
rt_mutex_release(EncodeDataBuffermutex);
rt_kprintf("缓冲区没有空的\r\n");
return RT_ERROR;
}
for(i=0;i<20;i++)pWriteEncodeData->Data=*pData++;
pWriteEncodeData->Ready=1;
pWriteEncodeData=pWriteEncodeData->next;
rt_mutex_release(EncodeDataBuffermutex);
// rt_kprintf("Got a new voice data\r\n");
return RT_EOK;
}
------------------------------------------------------------------
205: rt_err_t CopyToDecoderBuf(u8 *pData)
0x08017668 BD10 POP {r4,pc}
0x0801766A 4A5C LDR r2,[pc,#368] ; @0x080177DC
0x0801766C 23BB MOVS r3,#0xBB
0x0801766E 329D ADDS r2,r2,#0x9D
0x08017670 A16E ADR r1,{pc}+4 ; @0x0801782C
0x08017672 A05E ADR r0,{pc}+2 ; @0x080177EC
0x08017674 F7EBFCEB BL.W rt_kprintf (0x0800304E)
0x08017678 E7FE B 0x08017678
206: {
207: static u8 i;
208: // RT_ASSERT(pWriteEncodeData->Ready == 0);//decoder没有缓冲区了
0x0801767A B570 PUSH {r4-r6,lr}
209: rt_mutex_take(EncodeDataBuffermutex,RT_WAITING_FOREVER);
0x0801767C 4C69 LDR r4,[pc,#420] ; @0x08017824
0x0801767E 4605 MOV r5,r0
0x08017680 F04F31FF MOV r1,#0xFFFFFFFF
0x08017684 69A0 LDR r0,[r4,#0x18]
0x08017686 F7EAFAEA BL.W rt_mutex_take (0x08001C5E)
210: if(pWriteEncodeData->Ready != 0 ) //老是有hard falut 指向这里 在汇编中指向读取Ready的值
211: {
0x0801768A 6960 LDR r0,[r4,#0x14]
0x0801768C 7801 LDRB r1,[r0,#0x00]
0x0801768E B139 CBZ r1,0x080176A0
212: rt_mutex_release(EncodeDataBuffermutex);
0x08017690 69A0 LDR r0,[r4,#0x18]
0x08017692 F7EAFBAC BL.W rt_mutex_release (0x08001DEE)
213: rt_kprintf("缓冲区没有空的\r\n");
214:
0x08017696 A086 ADR r0,{pc}+2 ; @0x080178B0
0x08017698 F7EBFCD9 BL.W rt_kprintf (0x0800304E)
215: return RT_ERROR;
216: }
217: for(i=0;i<20;i++)pWriteEncodeData->Data=*pData++;
218: pWriteEncodeData->Ready=1;
219: pWriteEncodeData=pWriteEncodeData->next;
220:
221: rt_mutex_release(EncodeDataBuffermutex);
222:
223: // rt_kprintf("Got a new voice data\r\n");
224:
225: return RT_EOK;
0x0801769C 2001 MOVS r0,#0x01
226: }
rtt 给出的信息
psr: 0x41000000
pc: 0x0801768c
lr: 0x08001dcf
r12: 0x00000000
r03: 0xffffffff
r02: 0x6c00966c
r01: 0x00000000
r00: 0xa00ab8e0
hard fault on thread: USART1R |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|