LPC546xx SDK2.2 Ethernet: code mistake

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC546xx SDK2.2 Ethernet: code mistake

1,089件の閲覧回数
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 返信

939件の閲覧回数
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 件の賞賛
返信