cancel
Showing results for 
Search instead for 
Did you mean: 

What is ETH MAC endianness?

brberie
Associate II
Posted on December 08, 2012 at 22:19

Subject says it all. Just for clarity if length of my frame is 1024 bytes what should I put into tx buffer:  0x1000(Big Endian) or 0x0010(Little Endian)? I do know that ethernet itself is BE and MCU is LE, so does MAC do the conversion or not?

Thanks.

#ethernet-mac
2 REPLIES 2
Posted on December 09, 2012 at 00:08

I'm pretty sure the buffer is sent in byte order, look at some received packets.

Buffer[x+0] = 0x04;

Bufer[x+1] = 0x00;

0x1000 = 4096, 0x0400 = 1024

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
brberie
Associate II
Posted on December 09, 2012 at 00:25

I'm tiered of guessing...I can't do anything because my code doesn't work and I'm trying to figure out why...

So, yes you're correct: 0x0400 = 1024 and if MAC is DUMB-endian (doesn't do conversion) than my code has to convert uint16_t i = 1024(0x0004LE) to 4 (0x0400BE).

I'd like to see ANY frame byte by byte to understand MAC actions  for every frame field and without guessing!