Hi,
I am developing an Ethernet driver for PRU-ICSSG (SR 2.0) using dual mac firmware for AM6548 chip based on a proprietary RTOS.
I am observing a corruption in the packet during transmission. I am trying to send an ICMP response (via ICSSG2 port 0) as below:
------ PACKET START -------
0x84 , 0xaf , 0xec , 0x73 , 0x1 , 0xf3 , 0x0 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x8 , 0x0 , 0x45 , 0x0 , 0x0 , 0x3c , 0x0 , 0x1 , 0x0 , 0x0 , 0x40 , 0x1 , 0xef , 0x6c , 0xc0 , 0xa8 , 0x5 , 0x1 , 0xc0 , 0xa8 , 0x5 , 0x2 , 0x0 , 0x0 , 0x54 , 0x7e , 0x0 , 0x1 , 0x0 , 0xdd , 0x61 , 0x62 , 0x63 , 0x64 , 0x65 , 0x66 , 0x67 , 0x68 , 0x69 , 0x6a , 0x6b , 0x6c , 0x6d , 0x6e , 0x6f , 0x70 , 0x71 , 0x72 , 0x73 , 0x74 , 0x75 , 0x76 , 0x77 , 0x61 , 0x62 , 0x63 , 0x64 , 0x65 , 0x66 , 0x67 , 0x68 , 0x69 ,
------ END START -------
I have configured the tx port queue for the firmware as 0x70000000 (MSMC SRAM region). After UDMA enqueued the packet to the ring, I have checked the contents of the tx port buffer region. I performed a Cache invalidation of the tx port queue regioin found that the buffer is transferred properly to the tx port queue region, from 0x70000080.
But the packet was sent out corrupted on the wire.
The Ethernet header was corrupted , first 2 octets changed from 0x84 0xaf to 0x80 0xab, the packet type got changed from 0x0800 to 0x0000. Also the body of the packet was corrupted.
Also, I have seen another issue in the reception path, the ARP packets does not seem to be forwarded to the driver by the firmware. So, I added static ARP entries to the host PC and the the target device and tried to ping, and got the above behavior. The RX ICMP packet is correctly forwarded to the driver. Also other broadcast packets are received. I have configured the firmware based on the emac driver (v5).
Could you please provide some clues on how to debug the above TX and RX (ARP packets) issues? Is there any way to enable any firmware logs. Any help will be highly appreciated.
Best Regards,
Debarun