Limit max of NUC472 EMAC recv frame len as 1518

pull/12057/head
cyliangtw 2019-12-09 19:15:23 +08:00
parent 410e4173b1
commit 54d8c40f96
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ void numaker_eth_init(uint8_t *mac_addr)
init_rx_desc();
numaker_set_mac_addr(mac_addr); // need to reconfigure hardware address 'cos we just RESET emc...
/* Limit the max receive frame length to 1514 + 4 */
EMAC->MRFL = 1518;
reset_phy();
EMAC->CTL |= EMAC_CTL_STRIPCRC_Msk | EMAC_CTL_RXON_Msk | EMAC_CTL_TXON_Msk | EMAC_CTL_RMIIEN_Msk | EMAC_CTL_RMIIRXCTL_Msk;