SDK API GenerateMAC and GenerateMACAddrMode Quetion.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SDK API GenerateMAC and GenerateMACAddrMode Quetion.

1,274件の閲覧回数
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 返答(返信)

899件の閲覧回数
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,267件の閲覧回数
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 件の賞賛

911件の閲覧回数
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 件の賞賛