Ethernet frame starts from nx_packet_data_start instead of nx_packet_prepend_ptr

Sulav Lal Shrestha 361 Reputation points
2022-06-23T01:10:16.37+00:00

How to make sure that the ethernet frame starts from nx_packet_prepend_ptr instead of nx_packet_data_start ? The data starts from nx_packet_data_start which is why I have to move the entire packet by 2 bytes with this command:

memmove((packet_ptr -> nx_packet_prepend_ptr), (packet_ptr -> nx_packet_prepend_ptr)-2, packet_ptr -> nx_packet_length);  

I have adapted the netx driver for SAME70 board from the getting started example for SAME54. I can see a line like
214081-image.png

in the _nx_driver_hardware_initialize. But the ethernet frame still starts from nx_packet_data_start.

How can I fix this this?

Thank you.

Related to this question: https://learn.microsoft.com/en-us/answers/questions/589688/packets-received-from-ethernet-interface-getting-d.html

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
330 questions
{count} votes

Accepted answer
  1. Tiejun Zhou 1,126 Reputation points Microsoft Employee
    2022-06-27T02:37:16.677+00:00

    @Sulav Lal Shrestha , for STME54 driver, the received data is offset 2 bytes from the start of the receive buffer. See code here and here. Could you check if it is the same case for STME70? If not, you will need to set receive buffer to (packet_ptr->nx_packet_data_start+2) directly.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful