LPC546xx SDK2.2 Ethernet: code mistake

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC546xx SDK2.2 Ethernet: code mistake

1,080 次查看
hlsamts
Contributor III

There is a mistake in the function ENET_DescriptorInit of SDK2.2:

The original order is:

  1. Determine, whether the RX interrupt is enabled:
    intRxEnable = (base->DMA_CH[channel].DMA_CHX_INT_EN & ENET_DMA_CH_DMA_CHX_INT_EN_RIE_MASK) ? true : false;
  2. Initialize TX descriptors:
    if (ENET_TxDescriptorsInit(base, bufferConfig, intTxEnable, channel) != kStatus_Success) ...
  3. Determine, whether the TX interrupt is enabled:
    intTxEnable = (base->DMA_CH[channel].DMA_CHX_INT_EN & ENET_DMA_CH_DMA_CHX_INT_EN_TIE_MASK) ? true : false;
  4. Initialize RX descriptors:
    if (ENET_RxDescriptorsInit(base, bufferConfig, intRxEnable, channel, doubleBuffEnable) != kStatus_Success) ...

The problem is: in step 2 the variable intTxEnable is used uninitialized.

One possible order of the steps would be: 3-2-1-4

Best regards,

Holger Sachs

标签 (2)
0 项奖励
回复
1 回复

930 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Holger Sachs,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
I'll contact with the AE team about this 'issue'.
Have a great day,

TIC

0 项奖励
回复