V71 Ethernet GMAC write buffer full ASF4 mac_async_write() fail

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

What do we do when mac_async_write() faills ?? Do we just call it again or do I have to clear some register bits? Is there an easy way to know if the write buffer is full and wait until it is no longer full? I ma doing this because I am having transmit errors with LWIP-1.4.0  because mac_async_write() returns fails frequently in mac_low_level_output from lwip\port\ethif_mac.c. I am jumping between investigating how LWIP works and making my own Ethernet driver.

 

I am looking at hpl_gmac_config.h.  Is it correct to say that the transmit buffer maximum size is 4K and that the number of packets times the packet size of each has to make a total less than 4k bytes?

 

CONF_GMAC_TXDESCR_NUM  * CONF_GMAC_TXBUF_SIZE  <  (CONF_GMAC_DCFGR_TXPBMS +1) *2K

hpl_gmac_config.h

// <o> Number of Transmit Buffer Descriptor <1-255>
// <i> Number of Transmit Buffer Descriptor
// <id> gmac_arch_txdescr_num
#ifndef CONF_GMAC_TXDESCR_NUM
#define CONF_GMAC_TXDESCR_NUM 2
#endif


// <o> Byte size of Transmit Buffer <64-10240>
// <i> Byte size of buffer for each transmit buffer descriptor.
// <id> gmac_arch_txbuf_size
#ifndef CONF_GMAC_TXBUF_SIZE
#define CONF_GMAC_TXBUF_SIZE 1500
#endif


// <o> Transmitter Packet Buffer Memory Size Select
// <i> Select the Transmitter packet buffer size
// <0=> 2 Kbytes
// <1=> 4 Kbytes
// <id> gmac_arch_dcfgr_txpbms
#ifndef CONF_GMAC_DCFGR_TXPBMS
#define CONF_GMAC_DCFGR_TXPBMS 1
#endif

 

 

ASF4 API Reference Manual