Register Access in S32G-VNP-RDB32 (SJA1110) Switch

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

Register Access in S32G-VNP-RDB32 (SJA1110) Switch

Jump to solution
982 Views
Atkinson
Contributor V

Hi,
I am looking to write the values into the Register 
can you give me the complete address for Reading and writing 
Address Name Access Reset Description
8Ch DYN_BE_LKP_
ENTRY0
R/W 0h
(FFFFFFFEh)

before 8ch  what would be the base address?
like for example it will have 0x3fc0008c so for this dynamic entry table we will have a complete address can you give me the complete address for 
8Ch DYN_BE_LKP_
ENTRY0
R/W 0h
(FFFFFFFEh)
90h DYN_BE_LKP_
ENTRY1
R/W 0h
94h DYN_BE_LKP_
ENTRY2
R/W 0h
98h DYN_BE_LKP_
ENTRY3
R/W 0h
9Ch DYN_BE_LKP_
ENTRY4
R/W 0h
A0h DYN_BE_LKP_
ENTRY5
R/W 0h
A4h DYN_BE_LKP_CTRL R/W 0h
(FF800000h)

can you Provide me the full address for configuring the Dynamic Entry in the register ?

and where this implementation need to be take place in SJA1110 Switch 

Tags (1)
0 Kudos
Reply
1 Solution
971 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

I understand it might not seem straightforward at first, but the concept is actually quite simple.

The final register address depends on the access method - whether you're accessing it internally via the M7 core over AHB, or externally via the SPI_AP interface. The base addresses differ depending on the access point.

The register address is calculated using the base address provided in Table 2 of UM11107. For example, for the switch subsystem, the base address is 0x00000000 for SPI_AP access and 0xFF000000 for AHB access.

In your case, the register 0x8C (DYN_BE_LKP_ENTRY0) becomes 0xFF00008C when accessed via AHB.

Now, here’s where it might get confusing: the SDK driver defines the following:

#define SJA1110_L2_ART_LE_ADDR (0x3fc00023) /**< Address of the l2ArtLockedEntry register *
 
The SWITCH_DRV_Write routine shifts the address left by 2 bits (<< 2) for internal (AHB) access. For SPI transfers (used in cascaded switch setups), no shift is applied. So, 0x3fc00023 << 2 results in 0xFF00008C.
 
I hope that with the explanation above, it makes sense now.
 

Best regards,

Pavel

View solution in original post

0 Kudos
Reply
1 Reply
972 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

I understand it might not seem straightforward at first, but the concept is actually quite simple.

The final register address depends on the access method - whether you're accessing it internally via the M7 core over AHB, or externally via the SPI_AP interface. The base addresses differ depending on the access point.

The register address is calculated using the base address provided in Table 2 of UM11107. For example, for the switch subsystem, the base address is 0x00000000 for SPI_AP access and 0xFF000000 for AHB access.

In your case, the register 0x8C (DYN_BE_LKP_ENTRY0) becomes 0xFF00008C when accessed via AHB.

Now, here’s where it might get confusing: the SDK driver defines the following:

#define SJA1110_L2_ART_LE_ADDR (0x3fc00023) /**< Address of the l2ArtLockedEntry register *
 
The SWITCH_DRV_Write routine shifts the address left by 2 bits (<< 2) for internal (AHB) access. For SPI transfers (used in cascaded switch setups), no shift is applied. So, 0x3fc00023 << 2 results in 0xFF00008C.
 
I hope that with the explanation above, it makes sense now.
 

Best regards,

