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

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

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

跳至解决方案
905 次查看
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 

标记 (1)
0 项奖励
回复
1 解答
894 次查看
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 项奖励
回复
1 回复
895 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2134136%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32G-VNP-RDB32%20(SJA1110)%20%E4%BA%A4%E6%8D%A2%E6%9C%BA%E4%B8%AD%E7%9A%84%E5%AF%84%E5%AD%98%E5%99%A8%E8%AE%BF%E9%97%AE%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%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3E%3C%2FSTRONG%3E%3CSPAN%3E%E6%88%91%E6%83%B3%E6%8A%8A%E5%80%BC%E5%86%99%E8%BF%9B%E5%AF%84%E5%AD%98%E5%99%A8%E4%BD%A0%E8%83%BD%E4%B8%8D%E8%83%BD%E7%BB%99%E6%88%91%E4%B8%80%E4%B8%AA%E5%AE%8C%E6%95%B4%E7%9A%84%E5%9C%B0%E5%9D%80%E6%9D%A5%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%E8%AF%BB%E5%86%99%E5%9C%B0%E5%9D%80%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%E5%90%8D%E7%A7%B0%E8%AE%BF%E9%97%AERESET%E6%8F%8F%E8%BF%B0%20%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%20%3CSTRONG%3E8Ch%20DYN_BE_LKP_%20%20ENTRY0%20%20R%2FW%200h%20%20(ffffFFe%20h)%208ch%3C%2FSTRONG%3E%20%E4%B9%8B%E5%89%8D%E7%9A%84%E5%9F%BA%E5%9D%80%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%3CSPAN%3E%E6%AF%94%E5%A6%82%E5%AE%83%E4%BC%9A%E6%9C%89%200x3fc0008c%20%E6%89%80%E4%BB%A5%E5%9C%A8%E8%BF%99%E4%B8%AA%E5%8A%A8%E6%80%81%E5%85%A5%E5%8F%A3%E8%A1%A8%E4%B8%AD%E6%88%91%E4%BB%AC%E4%BC%9A%E6%9C%89%E5%AE%8C%E6%95%B4%E7%9A%84%E5%9C%B0%E5%9D%80%E4%BD%A0%E8%83%BD%E4%B8%8D%E8%83%BD%E7%BB%99%E6%88%91%208Ch%20DYN_BE_LKP_%20%20ENTRY0%20%3C%2FSPAN%3E%20R%2FW%200h%20%3CBR%20%2F%3E%20%3CSPAN%3E(%3C%2FSPAN%3EfffffF%3CBR%20%2F%3E%20%3CSPAN%3Eeh)%2090h%20DYN_BE_LKP_%20ENTRY1%20R%2FW%200h%2094h%20DYN_BE_LKP_%20ENTRY2%20R%2FW%200h%20%2098h%20DYN_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3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%E4%BB%A5%E5%8F%8A%E9%9C%80%E8%A6%81%E5%9C%A8%20SJA1110%20Switch%20%E4%B8%AD%E5%AE%9E%E7%8E%B0%E6%AD%A4%E5%8A%9F%E8%83%BD%E7%9A%84%E5%9C%B0%E6%96%B9%20%3CBR%20%2F%3E%20%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%3E%E4%BD%A0%E5%A5%BD%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%E3%80%81%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%20id%3D%22%22%20componentdiv%3D%22%22%3E%0A%3CP%3E%E6%88%91%E7%9F%A5%E9%81%93%E8%BF%99%E4%B9%8D%E7%9C%8B%E8%B5%B7%E6%9D%A5%E5%8F%AF%E8%83%BD%E5%B9%B6%E4%B8%8D%E7%AE%80%E5%8D%95%EF%BC%8C%E4%BD%86%E5%AE%9E%E9%99%85%E4%B8%8A%E8%BF%99%E4%B8%AA%E6%A6%82%E5%BF%B5%E9%9D%9E%E5%B8%B8%E7%AE%80%E5%8D%95%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6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20AHB%20%E8%AE%BF%E9%97%AE%E5%AF%84%E5%AD%98%E5%99%A8%3CSTRONG%3E0x8C%20%3C%2FSTRONG%3E%EF%BC%88DYN_BE_LKP_ENTRY0%EF%BC%89%E6%97%B6%EF%BC%8C%E5%AF%84%E5%AD%98%E5%99%A8%E4%BC%9A%E5%8F%98%E6%88%90%3CSTRONG%3E0xFF00008C%20%3C%2FSTRONG%3E%E3%80%82%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%EF%BC%8C%E5%8F%AF%E8%83%BD%E4%BC%9A%E8%AE%A9%E4%BA%BA%E6%84%9F%E5%88%B0%E5%9B%B0%E6%83%91%E7%9A%84%E5%9C%B0%E6%96%B9%E6%9D%A5%E4%BA%86%EF%BC%9ASDK%20%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E5%AE%9A%E4%B9%89%E4%BA%86%E4%BB%A5%E4%B8%8B%E5%86%85%E5%AE%B9%EF%BC%9A%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%23define%20SJA1110_L2_ART_LE_ADDR%3CSTRONG%3E(0x3fc00023%3C%2FSTRONG%3E)%20%2F**%26lt%3B%20l2ArtLockedEntry%20%E5%AF%84%E5%AD%98%E5%99%A8%E7%9A%84%E5%9C%B0%E5%9D%80%20*%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3ESWITCH_DRV_Write%20%E4%BE%8B%E7%A8%8B%E5%B0%86%E5%9C%B0%E5%9D%80%E5%B7%A6%E7%A7%BB%202%20%E4%BD%8D%20(%26lt%3B%26lt%3B%202)%EF%BC%8C%E7%94%A8%E4%BA%8E%E5%86%85%E9%83%A8%20(AHB)%20%E8%AE%BF%E9%97%AE%E3%80%82%E5%AF%B9%E4%BA%8E%20SPI%20%E4%BC%A0%E8%BE%93%EF%BC%88%E7%BA%A7%E8%81%94%E5%BC%80%E5%85%B3%E8%AE%BE%E7%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