VLAN Configuration SJA1105Q

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

VLAN Configuration SJA1105Q

跳至解决方案
1,904 次查看
scallaway
Contributor I

Hi, I am looking through the data sheets, application hints, and software user manual for the SJA1105Q automotive ethernet IC. Looking through the example python scripts for the SJA1105Q development board AH1707, I am confused by the write_vlan_lookup_table.py file. I am confused by the hex values used for VMEMB_PORT and all of the following hex values for the configuration variables. Why are the member ports set to 0x07? My understanding has been to convert it to binary (0b00111) which corresponds to ports 0, 1, and 2 (or 3 and 4) being set as the member ports for this VLAN. The comment next to this line of code states ##Member ports (_ _ _ P4 P3 P2 P1 P0) which I don't understand either.

The intended use case for me is to have 3 VLANs where

P0 <--> P1 VLAN 0
P0 <--> P2 VLAN 1

P0 <--> P3 VLAN 2

Any help would be greatly appreciated!

0 项奖励
回复
1 解答
1,848 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @scallaway 

the comment "##Member ports (_ _ _ P4 P3 P2 P1 P0)" shows the bit mapping.
P0 corresponds to 0x01, P1 corresponds to 0x02 etc. Upper three bits are not used because there are 5 ports only.
I agree that this is not very clear in the documentation.
I found this example in AH1704 which explains it a bit:

lukaszadrapa_0-1708324832787.png


Regards,
Lukas

在原帖中查看解决方案

2 回复数
1,849 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @scallaway 

the comment "##Member ports (_ _ _ P4 P3 P2 P1 P0)" shows the bit mapping.
P0 corresponds to 0x01, P1 corresponds to 0x02 etc. Upper three bits are not used because there are 5 ports only.
I agree that this is not very clear in the documentation.
I found this example in AH1704 which explains it a bit:

lukaszadrapa_0-1708324832787.png


Regards,
Lukas

1,840 次查看
scallaway
Contributor I
Thank you, Lukas!
0 项奖励
回复