标题: TL138_1808_6748-EVM-A3 网络发送数据错误 [打印本页] 作者: 自制力 时间: 2015-3-16 16:27 标题: TL138_1808_6748-EVM-A3 网络发送数据错误 想实现网络底层通信(直接写链路层数据),方法是直接调用sitaraif_transmit,结果是在正常通信一段时间后(正确发送数据,用抓包工具可以查看到完整数据),数据发送不成功。调试时发现,卡在sitaraif_transmit函数以下代码:
/* For the first time, write the HDP with the filled bd */
if(txch->active_tail == NULL) {
EMACTxHdrDescPtrWrite(sitaraif->emac_base, (unsigned int)(active_head), 0);
}
/*
* Chain the bd's. If the DMA engine, already reached the end of the chain,
* the EOQ will be set. In that case, the HDP shall be written again.
*/
else {
curr_bd = txch->active_tail;
curr_bd->next = active_head;
if(curr_bd->flags_pktlen & EMAC_BUF_DESC_EOQ) {
/* Write the Header Descriptor Pointer and start DMA */
EMACTxHdrDescPtrWrite(sitaraif->emac_base, (unsigned int)(active_head), 0);
}
curr_bd->flags_pktlen 始终没有置 EMAC_BUF_DESC_EOQ 标志位,绕过发送代码段。
在代码中没有发现在何处置 EMAC_BUF_DESC_EOQ 标志位,然后查看数据手册,发现如下图所示:
C:\Documents and Settings\Administrator\桌面\1[attach]195[/attach]内容应该是这个标志位由EMAC自动设置,那我想问下这个标志位是要怎么设置呢??? 作者: 希望缄默 时间: 2015-3-16 16:30
在 SYS/BIOS 下有提供基于 NDK 的 RawSocket EMAC 通信例程
建议用这个作者: 自制力 时间: 2015-3-16 17:02