Ethernet frame starts from nx_packet_data_start instead of nx_packet_prepend_ptr

Sulav Lal Shrestha 361 Reputation points

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

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:

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

Accepted answer
  1. Tiejun Zhou 1,126 Reputation points Microsoft Employee

    @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