SDK API GenerateMAC and GenerateMACAddrMode Quetion.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK API GenerateMAC and GenerateMACAddrMode Quetion.

1,140 Views
814420552
Contributor III

hello,

When call the API CSEC_DRV_GenerateMAC() and CSEC_DRV_GenerateMACAddrMode() calculates the same mesage, why is the result different? and We try to modify the alignment of the message,as shown in the figure below, looking forward to your reply, thank you.

 

CSEC_DRV_GenerateMACAddrMode():

MAC2.JPG

 

CSEC_DRV_GenerateMAC() MAC1.JPG

 

3 Replies

765 Views
FrankPan
Contributor I

Now I know the reason.

Because the ARM core MCU consider a 32-bit number as little-endian.

For example:

0x12345678 is considered as [0x78, 0x56, 0x34, 0x12].

The two API does not consider the number as same persperctive.

So the resulting calcuted results are different, which is strange.

NXP should tell the programmer to consider this subtle things. 

 

 

 

 

 

1,133 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there are two possible reasons for such behavior:

lukaszadrapa_0-1601383539777.png

Make sure that both conditions are met. 

Regards,

Lukas

 

 

 

0 Kudos

777 Views
FrankPan
Contributor I

Hello. I encounter the same problem. Still can not find the reason why.

the API "CSEC_DRV_GenerateMACAddrMode" seems do not work.

That's strange.

0 Kudos