Pavel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2134136%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERegister%20Access%20in%20S32G-VNP-RDB32%20(SJA1110)%20Switch%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134136%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EI%20am%20looking%20to%20write%20the%20values%20into%20the%20Register%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Ecan%20you%20give%20me%20the%20complete%20address%20for%20Reading%20and%20writing%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EAddress%20Name%20Access%20Reset%20Description%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3E8Ch%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3BDYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E(FFFFFFFEh)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Ebefore%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E8ch%26nbsp%3B%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bwhat%20would%20be%20the%20base%20address%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Elike%20for%20example%20it%20will%20have%200x3fc0008c%20so%20for%20this%20dynamic%20entry%20table%20we%20will%20have%20a%20complete%20address%20can%20you%20give%20me%20the%20complete%20address%20for%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E8Ch%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY0%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E(FFFFFFFEh)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E90h%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY1%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E94h%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY2%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E98h%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY3%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E9Ch%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY4%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EA0h%20DYN_BE_LKP_%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EENTRY5%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ER%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EA4h%20DYN_BE_LKP_CTRL%20R%2FW%200h%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E(FF800000h)%3CBR%20%2F%3E%3CBR%20%2F%3Ecan%20you%20Provide%20me%20the%20full%20address%20for%20configuring%20the%20Dynamic%20Entry%20in%20the%20register%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3Eand%20where%20this%20implementation%20need%20to%20be%20take%20place%20in%20SJA1110%20Switch%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Register%20Access%20in%20S32G-VNP-RDB32%20(SJA1110)%20Switch%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248906%22%20target%3D%22_blank%22%3E%40Atkinson%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%20id%3D%22%22%20componentdiv%3D%22%22%3E%0A%3CP%3EI%20understand%20it%20might%20not%20seem%20straightforward%20at%20first%2C%20but%20the%20concept%20is%20actually%20quite%20simple.%3C%2FP%3E%0A%3CP%3EThe%26nbsp%3Bfinal%26nbsp%3Bregister%20address%20depends%20on%20the%20access%20method%20-%20whether%20you're%20accessing%20it%20internally%20via%20the%20M7%20core%20over%20AHB%2C%20or%20externally%20via%20the%20SPI_AP%20interface.%20The%20base%20addresses%20differ%20depending%20on%20the%20access%20point.%3C%2FP%3E%0A%3CP%3EThe%20register%20address%20is%20calculated%20using%20the%20base%20address%20provided%20in%20Table%202%20of%20UM11107.%20For%20example%2C%20for%20the%20switch%20subsystem%2C%20the%20base%20address%20is%26nbsp%3B%3CSTRONG%3E0x00000000%26nbsp%3B%3C%2FSTRONG%3Efor%20SPI_AP%20access%20and%26nbsp%3B%3CSTRONG%3E0xFF000000%26nbsp%3B%3C%2FSTRONG%3Efor%20AHB%20access.%3C%2FP%3E%0A%3CP%3EIn%20your%20case%2C%20the%20register%26nbsp%3B%3CSTRONG%3E0x8C%26nbsp%3B%3C%2FSTRONG%3E(DYN_BE_LKP_ENTRY0)%20becomes%26nbsp%3B%3CSTRONG%3E0xFF00008C%26nbsp%3B%3C%2FSTRONG%3Ewhen%20accessed%20via%20AHB.%3C%2FP%3E%0A%3CP%3ENow%2C%20here%E2%80%99s%20where%20it%20might%20get%20confusing%3A%20the%20SDK%20driver%20defines%20the%20following%3A%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%23define%20SJA1110_L2_ART_LE_ADDR%20(%3CSTRONG%3E0x3fc00023%3C%2FSTRONG%3E)%20%2F**%26lt%3B%20Address%20of%20the%20l2ArtLockedEntry%20register%20*%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EThe%20SWITCH_DRV_Write%20routine%20shifts%20the%20address%20left%20by%202%20bits%20(%26lt%3B%26lt%3B%202)%20for%20internal%20(AHB)%20access.%20For%20SPI%20transfers%20(used%20in%20cascaded%20switch%20setups)%2C%20no%20shift%20is%20applied.%20So%2C%20%3CSTRONG%3E0x3fc00023%3C%2FSTRONG%3E%20%26lt%3B%26lt%3B%202%20results%20in%20%3CSTRONG%3E0xFF00008C%3C%2FSTRONG%3E.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EI%20hope%20that%20with%20the%20explanation%20above%2C%20it%20makes%20sense%20now.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E