ENV: dm6467t + CCS4.1 + dm6467_h264dec_1_10_05_03_production + DSP/BIOS 5.41
I create a project, and then create a H264 decode task in DSP/BIOS (only one task ecpect idle task in this project , and the H264decode use the dm6467_h264dec_1_10_05_03_production code). When i use this project to decode the 264 raw file continuous (without task switch), the project running OK; But when i use the TSK_sleep blocked the decode task, the decode task cannot run back. If i don't use the decode function , the task switch is ok.
I debug this project with ROV in ccs4. I found that the LOG_system moudle info have many message :SEM: post _TSK_mutex (0x8810f4fc) . Because i use the decode code in my task, and the decode code use the HDVICP,EDMA and so on. Maybe the between the dsp and other co-processor have switch there TSK very often (but i can not see the code in the decode lib from Ti), and I don't know how to suspend and restart their Mutex mecanism. When decode one frame I must blocking my decode task a few interval. how to finish this task switch ?
+
If i don't call the decode code, i can call TSK_sleep() or other SEM_pend() function to blocked my task and switch task successful.
When i call the decode code and make a breakpoint before call TSK_sleep(), I found that there are a lot of same message: SEM: post _MEM_mutex (0x8810f524) in the ROV(CCS4.1) LOG_system info. And then i run the TSK_sleep() and halt the task(use the halt button in ccs4,because the task in running and not run back my task), i found the next message in LOG_system: SEM: post _MEM_mutex (0x8810f524); SWI: begin KNL_swi (TSK scheduler) (0x118186f8);TSK: blocked TSK_vehicle (0x83f2406c);TSK: running TSK_idle (0x83f2400c);SWI: end KNL_swi (TSK scheduler) (0x118186f8) state = still ready (The TSK_vehicle is my decode tsk).And i also found my task state in the ROV is "unknown", the idle task state is "running" . When i halt the task everytime, i found the task run in CSL_intcVectorTable() function (the function in the decode code lib) by use the Disassembly Window. I also found the B3 register address is the "fxnrt" index. I don't know what's happen in my task. Because I don't know what happen in the decode lib,maybe there are very offen mutex between dsp,HDVICP,EDMA and so on, so i don't know if the decode lib process is non-blocking process (i don't have the source code of decode lib). If the process is non-blocking, i want to know how to block the decode process lib.
I also test my task, use the decoder routine to decode just one frame, and free all the resource in code. But that also cannot blocked my task.
Now, i am afraid that the codec decoder cannot stop after decode just one frame, but i cannot found the answer in user guide of the dm6467_h264dec_1_10_05_03_production and the internet. Ireally want to know if the do-while loop decode process moudule in dm6467_h264dec_1_10_05_03_production's routine can be suspended?
I also found that if i use the TSK_sleep(X_Ms) , my task will be the run to "unknown" state. I means if the task switch have the time thresh, such as 10ms, the task will run in "unknown" state. But if i replace the time with "SYS_FOREVER", my task will be ok (run in the "blocked" state).
And i also found that if i run the decode code, the interrupt arm2dsp has no effection,the HWI isr will not run. (In my program the am2dsp interrupt will trigger a HWI isr) The decode coder will influence the HWI isr ?
what's happen? My dm6467 is 990MHz and the clock setting looks like correct.
Thanks.