Other Parts Discussed in Thread: HALCOGEN
Hi,
I encountered a problem in debug EMAC module of RM48L952, I use the example of "HALCoGen_EMAC_Driver_with_lwIP_Demonstration",
I use ARP protocol to test send and receive, in my project, I can send ARP request packet successfully, but I can't receive any ARP response packet from PC. Why?
in my project, the ipMode parameter of lwIPInit() function is set to IPADDR_USE_STATIC. so in the lwIPInit() function, run netif_set_up() function. in the netif_set_up() function, I shield the etharp_gratuitous() function. this function send arp request packet.
I think the initial handshake as you say just is this process, isn't is?
if yes, but i shield the initial handshake via shielding the etharp_gratuitous() function.
in the EMAC_LwIP_Main() function, while(1) part, I send arp request packet every 2 seconds. But still not receive any data from PC. below the code:
while(1)
{
send_arp_request();
delayMs(2000);//延时2S。
sprintf(buf, "%d", countEMACCore0RxIsr);
sciDisplayText(scilinREG, buf, sizeof(buf));
}
Why?
in the "HALCoGen_EMAC_Driver_with_lwIP_Demonstration" project, to interrupt receiving part, I didn't do any changes except add a debug variable "countEMACCore0RxIsr". below, ISR code of interrupt receive:
static int countEMACCore0RxIsr = 0;
#pragma INTERRUPT(EMACCore0RxIsr, IRQ)
void EMACCore0RxIsr(void)
{
countEMACCore0RxIsr++;
lwIPRxIntHandler(0);
}
"countEMACCore0RxIsr" variable value always is 0 in debug process.
why?
thanks and regards