AnsweredAssumed Answered

Transmission Problem in MPC 5777M FEC

Question asked by yalamanda dosakyala on May 30, 2017
Latest reply on Jun 5, 2017 by yalamanda dosakyala

Hi All, I am developing the Ethernet driver  for MPC 5777M, My driver (FEC) is not clearing the Ready bit ,when I call Eth_tx function shown below.

 

void Eth_Tx(u16_t len)
{
    au32TxBDs[0U] = 0x8C000000U | len;
    Reg32Write(FEC_TDAR, 0x01000000U);
    while(0x80000000U == (au32TxBDs[0U] & 0x80000000U));

    au32TxBDs[0] = 0x00000000U;  // Clear the Ready bit, the rest will be set later
    au32TxBDs[1] = (u32_t)au8TxBuff;  //Data pointer
    au32TxBDs[0] = 0x20000000U; // Set the Empty bit and the Wrap bit
}

 

And my buffer descriptors are

 

/* Buffer sizes and counts */
#define RX_BUFF_SIZE (1536u)
#define TX_BUF_SIZE (1536u)

 

/* Buffer descriptors: */
__attribute__(( aligned(16) ))
volatile u32_t au32RxBDs[2U]= {0u};
__attribute__(( aligned(16) ))
volatile u32_t au32TxBDs[2U] = {0u};

 

/* Buffers: */
__attribute__(( aligned(64) ))
u8_t au8RxBuffs[RX_BUFF_SIZE] = {0u};
__attribute__(( aligned(64) ))
u8_t au8TxBuff[TX_BUF_SIZE] = {0u};

 

 

Can anyone help me how to sort out this problem ?

Outcomes