LPC546xx SDK2.2 Ethernet: code mistake

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC546xx SDK2.2 Ethernet: code mistake

598 Views
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

Labels (2)
0 Kudos
1 Reply

448 Views
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 Kudos