Hello
I met an issue when use BF607, when there is a network storm, the EMAC DMA Rx direction will into RU status (EMAC_DMA_STAT.RU = 1), and the DMA will be suspended. Following the manual of the BF607, the description about RU is as follow:
The EMAC_DMA_STAT.RU bit indicates that the Next Descriptor in the Receive List is owned by the application and cannot be acquired by the DMA. Receive Process is suspended. To resume processing Receive descriptors, the application should change the ownership of the descriptor and issue a Receive Poll Demand command. If no Receive Poll Demand is issued, Receive Process resumes when the next recognized incoming frame is received.
According to the description about RU, when DMA go into suspend status, I clear all the descriptors list and change the status of descriptor as DMAOWN:
for ( i = 0; i < RX_BUF_NUM; i++ )
{
uint8 *p = (uint8 *)(pDmaDesc->StartAddr);
flush_data_buffer(p, p + ETH_FRAME_BUF_LEN - 1, 1);
pDmaDesc->ControlDesc = ETH_FRAME_BUF_LEN | (1UL << 14); // use next descriptor
pDmaDesc->Status |= ADI_EMAC_DMAOWN; // OWN is DMA
pDmaDesc = pDmaDesc->pNextDesc;
}
And then write rx poll register as 0 to issue a receive poll demand:
*pREG_EMAC0_DMA_RXPOLL = 0;
However, it does not work anymore, the DMA is still in suspend status, and I check the EMAC_DBG.RXFIFOST, it is in Rx FIFO Full status all the time.
How can I deal this issue when DMA go into suspend status?
Thread Notes
Moved from ADSP-BF60x to CrossCore Embedded Studio and Add-ins on Wednesday, November 8, 2023 5:07:25 AM by Divya.P