This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Andy Yin:
您好,非常感谢您的回复,#define SIMULATOR_SUPPORT是注释掉的,我在PDK_17、_19、_21上都跑过,结果都一样,下面这些是pdk _21版本的测试结果:
[C66xx_0] **************************************************
[C66xx_0] *************** BCP Example Start ****************
[C66xx_0] **************************************************
[C66xx_0] Using BCP Driver version: 0x1000009 Version Info: BCP Driver Revision: 01.00.00.09:May 25 2012:13:13:45
[C66xx_0] [Core 0]: L1D cache size 0. L2 cache size 0.
[C66xx_0] [Core 0]: BCP instance 0 successfully initialized
[C66xx_0] [Core 0]: BCP driver successfully opened
[C66xx_0] Global FDQ 877 successfully setup with 256 descriptors
[C66xx_0]
[C66xx_0] -------------- LTE UL Test Start --------------
[C66xx_0] Rx FDQ 736 successfully setup with 62 descriptors
[C66xx_0] Flow 0 opened to send data to RxQ: 900
[C66xx_0] Tx FDQ 737 successfully setup with 2 descriptors
[C66xx_0] LTE UL Test: PASS
[C66xx_0]
[C66xx_0] -------------- LTE DL Test Start --------------
[C66xx_0] Rx FDQ 736 successfully setup with 62 descriptors
[C66xx_0] Flow 0 opened to send data to RxQ: 900
[C66xx_0] Tx FDQ 737 successfully setup with 2 descriptors
程序到这就halt住了,而且四个core显示的都是running状态,感觉bcp_send的数据并没有收到,中断没有启动,所以信号量hRxSem并没有post,因此程序停在了Semaphore_pend (hRxSem, BIOS_WAIT_FOREVER)的地方。
麻烦您给看看,谢谢啦。
Andy Yin:
您好,非常感谢您的解答,问题的确是由CRC模块导致,不经过CRC模块程序就可以一直跑下去。我仔细阅读了您上面提到的C6670 Errata文档,但文档中只是概括的说用软件方法实现,有一些细节的东西我还不是很了解,想再请教一下。我现在是自己编程给输入信息比特加CRC校验,并直接注释掉bcp_lte_dl.c中下面部分:
/* Header 2: CRC Header */
prepare_crchdr_cfg (&crcHdrCfg, radioStd, tbSize, codeBlkParams.numFillerBits, 0, 0, 0, 0, 0, 0, 0, NULL);
if (Bcp_addCRCHeader (&crcHdrCfg, pDataBuffer, &tmpLen) < 0)
{
#ifdef BCP_EXAMPLE_DEBUG
System_printf ("Failed to add CRC Header to packet \n");
#endif
return -1;
}
pDataBuffer += tmpLen;
dataBufferLen += tmpLen;
tmpLen = 0;
但结果不对,如下所示:
[C66xx_0] -------------- LTE DL Test Start --------------
[C66xx_0] Rx FDQ 736 successfully setup with 62 descriptors
[C66xx_0] Flow 0 opened to send data to RxQ: 900
[C66xx_0] Tx FDQ 737 successfully setup with 2 descriptors
[C66xx_0] Reading test configuration ...
[C66xx_0] Sending a packet of len 432 to BCP ...
[C66xx_0] Waiting on output from BCP ...
[C66xx_0] Got 1 packet(s) from BCP
[C66xx_0] [Pkt 0]: Total Len: 50416 DestnTag: 0x0 SrcId: 0x0
[C66xx_0] LTE DL Test: FAILED
[C66xx_0]
[C66xx_0] -------------- BCP Testing Complete --------------
[C66xx_0] Num Test Failures = 1
[C66xx_0] **************************************************
[C66xx_0] ****************** BCP Example End ***************
[C66xx_0] **************************************************
[C66xx_0] [Core 0]: BCP Example Unloaded successfully
[C66xx_0] BcpAlloc Cnt: 135 BcpFree Cnt: 135
[C66xx_0] CppiMalloc Cnt: 1 CppiFree Cnt: 0
[C66xx_0] QmssAlloc Cnt: 0 QmssFree Cnt: 0
自己改来改去还是不对,所以想问一下您还需要配置哪些东西,非常感谢!
您好,
1. 所谓用软件实现就是写code在BCP外面实现CRC后再送到BCP;
2. 去掉CRC后还需要修改2点:
a) global header的长度需要减掉CRC header len(=4),如代码:bcpGlblHdrCfg.hdr_end_ptr = 24修改为20;
b) 注意BCP header的长度128bit对齐,如代码,由于减掉CRC header后长度依然为128bit align,所以如下代码不需要修改,但是需要注意!
/* Add padding to align data on 128 bits */
pDataBuffer += 0;
dataBufferLen += 0;
3) 注意BCP输入输出数据格式配置,如下代码:
rxCfg.tmFlowCfg.endian_in = Bcp_EndianFormat_32;
rxCfg.tmFlowCfg.endian_out = Bcp_EndianFormat_32;
输入数据在128bit内以32bit为单位进行了交换,如w3w2w1w0输入到BCP后为w0w1w2w3,所以在软件在进行CRC之前需要做相应的转换,CRC之后还需要交换过来,然后送入BCP。
上述格式转换只是针对例子来解释,实际应用中根据需要进行灵活配置即可。建议还是先看看BCP user guide,这样可以加速后续的开发。请参考!