mirror of https://github.com/ARMmbed/mbed-os.git
Fix NUC472 Ethernet wrong INT status in RX_Action
parent
68334bcf18
commit
c65465fbfe
|
@ -252,15 +252,15 @@ void ETH_halt(void)
|
||||||
EMAC->CTL &= ~(EMAC_CTL_RXON_Msk | EMAC_CTL_TXON_Msk);
|
EMAC->CTL &= ~(EMAC_CTL_RXON_Msk | EMAC_CTL_TXON_Msk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int m_status;
|
||||||
|
|
||||||
void EMAC_RX_IRQHandler(void)
|
void EMAC_RX_IRQHandler(void)
|
||||||
{
|
{
|
||||||
unsigned int cur_entry, status;
|
unsigned int cur_entry, status;
|
||||||
|
|
||||||
status = EMAC->INTSTS & 0xFFFF;
|
m_status = EMAC->INTSTS & 0xFFFF;
|
||||||
EMAC->INTSTS = status;
|
EMAC->INTSTS = m_status;
|
||||||
if (status & EMAC_INTSTS_RXBEIF_Msk) {
|
if (m_status & EMAC_INTSTS_RXBEIF_Msk) {
|
||||||
// Shouldn't goes here, unless descriptor corrupted
|
// Shouldn't goes here, unless descriptor corrupted
|
||||||
printf("RX descriptor corrupted \r\n");
|
printf("RX descriptor corrupted \r\n");
|
||||||
//return;
|
//return;
|
||||||
|
@ -275,7 +275,7 @@ void EMAC_RX_Action(void)
|
||||||
|
|
||||||
cur_entry = EMAC->CRXDSA;
|
cur_entry = EMAC->CRXDSA;
|
||||||
|
|
||||||
if ((cur_entry == (u32_t)cur_rx_desc_ptr) && (!(status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occures
|
if ((cur_entry == (u32_t)cur_rx_desc_ptr) && (!(m_status & EMAC_INTSTS_RDUIF_Msk))) // cur_entry may equal to cur_rx_desc_ptr if RDU occures
|
||||||
break;
|
break;
|
||||||
status = cur_rx_desc_ptr->status1;
|
status = cur_rx_desc_ptr->status1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue