Hi,all.
I have a problem about ENET receive,I can run the project about enet_rmii_udp. Now I want to change the ENET receive mode, change the interrupt to polling ,but it does not work.
Does anyone know , how to config the register's bit or change the code, ENET can receive without the interrupt ?
Hi,
per my understanding you should comment below 3 lines that set priority and enable RX interrupt in ENET_Driver_Rx_Init function.
INTC.PSR[211].B.PRC_SELN = 0x8; /* IRQ sent to Core 0 */
INTC.PSR[211].B.PRIN =10; /* IRQ priority = 10 (15 = highest) */
// Enable the generation of Rx frame interrupts
ENET.EIMR.B.RXF = 1;
then within main while loop you should check if EIR[RXF] flag is set and then call ENET_Rx_Handler function. For example using
if (ENET.EIR.B.RXF == 1)
{
ENET_Rx_Handler();
}
BR, Petr
Thank you for reply
But I still do not understand,if we don't use ENET_Rx_Handler in the vector table,close INTC.PSR[211].B.PRC_SELN = 0x8; and INTC.PSR[211].B.PRIN =10;
I just take out the code from ENET_Rx_Handler() and put it in the while, make it polling, but it can receive frames only one cycle, do I miss something?