Dynamic configuration in sja1110

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

Dynamic configuration in sja1110

Jump to solution
10,927 Views
Atkinson
Contributor V

Hi, 

I would like to configure l2 lookup table dynamically how can I configure it ?

Without using ECT tool how can I configure the l2 lookup table ? 

Any examples?

Regards 

Atkinson

Tags (1)
0 Kudos
Reply
1 Solution
10,164 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

I apologize for late response caused my current workload.

 

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
33 Replies
3,454 Views
Atkinson
Contributor V

Hi @PavelL 

1.) So this change of accessing the register for Dynamic configuration need to be done in S32G or SJA1110 switch ?
2.)if via SJA1110 switch whether reading and writing the register by SPI need to be performed and where this implementation need to be carried in between SWITCH_DRV?
3.) where we can create our Dynamic entry so that it will get append in switch 

More Explanation would be great help!!



0 Kudos
Reply
3,446 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

Answers to your question are related to your application use case.

You can create a dynamic entry absolutely anywhere, also in S32G or in SJA1110:

  • transfer the entry in any supported way to the S32G and write it to SJA1110 via SPI, or via Ethernet
  • or, transfer the entry to the SJA1110 via Ethernet and use internal AHB access
  • or, send a custom trigger event (GPIO, Ethernet frame, ...) to the SJA1110, create a dynamic entry there and write the entry via AHB access
  • or, ....
  • or, ....

There are examples how to write dynamic entry to the switchcore of SJA1110:

  • via SPI - python script write_l2_lookup_table.py
  • via AHB - source code of ECT server

Bets regards,

Pavel

0 Kudos
Reply
3,443 Views
Atkinson
Contributor V

Hi @PavelL 

#define L2_ENTRY0_ADDR 0xFF00008c
#define L2_ENTRY1_ADDR 0xFF000090
#define L2_ENTRY2_ADDR 0xFF000094
#define L2_ENTRY3_ADDR 0xFF000098
#define L2_ENTRY4_ADDR 0xFF00009C
#define L2_ENTRY5_ADDR 0xFF0000A0
#define L2_CTRL_ADDR 0xFF0000A4
Std_ReturnType CreateL2Entry(uint32_t entry[6])
{
uint16_t INDEX = 11;
uint64_t MACADDR = 0x661122334455;
uint64_t MACADDR_MASK = 0xFFFFFFFFFFFF;
uint16_t VLANID = 3;
uint16_t VLANID_MASK = 0xFFF;
uint8_t IOTAG = 0;
uint8_t IOTAG_MASK = 0;
uint8_t SRCPORT = 5;
uint8_t SRCPORT_MASK = 0xF;
uint8_t DESTPORTS = 0x02;
uint8_t ENFPORT = 1;
uint8_t RETAG = 0;
uint8_t MIRROR = 0;
uint8_t TAKETS = 0;
uint16_t MIRR_VLAN = 0xFFF;
uint8_t TRAPTOHOST = 0;
uint8_t CBSIDIN = 0x3F;
uint8_t CBENONDA = 0;
uint16_t VLIDX = 0xFFF;
uint8_t SA_POLICE = 0;
uint8_t DA_POLICE = 0;

entry[0] = ((INDEX & 0x03FF) << 1) |
((ENFPORT & 0x1) << 11) |
((DESTPORTS & 0x7FF) << 12) |
((SRCPORT & 0xF) << 23) |
((MACADDR & 0x1F) << 27);

entry[1] = (uint32_t)((MACADDR >> 5) & 0xFFFFFFFF);

entry[2] = (((MACADDR >> 37) & 0x7FF) << 0) |
((VLANID & 0xFFF) << 11) |
((IOTAG & 0x1) << 23) |
((MACADDR_MASK & 0xFF) << 24);

entry[3] = (uint32_t)((MACADDR_MASK >> & 0xFFFFFFFF);

entry[4] = (((MACADDR_MASK >> 40) & 0xFF) << 0) |
((VLANID_MASK & 0xFFF) << |
((IOTAG_MASK & 0x1) << 20) |
((SRCPORT_MASK & 0xF) << 21) |
((RETAG & 0x1) << 25) |
((MIRROR & 0x1) << 26) |
((TAKETS & 0x1) << 27) |
((MIRR_VLAN & 0xF) << 28);

entry[5] = (((MIRR_VLAN >> 4) & 0xFF) << 0) |
((TRAPTOHOST & 0x1) << |
((CBSIDIN & 0x3F) << 9) |
((CBENONDA & 0x1) << 15) |
((VLIDX & 0xFFF) << 17) |
((SA_POLICE & 0x1) << 29) |
((DA_POLICE & 0x1) << 30);

return E_OK;
}

Std_ReturnType WriteL2LookupEntry(uint8_t swt)
{
if (swt > 0) return E_NOT_OK;

Std_ReturnType ret;
uint32_t ctrlReg = 0;
uint32_t entry[6];

ret = CreateL2Entry(entry);
if (ret != E_OK) return ret;

do {
ret = spi_read_reg(L2_CTRL_ADDR, &ctrlReg);
if (ret != E_OK) return ret;
} while (ctrlReg & (1U << 31));

ret = spi_write_reg(L2_ENTRY0_ADDR, entry[0]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY1_ADDR, entry[1]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY2_ADDR, entry[2]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY3_ADDR, entry[3]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY4_ADDR, entry[4]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY5_ADDR, entry[5]); if (ret != E_OK) return ret;

uint32_t ctrlValue = (1U << 31) | (1U << 30) | (1U << 28) | (1U << 27) | (3U << 23);
ret = spi_write_reg(L2_CTRL_ADDR, ctrlValue);
if (ret != E_OK) return ret;

do {
ret = spi_read_reg(L2_CTRL_ADDR, &ctrlReg);
if (ret != E_OK) return ret;
} while (ctrlReg & (1U << 31));

return E_OK;
}

This was the current implementation for Creating a Dynamic Entry can you cross verify with FAE whether this implementation is correct !!
Any other changes need to be done 

Tags (1)
0 Kudos
Reply
3,430 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

your code looks good. However, if you want to access dynamic tables by SPI, the entry addresses are without FF and shifted right by 2. As I already mentioned in some of my previous post.

So, #define L2_ENTRY0_ADDR 0xFF00008c should be #define L2_ENTRY0_ADDR 0x00000023

But it depends, what your routine spi_write_reg actually does.

Here is output of the write_l2_lookup_table.py , incl. my debug prints (tx/rx refers to data what would be seen on SPI wires by oscilloscope or by logic analyzer):

DBG spi_tx: ['0x02000290', '0xAABBCCDD']
DBG spi_rx: ['0x02000290', '0x00000000']
DBG spi_read 0x0029 -> 0x00000000
DBG spi_write 0x0023 <- 0x37FFFA00
DBG spi_tx: ['0x80000230', '0x37FFFA00']
DBG spi_write 0x0024 <- 0x119A22AB
DBG spi_tx: ['0x80000240', '0x119A22AB']
DBG spi_write 0x0025 <- 0xFF807089
DBG spi_tx: ['0x80000250', '0xFF807089']
DBG spi_write 0x0026 <- 0xFFFFFFFF
DBG spi_tx: ['0x80000260', '0xFFFFFFFF']
DBG spi_write 0x0027 <- 0xF1FFFFFF
DBG spi_tx: ['0x80000270', '0xF1FFFFFF']
DBG spi_write 0x0028 <- 0x1FFE7EFF
DBG spi_tx: ['0x80000280', '0x1FFE7EFF']
DBG spi_write 0x0029 <- 0xD9800000
DBG spi_tx: ['0x80000290', '0xD9800000']
+-------+-------------+-------------------+--------+---------+-------+
| INDEX | DESTPORTS | MACADDR | VLANID | ENFPORT | IOTAG |
+-------+-------------+-------------------+--------+---------+-------+
| 256 | 11111111111 | 11:22:33:44:55:66 | 14 | 1 | 1 |
+-------+-------------+-------------------+--------+---------+-------+
L2 Lookup Table Entry Written (SW1)

Regarding the FAE request, FAE is not on my escalation path. Your company has assigned FAE, so you can contact FAE directly.

Best regards,

Pavel

0 Kudos
Reply
3,425 Views
Atkinson
Contributor V

Hi @PavelL 

I am having some certain questions
1.) This Debug print of l2_write_lookup_table.py was taken from SJA1110 EVM Board Implementation ryt its not from S32G-VNP RDB Board? and we can't implement l2_write_lookup_table.py in S32G-VNP-RDB32 Board directly 

2.)can you provide me the code of SPI_read and Spi_write for integrating with the above code?
because in through the implementation in S32G writing it via SPI_Read and SPI_write is doing the operation but unable to see the Dynamic Entry getting added


Std_ReturnType spi_read_reg(uint32_t regAddress, uint32_t* regValue)
{
Std_ReturnType ret;
uint32_t TxChBuf[65] = {0};
uint32_t RxChBuf[65] = {0};
uint16_t regCount = 1;

Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 0U);

ret = getSpiAPCommand(false, regAddress, regCount, TxChBuf, regValue);
if (ret != E_OK) {
Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U);
return ret;
}

ret=Spi_SetupEB(5u, (uint8_t*)TxChBuf, (uint8_t*)RxChBuf, 8u);
if (ret == E_OK) {
ret=Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja);
if (ret == E_OK) {
*regValue = RxChBuf[1];
}
}

Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U);
return ret;
}

Std_ReturnType spi_write_reg(uint32_t regAddress, uint32_t regValue)
{
Std_ReturnType ret;
uint32_t TxChBuf[65] = {0};
uint32_t RxChBuf[65] = {0};
uint16_t regCount = 1;
uint32_t regValArray[1] = { regValue };

// Pull chip select LOW
Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 0U);

ret = getSpiAPCommand(true, regAddress, regCount, TxChBuf, regValArray);
if (ret != E_OK) {
Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U);
return ret;
}

ret=Spi_SetupEB(5u, (uint8_t*)TxChBuf, (uint8_t*)RxChBuf, 8u);
if (ret == E_OK) {
ret=Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja);
}

Siul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT, SPI_MCU_ES1_CS_AP_PIN, 1U);
return ret;
}

Correct me if i am wrong !!

3.)I have changed the Register address to #define L2_ENTRY0_ADDR 0x00000023
but still i am not able to identify the table which i am trying to add getting reflected when i transmit the message 

0 Kudos
Reply
3,418 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

1. Yes, the host tools were originally developed for the SJA1110-EVM board. I personally use these scripts with debug prints to verify my understanding of register access. While you cannot run them directly on the S32G-VNP-RDB2 platform, the underlying logic can be adapted, since the S32G accesses the SJA1110 via SPI.

2. If you're looking for SPI read/write implementations for the S32G platform, you have two main options:

  • Refer to the SPI examples provided in the S32G RTD 4.0.0 package.
  • Alternatively, I recommend posting a dedicated question on the NXP S32G Community Forum, where the S32G support team can assist you further. I focus primarily on Automotive Ethernet topics, with limited overlap into platform-specific drivers.

3. If I understand correctly, you're referring to the L2 Lookup Table described in Table 1182 of UM11107. This table consists of six 32-bit registers per entry. You can see this structure reflected in the debug output from the Python script.

Best regards,

Pavel

0 Kudos
Reply
3,409 Views
Atkinson
Contributor V

Hi @PavelL 

3.)I have changed the Register address to #define L2_ENTRY0_ADDR 0x00000023
but still i am not able to identify the table which i am trying to add getting reflected when i transmit the message 
"If I understand correctly, you're referring to the L2 Lookup Table described in Table 1182 of UM11107. This table consists of six 32-bit registers per entry. You can see this structure reflected in the debug output from the Python script."

So i am facing up with the issue in a way where i am trying to write the data into address which need to create a Dynamic Entry in L2 lookup table but its not creating a Dynamic Entry 


#define L2_ENTRY0_ADDR 0x00000023
#define L2_ENTRY1_ADDR 0x00000024
#define L2_ENTRY2_ADDR 0x00000025
#define L2_ENTRY3_ADDR 0x00000026
#define L2_ENTRY4_ADDR 0x00000027
#define L2_ENTRY5_ADDR 0x00000028
#define L2_CTRL_ADDR 0x00000029

#define L2_CTRL_VALID_BIT (1U << 31)
#define L2_CTRL_WR_RDB_BIT (1U << 30)
#define L2_CTRL_VALIDENTRY_BIT (1U << 28)
#define L2_CTRL_HOSTCMD_SHIFT 23
#define L2_CTRL_HOSTCMD_WRITE (0b011U << L2_CTRL_HOSTCMD_SHIFT)

Std_ReturnType CreateL2Entry(uint32_t entry[6])
{
uint16_t INDEX = 11;
uint64_t MACADDR = 0x661122334455;
uint64_t MACADDR_MASK = 0xFFFFFFFFFFFF;
uint16_t VLANID = 3;
uint16_t VLANID_MASK = 0xFFF;
uint8_t IOTAG = 0;
uint8_t IOTAG_MASK = 0;
uint8_t SRCPORT = 5;
uint8_t SRCPORT_MASK = 0xF;
uint8_t DESTPORTS = 0x02;
uint8_t ENFPORT = 1;
uint8_t RETAG = 0;
uint8_t MIRROR = 0;
uint8_t TAKETS = 0;
uint16_t MIRR_VLAN = 0xFFF;
uint8_t TRAPTOHOST = 0;
uint8_t CBSIDIN = 0x3F;
uint8_t CBENONDA = 0;
uint16_t VLIDX = 0xFFF;
uint8_t SA_POLICE = 0;
uint8_t DA_POLICE = 0;

entry[0] = ((INDEX & 0x03FF) << 1) |
((ENFPORT & 0x1) << 11) |
((DESTPORTS & 0x7FF) << 12) |
((SRCPORT & 0xF) << 23) |
((MACADDR & 0x1F) << 27);

entry[1] = (uint32_t)((MACADDR >> 5) & 0xFFFFFFFF);

entry[2] = (((MACADDR >> 37) & 0x7FF) << 0) |
((VLANID & 0xFFF) << 11) |
((IOTAG & 0x1) << 23) |
((MACADDR_MASK & 0xFF) << 24);

entry[3] = (uint32_t)((MACADDR_MASK >> & 0xFFFFFFFF);

entry[4] = (((MACADDR_MASK >> 40) & 0xFF) << 0) |
((VLANID_MASK & 0xFFF) << |
((IOTAG_MASK & 0x1) << 20) |
((SRCPORT_MASK & 0xF) << 21) |
((RETAG & 0x1) << 25) |
((MIRROR & 0x1) << 26) |
((TAKETS & 0x1) << 27) |
((MIRR_VLAN & 0xF) << 28);

entry[5] = (((MIRR_VLAN >> 4) & 0xFF) << 0) |
((TRAPTOHOST & 0x1) << |
((CBSIDIN & 0x3F) << 9) |
((CBENONDA & 0x1) << 15) |
((VLIDX & 0xFFF) << 17) |
((SA_POLICE & 0x1) << 29) |
((DA_POLICE & 0x1) << 30);

return E_OK;
}


Std_ReturnType WriteL2LookupEntry(uint8_t swt)
{
if (swt > 0) return E_NOT_OK;

Std_ReturnType ret;
uint32_t ctrlReg = 0;
uint32_t entry[6];

// Step 1: Create the entry
ret = CreateL2Entry(entry);
if (ret != E_OK) return ret;

// Step 2: Wait for VALID bit to clear
do {
ret = spi_read_reg(L2_CTRL_ADDR, &ctrlReg);
if (ret != E_OK) return ret;
} while (ctrlReg & L2_CTRL_VALID_BIT);

// Step 3: Write entry data to registers
ret = spi_write_reg(L2_ENTRY0_ADDR, entry[0]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY1_ADDR, entry[1]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY2_ADDR, entry[2]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY3_ADDR, entry[3]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY4_ADDR, entry[4]); if (ret != E_OK) return ret;
ret = spi_write_reg(L2_ENTRY5_ADDR, entry[5]); if (ret != E_OK) return ret;

// Step 4: Set control register to trigger write

uint32_t ctrlValue = (1U << 31) |
(1U << 30) |
(1U << 28) |
(1U << 27) |
(3U << 23);


ret = spi_write_reg(L2_CTRL_ADDR, ctrlValue);
if (ret != E_OK) return ret;

do {
ret = spi_read_reg(L2_CTRL_ADDR, &ctrlReg);
if (ret != E_OK) return ret;
} while (ctrlReg & L2_CTRL_VALID_BIT);

return E_OK;
}


can you check once whether any issues is there because its not creating Dynamic Entry for the L2 lookup Table ?

0 Kudos
Reply
3,398 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

1. Bit Shift Syntax (<<, >>)
It appears that some of the bit shift operators in your code were replaced with HTML entities like &lt;&lt; and &gt;&gt;. This typically happens when code is copied into web-based platforms. Anyway, please check it directly in your code.

#define L2_CTRL_VALID_BIT (1U &lt;&lt; 31)

should be:
#define L2_CTRL_VALID_BIT (1U << 31)

2. Entry Issue
There are several syntax errors and missing shift values in the CreateL2Entry() function, particularly in entry[3], entry[4], and entry[5]. These may result in incomplete or invalid register writes. 

e.g. 

((TRAPTOHOST & 0x1) << |

 

I recommend comparing your implementation against the Python reference script, which correctly constructs all six 32-bit words of the L2 entry.

Best regards,

Pavel

0 Kudos
Reply
3,323 Views
Atkinson
Contributor V

Hi @PavelL 

int WriteL2LookupEntry(int cs)
{
const uint32_t DESTPORTS = 0x002;
const uint32_t INDEX = 8;
const uint64_t MACADDR = 0x661122334455;
const uint64_t MACADDR_MASK = 0xffffffffffff;
const uint32_t VLANID = 0;
const uint32_t VLANID_MASK = 0xfff;
const uint32_t IOTAG = 0;
const uint32_t IOTAG_MASK = 0;
const uint32_t SRCPORT = 0x5;
const uint32_t SRCPORT_MASK = 0xF;
const uint32_t ENFPORT = 0;
const uint32_t RETAG = 0;
const uint32_t MIRROR = 0;
const uint32_t TAKETS = 0;
const uint32_t MIRR_VLAN = 0xFFF;
const uint32_t TRAPTOHOST = 0;
const uint32_t CBSIDIN = 0x3F;
const uint32_t CBENONDA = 0;
const uint32_t VLIDX = 0xFFF;
const uint32_t SA_POLICE = 0;
const uint32_t DA_POLICE = 0;

uint32_t L2_OFFSET = 0x23;
uint32_t L2CTRL_OFFSET = 0x29;
const uint32_t SWREG_BASE = 0x00000000;

const uint32_t VALID = 1U;
const uint32_t RDWRSET = 1U;
const uint32_t VALIDENT = 1U;
const uint32_t HOSTCMD = 3U;
const uint32_t MGMTROUTE = 0U;
const uint32_t LOCKED = 1U;
const uint32_t ERROR = 0U;

uint32_t L2_ADDRESS = SWREG_BASE + L2_OFFSET;
uint32_t L2_ADDRESS_CTL = SWREG_BASE + L2CTRL_OFFSET;

uint32_t l2Entry[ADDRESS_RANGE] = {0};

l2Entry[0] = ((INDEX & 0x03FF) << 1)
| ((ENFPORT & 0x1) << 11)
| ((DESTPORTS & 0x7FF) << 12)
| ((SRCPORT & 0xF) << 23)
| ((uint32_t)(MACADDR & 0x1F) << 27);

l2Entry[1] = (uint32_t)((MACADDR >> 5) & 0xFFFFFFFF);

l2Entry[2] = (uint32_t)(((MACADDR >> 37) & 0x7FF) << 0)
| ((VLANID & 0xFFF) << 11)
| ((IOTAG & 0x1) << 23)
| ((uint32_t)(MACADDR_MASK & 0xFF) << 24);

l2Entry[3] = (uint32_t)((MACADDR_MASK >> & 0xFFFFFFFF);

l2Entry[4] = ((uint32_t)((MACADDR_MASK >> 40) & 0xFF) << 0)
| ((VLANID_MASK & 0xFFF) <<
| ((IOTAG_MASK & 0x1) << 20)
| ((SRCPORT_MASK & 0xF) << 21)
| ((RETAG & 0x1) << 25)
| ((MIRROR & 0x1) << 26)
| ((TAKETS & 0x1) << 27)
| ((MIRR_VLAN & 0xF) << 28);

l2Entry[5] = (((MIRR_VLAN >> 4) & 0xFF) << 0)
| ((TRAPTOHOST & 0x1) <<
| ((CBSIDIN & 0x3F) << 9)
| ((CBENONDA & 0x1) << 15)
| ((VLIDX & 0xFFF) << 17)
| ((SA_POLICE & 0x1) << 29)
| ((DA_POLICE & 0x1) << 30);
uint32_t status = 0;
do {
Std_ReturnType ret = spi_read_reg(L2_ADDRESS_CTL, &status);
if (ret != E_OK) {
return -1;
}
} while ((status >> VALID_BIT_SHIFT) & 1U);

for (int i = 0; i < ADDRESS_RANGE; i++) {
Std_ReturnType ret = spi_write_reg(L2_ADDRESS + i, l2Entry[i]);
if (ret != E_OK) {
return -2;
}

uint32_t readBack = 0;
ret = spi_read_reg(L2_ADDRESS + i, &readBack);
if (ret != E_OK || readBack != l2Entry[i]) {
return -3;
}
}

uint32_t controlL2Entry = 0;
controlL2Entry |= (VALID << VALID_BIT_SHIFT);
controlL2Entry |= (RDWRSET << RDWRSET_BIT_SHIFT);
controlL2Entry |= (ERROR << ERROR_BIT_SHIFT);
controlL2Entry |= (LOCKED << LOCKED_BIT_SHIFT);
controlL2Entry |= (VALIDENT << VALIDENT_BIT_SHIFT);
controlL2Entry |= (MGMTROUTE << MGMTROUTE_BIT_SHIFT);
controlL2Entry |= (HOSTCMD << HOSTCMD_BIT_SHIFT);

Std_ReturnType ret = spi_write_reg(L2_ADDRESS_CTL, controlL2Entry);
if (ret != E_OK) {
return -4;
}

do {
ret = spi_read_reg(L2_ADDRESS_CTL, &status);
if (ret != E_OK) {
return -5;
}
} while ((status >> VALID_BIT_SHIFT) & 1U);

return 0;
}

This is my revised code implementation 
can you verify once this implementation will bring a Dynamic Entry. so i tried debugging it by readingback the register value whether the values are getting written into the register i could able to see the values are written into the register but i am not sure whether the enrty is created or not ?
and also the reflection of Dynamic entry of L2 lookup table is not getting reflected ?
so how can i verify the L2 lookup table enrty is created ?



Tags (1)
0 Kudos
Reply
3,306 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

There are missing shift values and incomplete expressions in entry[3], entry[4], and entry[5]. These may result in incorrect register values. I recommend comparing your logic against the Python reference script, which constructs the L2 entry correctly.

After writing, try sending a frame that matches the MAC/VLAN/port criteria of the entry and observe whether it is forwarded according to the DESTPORTS field.

Best regards,

Pavel

0 Kudos
Reply
3,288 Views
Atkinson
Contributor V

Hi @PavelL 

int WriteL2LookupEntry(int cs)
{
const uint32_t DESTPORTS = 0x004;
const uint32_t INDEX = 2;
const uint64_t MACADDR = 0x112233445566;
const uint64_t MACADDR_MASK = 0xffffffffffff;
const uint32_t VLANID = 0;
const uint32_t VLANID_MASK = 0x0;
const uint32_t IOTAG = 0;
const uint32_t IOTAG_MASK = 0;
const uint32_t SRCPORT = 0x6;
const uint32_t SRCPORT_MASK = 0xF;
const uint32_t ENFPORT = 0;
const uint32_t RETAG = 0;
const uint32_t MIRROR = 0;
const uint32_t TAKETS = 0;
const uint32_t MIRR_VLAN = 0xFFF;
const uint32_t TRAPTOHOST = 0;
const uint32_t CBSIDIN = 0x3F;
const uint32_t CBENONDA = 0;
const uint32_t VLIDX = 0xFFF;
const uint32_t SA_POLICE = 0;
const uint32_t DA_POLICE = 0;

uint32_t L2_OFFSET = 0x23;
uint32_t L2CTRL_OFFSET = 0x29;
const uint32_t SWREG_BASE = 0x00000000;

const uint32_t VALID = 1U;
const uint32_t RDWRSET = 1U;
const uint32_t VALIDENT = 1U;
const uint32_t HOSTCMD = 3U;
const uint32_t MGMTROUTE = 0U;
const uint32_t LOCKED = 1U;
const uint32_t ERROR = 0U;

uint32_t L2_ADDRESS = SWREG_BASE + L2_OFFSET;
uint32_t L2_ADDRESS_CTL = SWREG_BASE + L2CTRL_OFFSET;

uint32_t l2Entry[ADDRESS_RANGE] = {0};

l2Entry[0] = (((INDEX & 0x03ff) << (1 % 32)) + ((ENFPORT & 1) << (11 % 32))
+ ((DESTPORTS & 0x7FF) << (12 % 32)) + ((SRCPORT & 0xF) << (23 % 32))
+ ((MACADDR & 0x1F) << (27 % 32)));

l2Entry[1] = (((MACADDR >> 5) & 0xFFFFFFFF));

l2Entry[2] = ((((MACADDR >> 37) & 0x7FF) << (64 % 32)) + ((VLANID & 0xFFF) << (75 % 32))
+ ((IOTAG & 1) << (87 % 32)) + ((MACADDR_MASK & 0xFF) << (88 % 32)));

l2Entry[3] = (((MACADDR_MASK >> & 0xFFFFFFFF));

l2Entry[4] = (((MACADDR_MASK >> 40) & 0xFF << (128 % 32)) + ((VLANID_MASK & 0xfff) << (136 % 32))
+ ((IOTAG_MASK & 1) << (148 % 32)) + ((SRCPORT_MASK & 0xF) << (149 % 32))
+ ((RETAG & 0x1) << (153 % 32)) + ((MIRROR & 0x1) << (154 % 32))
+ ((TAKETS & 0x1) << (155 % 32)) + ((MIRR_VLAN & 0xF) << (156 % 32)));

l2Entry[5] = (((MIRR_VLAN >> 4) & 0xFF << (160 % 32)) + ((TRAPTOHOST & 0x1) << (168 % 32))
+ ((CBSIDIN & 0x3F) << (169 % 32)) + ((CBENONDA & 0x1) << (175 % 32))
+ ((VLIDX & 0xFFF) << (177 % 32)) + ((SA_POLICE & 0x1) << (189 % 32))
+ ((DA_POLICE & 0x1) << (190 % 32)));
uint32_t status = 0;
do {
Std_ReturnType ret = spi_read_reg(L2_ADDRESS_CTL, &status);
if (ret != E_OK) {
return -1;
}
} while ((status >> VALID_BIT_SHIFT) & 1U);

for (int i = 0; i < ADDRESS_RANGE; i++) {
Std_ReturnType ret = spi_write_reg(L2_ADDRESS + i, l2Entry[i]);
if (ret != E_OK) {
return -2;
}

uint32_t readBack = 0;
ret = spi_read_reg(L2_ADDRESS + i, &readBack);
if (ret != E_OK || readBack != l2Entry[i]) {
return -3;
}
}

uint32_t controlL2Entry = 0;
controlL2Entry = ((VALID << 31) + (RDWRSET << 30) + (ERROR << 29) + (LOCKED << 28) + (VALIDENT << 27) +
(MGMTROUTE << 26) + (HOSTCMD << 23));

Std_ReturnType ret = spi_write_reg(L2_ADDRESS_CTL, controlL2Entry);
if (ret != E_OK) {
return -4;
}

do {
ret = spi_read_reg(L2_ADDRESS_CTL, &status);
if (ret != E_OK) {
return -5;
}
} while ((status >> VALID_BIT_SHIFT) & 1U);

return 0;
}

I have changed the implementation similar to Python script. if you found any errors can you send me the changes please

Python script

        # Write Control
        platform.spi_write(L2_ADDRESS_CTL, controlL2Entry, cs)

        table = prettytable.PrettyTable(
            ("INDEX", "DESTPORTS", "MACADDR", "VLANID", "ENFPORT", "IOTAG"))
        entry = (
            str(INDEX), '{0:11b}'.format(DESTPORTS), mac_to_str(MACADDR), str(VLANID),
            str(ENFPORT), str(IOTAG))
        table.add_row(entry)
        print(table.get_string())

     


"After writing, try sending a frame that matches the MAC/VLAN/port criteria of the entry and observe whether it is forwarded according to the DESTPORTS field"
I am trying to send in this way as you mentioned but this reflection is not seen 
I am unable to see my entry is getting reflected ?
is there any other things need to be setted up ??

In Python script after writing the register value for controll2entry into L2_ADDRESS_CTL
there were few lines of code which does adding a entry into "prettytable"

Do we need to this also same and whether we have provision to do this ??

 



Tags (1)
0 Kudos
Reply
3,284 Views
PavelL
NXP Employee
NXP Employee

Hello @Atkinson ,

In your code, there are missing shift values in entry[3], and missing or misplaced brackets in entry[3], entry[4], and entry[5].

To verify your L2 lookup configuration, you may consider setting the entry as a static one instead of dynamic — this can help isolate whether the issue is with the entry format or the dynamic update mechanism.

Also, please note that the "pretty tables" in the Python script are used only for formatting output in the command window — they do not affect the functionality or register configuration.

Best regards,

Pavel

0 Kudos
Reply
3,282 Views
Atkinson
Contributor V

Hi @PavelL 

"In your code, there are missing shift values in entry[3], and missing or misplaced brackets in entry[3], entry[4], and entry[5]."
I have implemented it as same as the python code sorry i am nots sure where i am missing the brackets and shift values. can you kindly provide me the aligned code which might be more clear sorry for missing out the brackets and shift
It would be more helpful and clear if you provide me the exact entry[3],entry[4], entry[5]

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2127036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2127036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20configure%20l2%20lookup%20table%20dynamically%20how%20can%20I%20configure%20it%20%3F%3C%2FP%3E%3CP%3EWithout%20using%20ECT%20tool%20how%20can%20I%20configure%20the%20l2%20lookup%20table%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20examples%3F%3C%2FP%3E%3CP%3ERegards%26nbsp%3B%3C%2FP%3E%3CP%3EAtkinson%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137987%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137987%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%22%3CSPAN%3EIn%20your%20code%2C%20there%20are%20missing%20shift%20values%20in%20entry%5B3%5D%2C%20and%20missing%20or%20misplaced%20brackets%20in%20entry%5B3%5D%2C%20entry%5B4%5D%2C%20and%20entry%5B5%5D.%22%3C%2FSPAN%3E%3CBR%20%2F%3EI%20have%20implemented%20it%20as%20same%20as%20the%20python%20code%20sorry%20i%20am%20nots%20sure%20where%20i%20am%20missing%20the%20brackets%20and%20shift%20values.%20can%20you%20kindly%20provide%20me%20the%20aligned%20code%20which%20might%20be%20more%20clear%20sorry%20for%20missing%20out%20the%20brackets%20and%20shift%3CBR%20%2F%3EIt%20would%20be%20more%20helpful%20and%20clear%20if%20you%20provide%20me%20the%20exact%20entry%5B3%5D%2Centry%5B4%5D%2C%20entry%5B5%5D%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137976%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137976%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%3CP%3EIn%20your%20code%2C%20there%20are%20missing%20shift%20values%20in%20entry%5B3%5D%2C%20and%20missing%20or%20misplaced%20brackets%20in%20entry%5B3%5D%2C%20entry%5B4%5D%2C%20and%20entry%5B5%5D.%3C%2FP%3E%0A%3CP%3ETo%20verify%20your%20L2%20lookup%20configuration%2C%20you%20may%20consider%20setting%20the%20entry%20as%20a%20static%20one%20instead%20of%20dynamic%20%E2%80%94%20this%20can%20help%20isolate%20whether%20the%20issue%20is%20with%20the%20entry%20format%20or%20the%20dynamic%20update%20mechanism.%3C%2FP%3E%0A%3CP%3EAlso%2C%20please%20note%20that%20the%20%22pretty%20tables%22%20in%20the%20Python%20script%20are%20used%20only%20for%20formatting%20output%20in%20the%20command%20window%20%E2%80%94%20they%20do%20not%20affect%20the%20functionality%20or%20register%20configuration.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137914%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Eint%20WriteL2LookupEntry(int%20cs)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Econst%20uint32_t%20DESTPORTS%20%3D%200x004%3B%3CBR%20%2F%3Econst%20uint32_t%20INDEX%20%3D%202%3B%3CBR%20%2F%3Econst%20uint64_t%20MACADDR%20%3D%200x112233445566%3B%3CBR%20%2F%3Econst%20uint64_t%20MACADDR_MASK%20%3D%200xffffffffffff%3B%3CBR%20%2F%3Econst%20uint32_t%20VLANID%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20VLANID_MASK%20%3D%200x0%3B%3CBR%20%2F%3Econst%20uint32_t%20IOTAG%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20IOTAG_MASK%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20SRCPORT%20%3D%200x6%3B%3CBR%20%2F%3Econst%20uint32_t%20SRCPORT_MASK%20%3D%200xF%3B%3CBR%20%2F%3Econst%20uint32_t%20ENFPORT%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20RETAG%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20MIRROR%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20TAKETS%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20MIRR_VLAN%20%3D%200xFFF%3B%3CBR%20%2F%3Econst%20uint32_t%20TRAPTOHOST%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20CBSIDIN%20%3D%200x3F%3B%3CBR%20%2F%3Econst%20uint32_t%20CBENONDA%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20VLIDX%20%3D%200xFFF%3B%3CBR%20%2F%3Econst%20uint32_t%20SA_POLICE%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20DA_POLICE%20%3D%200%3B%3C%2FP%3E%3CP%3Euint32_t%20L2_OFFSET%20%3D%200x23%3B%3CBR%20%2F%3Euint32_t%20L2CTRL_OFFSET%20%3D%200x29%3B%3CBR%20%2F%3Econst%20uint32_t%20SWREG_BASE%20%3D%200x00000000%3B%3C%2FP%3E%3CP%3Econst%20uint32_t%20VALID%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20RDWRSET%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20VALIDENT%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20HOSTCMD%20%3D%203U%3B%3CBR%20%2F%3Econst%20uint32_t%20MGMTROUTE%20%3D%200U%3B%3CBR%20%2F%3Econst%20uint32_t%20LOCKED%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20ERROR%20%3D%200U%3B%3C%2FP%3E%3CP%3Euint32_t%20L2_ADDRESS%20%3D%20SWREG_BASE%20%2B%20L2_OFFSET%3B%3CBR%20%2F%3Euint32_t%20L2_ADDRESS_CTL%20%3D%20SWREG_BASE%20%2B%20L2CTRL_OFFSET%3B%3C%2FP%3E%3CP%3Euint32_t%20l2Entry%5BADDRESS_RANGE%5D%20%3D%20%7B0%7D%3B%3C%2FP%3E%3CP%3El2Entry%5B0%5D%20%3D%20(((INDEX%20%26amp%3B%200x03ff)%20%26lt%3B%26lt%3B%20(1%20%25%2032))%20%2B%20((ENFPORT%20%26amp%3B%201)%20%26lt%3B%26lt%3B%20(11%20%25%2032))%3CBR%20%2F%3E%2B%20((DESTPORTS%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%20(12%20%25%2032))%20%2B%20((SRCPORT%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%20(23%20%25%2032))%3CBR%20%2F%3E%2B%20((MACADDR%20%26amp%3B%200x1F)%20%26lt%3B%26lt%3B%20(27%20%25%2032)))%3B%3C%2FP%3E%3CP%3El2Entry%5B1%5D%20%3D%20(((MACADDR%20%26gt%3B%26gt%3B%205)%20%26amp%3B%200xFFFFFFFF))%3B%3C%2FP%3E%3CP%3El2Entry%5B2%5D%20%3D%20((((MACADDR%20%26gt%3B%26gt%3B%2037)%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%20(64%20%25%2032))%20%2B%20((VLANID%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%20(75%20%25%2032))%3CBR%20%2F%3E%2B%20((IOTAG%20%26amp%3B%201)%20%26lt%3B%26lt%3B%20(87%20%25%2032))%20%2B%20((MACADDR_MASK%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%20(88%20%25%2032)))%3B%3C%2FP%3E%3CP%3El2Entry%5B3%5D%20%3D%20(((MACADDR_MASK%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xFFFFFFFF))%3B%3C%2FP%3E%3CP%3El2Entry%5B4%5D%20%3D%20(((MACADDR_MASK%20%26gt%3B%26gt%3B%2040)%20%26amp%3B%200xFF%20%26lt%3B%26lt%3B%20(128%20%25%2032))%20%2B%20((VLANID_MASK%20%26amp%3B%200xfff)%20%26lt%3B%26lt%3B%20(136%20%25%2032))%3CBR%20%2F%3E%2B%20((IOTAG_MASK%20%26amp%3B%201)%20%26lt%3B%26lt%3B%20(148%20%25%2032))%20%2B%20((SRCPORT_MASK%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%20(149%20%25%2032))%3CBR%20%2F%3E%2B%20((RETAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(153%20%25%2032))%20%2B%20((MIRROR%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(154%20%25%2032))%3CBR%20%2F%3E%2B%20((TAKETS%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(155%20%25%2032))%20%2B%20((MIRR_VLAN%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%20(156%20%25%2032)))%3B%3C%2FP%3E%3CP%3El2Entry%5B5%5D%20%3D%20(((MIRR_VLAN%20%26gt%3B%26gt%3B%204)%20%26amp%3B%200xFF%20%26lt%3B%26lt%3B%20(160%20%25%2032))%20%2B%20((TRAPTOHOST%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(168%20%25%2032))%3CBR%20%2F%3E%2B%20((CBSIDIN%20%26amp%3B%200x3F)%20%26lt%3B%26lt%3B%20(169%20%25%2032))%20%2B%20((CBENONDA%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(175%20%25%2032))%3CBR%20%2F%3E%2B%20((VLIDX%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%20(177%20%25%2032))%20%2B%20((SA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(189%20%25%2032))%3CBR%20%2F%3E%2B%20((DA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20(190%20%25%2032)))%3B%3CBR%20%2F%3Euint32_t%20status%20%3D%200%3B%3CBR%20%2F%3Edo%20%7B%3CBR%20%2F%3EStd_ReturnType%20ret%20%3D%20spi_read_reg(L2_ADDRESS_CTL%2C%20%26amp%3Bstatus)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-1%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%20while%20((status%20%26gt%3B%26gt%3B%20VALID_BIT_SHIFT)%20%26amp%3B%201U)%3B%3C%2FP%3E%3CP%3Efor%20(int%20i%20%3D%200%3B%20i%20%26lt%3B%20ADDRESS_RANGE%3B%20i%2B%2B)%20%7B%3CBR%20%2F%3EStd_ReturnType%20ret%20%3D%20spi_write_reg(L2_ADDRESS%20%2B%20i%2C%20l2Entry%5Bi%5D)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-2%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Euint32_t%20readBack%20%3D%200%3B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_ADDRESS%20%2B%20i%2C%20%26amp%3BreadBack)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK%20%7C%7C%20readBack%20!%3D%20l2Entry%5Bi%5D)%20%7B%3CBR%20%2F%3Ereturn%20-3%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Euint32_t%20controlL2Entry%20%3D%200%3B%3CBR%20%2F%3EcontrolL2Entry%20%3D%20((VALID%20%26lt%3B%26lt%3B%2031)%20%2B%20(RDWRSET%20%26lt%3B%26lt%3B%2030)%20%2B%20(ERROR%20%26lt%3B%26lt%3B%2029)%20%2B%20(LOCKED%20%26lt%3B%26lt%3B%2028)%20%2B%20(VALIDENT%20%26lt%3B%26lt%3B%2027)%20%2B%3CBR%20%2F%3E(MGMTROUTE%20%26lt%3B%26lt%3B%2026)%20%2B%20(HOSTCMD%20%26lt%3B%26lt%3B%2023))%3B%3C%2FP%3E%3CP%3EStd_ReturnType%20ret%20%3D%20spi_write_reg(L2_ADDRESS_CTL%2C%20controlL2Entry)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-4%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_ADDRESS_CTL%2C%20%26amp%3Bstatus)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-5%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%20while%20((status%20%26gt%3B%26gt%3B%20VALID_BIT_SHIFT)%20%26amp%3B%201U)%3B%3C%2FP%3E%3CP%3Ereturn%200%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20changed%20the%20implementation%20similar%20to%20Python%20script.%20if%20you%20found%20any%20errors%20can%20you%20send%20me%20the%20changes%20please%3CBR%20%2F%3E%3CBR%20%2F%3E%3CU%3EPython%20script%3C%2FU%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%23%20Write%20Control%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Eplatform%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Espi_write%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EL2_ADDRESS_CTL%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3EcontrolL2Entry%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3Ecs%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Etable%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3Eprettytable%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3EPrettyTable%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20(%3C%2FSPAN%3E%3CSPAN%3E%22INDEX%22%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%22DESTPORTS%22%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%22MACADDR%22%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%22VLANID%22%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%22ENFPORT%22%3C%2FSPAN%3E%3CSPAN%3E%2C%20%3C%2FSPAN%3E%3CSPAN%3E%22IOTAG%22%3C%2FSPAN%3E%3CSPAN%3E))%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Eentry%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Estr%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EINDEX%3C%2FSPAN%3E%3CSPAN%3E)%2C%20%3C%2FSPAN%3E%3CSPAN%3E'%3C%2FSPAN%3E%3CSPAN%3E%7B0%3A11b%7D%3C%2FSPAN%3E%3CSPAN%3E'%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eformat%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EDESTPORTS%3C%2FSPAN%3E%3CSPAN%3E)%2C%20%3C%2FSPAN%3E%3CSPAN%3Emac_to_str%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EMACADDR%3C%2FSPAN%3E%3CSPAN%3E)%2C%20%3C%2FSPAN%3E%3CSPAN%3Estr%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EVLANID%3C%2FSPAN%3E%3CSPAN%3E)%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Estr%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EENFPORT%3C%2FSPAN%3E%3CSPAN%3E)%2C%20%3C%2FSPAN%3E%3CSPAN%3Estr%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EIOTAG%3C%2FSPAN%3E%3CSPAN%3E))%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Etable%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eadd_row%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Eentry%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3Eprint%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Etable%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Eget_string%3C%2FSPAN%3E%3CSPAN%3E())%3C%2FSPAN%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CBR%20%2F%3E%3CSPAN%3E%22After%20writing%2C%20try%20sending%20a%20frame%20that%20matches%20the%20MAC%2FVLAN%2Fport%20criteria%20of%20the%20entry%20and%20observe%20whether%20it%20is%20forwarded%20according%20to%20the%20DESTPORTS%20field%22%3CBR%20%2F%3E%3C%2FSPAN%3EI%20am%20trying%20to%20send%20in%20this%20way%20as%20you%20mentioned%20but%20this%20reflection%20is%20not%20seen%26nbsp%3B%3CBR%20%2F%3EI%20am%20unable%20to%20see%20my%20entry%20is%20getting%20reflected%20%3F%3CBR%20%2F%3Eis%20there%20any%20other%20things%20need%20to%20be%20setted%20up%20%3F%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EIn%20Python%20script%20after%20writing%20the%20register%20value%20for%20controll2entry%20into%26nbsp%3B%3C%2FSTRONG%3E%3CSPAN%3E%3CSTRONG%3EL2_ADDRESS_CTL%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3Ethere%20were%20few%20lines%20of%20code%20which%20does%20adding%20a%20entry%20into%20%22prettytable%22%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EDo%20we%20need%20to%20this%20also%20same%20and%20whether%20we%20have%20provision%20to%20do%20this%20%3F%3F%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137502%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137502%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%3CP%3EThere%20are%20missing%20shift%20values%20and%20incomplete%20expressions%20in%20entry%5B3%5D%2C%20entry%5B4%5D%2C%20and%20entry%5B5%5D.%20These%20may%20result%20in%20incorrect%20register%20values.%20I%20recommend%20comparing%20your%20logic%20against%20the%20Python%20reference%20script%2C%20which%20constructs%20the%20L2%20entry%20correctly.%3C%2FP%3E%0A%3CP%3EAfter%20writing%2C%20try%20sending%20a%20frame%20that%20matches%20the%20MAC%2FVLAN%2Fport%20criteria%20of%20the%20entry%20and%20observe%20whether%20it%20is%20forwarded%20according%20to%20the%20DESTPORTS%20field.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137029%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137029%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Eint%20WriteL2LookupEntry(int%20cs)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Econst%20uint32_t%20DESTPORTS%20%3D%200x002%3B%3CBR%20%2F%3Econst%20uint32_t%20INDEX%20%3D%208%3B%3CBR%20%2F%3Econst%20uint64_t%20MACADDR%20%3D%200x661122334455%3B%3CBR%20%2F%3Econst%20uint64_t%20MACADDR_MASK%20%3D%200xffffffffffff%3B%3CBR%20%2F%3Econst%20uint32_t%20VLANID%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20VLANID_MASK%20%3D%200xfff%3B%3CBR%20%2F%3Econst%20uint32_t%20IOTAG%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20IOTAG_MASK%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20SRCPORT%20%3D%200x5%3B%3CBR%20%2F%3Econst%20uint32_t%20SRCPORT_MASK%20%3D%200xF%3B%3CBR%20%2F%3Econst%20uint32_t%20ENFPORT%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20RETAG%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20MIRROR%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20TAKETS%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20MIRR_VLAN%20%3D%200xFFF%3B%3CBR%20%2F%3Econst%20uint32_t%20TRAPTOHOST%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20CBSIDIN%20%3D%200x3F%3B%3CBR%20%2F%3Econst%20uint32_t%20CBENONDA%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20VLIDX%20%3D%200xFFF%3B%3CBR%20%2F%3Econst%20uint32_t%20SA_POLICE%20%3D%200%3B%3CBR%20%2F%3Econst%20uint32_t%20DA_POLICE%20%3D%200%3B%3C%2FP%3E%3CP%3Euint32_t%20L2_OFFSET%20%3D%200x23%3B%3CBR%20%2F%3Euint32_t%20L2CTRL_OFFSET%20%3D%200x29%3B%3CBR%20%2F%3Econst%20uint32_t%20SWREG_BASE%20%3D%200x00000000%3B%3C%2FP%3E%3CP%3Econst%20uint32_t%20VALID%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20RDWRSET%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20VALIDENT%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20HOSTCMD%20%3D%203U%3B%3CBR%20%2F%3Econst%20uint32_t%20MGMTROUTE%20%3D%200U%3B%3CBR%20%2F%3Econst%20uint32_t%20LOCKED%20%3D%201U%3B%3CBR%20%2F%3Econst%20uint32_t%20ERROR%20%3D%200U%3B%3C%2FP%3E%3CP%3Euint32_t%20L2_ADDRESS%20%3D%20SWREG_BASE%20%2B%20L2_OFFSET%3B%3CBR%20%2F%3Euint32_t%20L2_ADDRESS_CTL%20%3D%20SWREG_BASE%20%2B%20L2CTRL_OFFSET%3B%3C%2FP%3E%3CP%3Euint32_t%20l2Entry%5BADDRESS_RANGE%5D%20%3D%20%7B0%7D%3B%3C%2FP%3E%3CP%3El2Entry%5B0%5D%20%3D%20((INDEX%20%26amp%3B%200x03FF)%20%26lt%3B%26lt%3B%201)%3CBR%20%2F%3E%7C%20((ENFPORT%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2011)%3CBR%20%2F%3E%7C%20((DESTPORTS%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%2012)%3CBR%20%2F%3E%7C%20((SRCPORT%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2023)%3CBR%20%2F%3E%7C%20((uint32_t)(MACADDR%20%26amp%3B%200x1F)%20%26lt%3B%26lt%3B%2027)%3B%3C%2FP%3E%3CP%3El2Entry%5B1%5D%20%3D%20(uint32_t)((MACADDR%20%26gt%3B%26gt%3B%205)%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3El2Entry%5B2%5D%20%3D%20(uint32_t)(((MACADDR%20%26gt%3B%26gt%3B%2037)%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%200)%3CBR%20%2F%3E%7C%20((VLANID%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2011)%3CBR%20%2F%3E%7C%20((IOTAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2023)%3CBR%20%2F%3E%7C%20((uint32_t)(MACADDR_MASK%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%2024)%3B%3C%2FP%3E%3CP%3El2Entry%5B3%5D%20%3D%20(uint32_t)((MACADDR_MASK%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3El2Entry%5B4%5D%20%3D%20((uint32_t)((MACADDR_MASK%20%26gt%3B%26gt%3B%2040)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%3CBR%20%2F%3E%7C%20((VLANID_MASK%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%7C%20((IOTAG_MASK%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2020)%3CBR%20%2F%3E%7C%20((SRCPORT_MASK%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2021)%3CBR%20%2F%3E%7C%20((RETAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2025)%3CBR%20%2F%3E%7C%20((MIRROR%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2026)%3CBR%20%2F%3E%7C%20((TAKETS%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2027)%3CBR%20%2F%3E%7C%20((MIRR_VLAN%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2028)%3B%3C%2FP%3E%3CP%3El2Entry%5B5%5D%20%3D%20(((MIRR_VLAN%20%26gt%3B%26gt%3B%204)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%3CBR%20%2F%3E%7C%20((TRAPTOHOST%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%7C%20((CBSIDIN%20%26amp%3B%200x3F)%20%26lt%3B%26lt%3B%209)%3CBR%20%2F%3E%7C%20((CBENONDA%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2015)%3CBR%20%2F%3E%7C%20((VLIDX%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2017)%3CBR%20%2F%3E%7C%20((SA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2029)%3CBR%20%2F%3E%7C%20((DA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2030)%3B%3CBR%20%2F%3Euint32_t%20status%20%3D%200%3B%3CBR%20%2F%3Edo%20%7B%3CBR%20%2F%3EStd_ReturnType%20ret%20%3D%20spi_read_reg(L2_ADDRESS_CTL%2C%20%26amp%3Bstatus)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-1%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%20while%20((status%20%26gt%3B%26gt%3B%20VALID_BIT_SHIFT)%20%26amp%3B%201U)%3B%3C%2FP%3E%3CP%3Efor%20(int%20i%20%3D%200%3B%20i%20%26lt%3B%20ADDRESS_RANGE%3B%20i%2B%2B)%20%7B%3CBR%20%2F%3EStd_ReturnType%20ret%20%3D%20spi_write_reg(L2_ADDRESS%20%2B%20i%2C%20l2Entry%5Bi%5D)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-2%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Euint32_t%20readBack%20%3D%200%3B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_ADDRESS%20%2B%20i%2C%20%26amp%3BreadBack)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK%20%7C%7C%20readBack%20!%3D%20l2Entry%5Bi%5D)%20%7B%3CBR%20%2F%3Ereturn%20-3%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Euint32_t%20controlL2Entry%20%3D%200%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(VALID%20%26lt%3B%26lt%3B%20VALID_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(RDWRSET%20%26lt%3B%26lt%3B%20RDWRSET_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(ERROR%20%26lt%3B%26lt%3B%20ERROR_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(LOCKED%20%26lt%3B%26lt%3B%20LOCKED_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(VALIDENT%20%26lt%3B%26lt%3B%20VALIDENT_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(MGMTROUTE%20%26lt%3B%26lt%3B%20MGMTROUTE_BIT_SHIFT)%3B%3CBR%20%2F%3EcontrolL2Entry%20%7C%3D%20(HOSTCMD%20%26lt%3B%26lt%3B%20HOSTCMD_BIT_SHIFT)%3B%3C%2FP%3E%3CP%3EStd_ReturnType%20ret%20%3D%20spi_write_reg(L2_ADDRESS_CTL%2C%20controlL2Entry)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-4%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_ADDRESS_CTL%2C%20%26amp%3Bstatus)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3Ereturn%20-5%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%20while%20((status%20%26gt%3B%26gt%3B%20VALID_BIT_SHIFT)%20%26amp%3B%201U)%3B%3C%2FP%3E%3CP%3Ereturn%200%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20is%20my%20revised%20code%20implementation%26nbsp%3B%3CBR%20%2F%3Ecan%20you%20verify%20once%20this%20implementation%20will%20bring%20a%20Dynamic%20Entry.%20so%20i%20tried%20debugging%20it%20by%20readingback%20the%20register%20value%20whether%20the%20values%20are%20getting%20written%20into%20the%20register%20i%20could%20able%20to%20see%20the%20values%20are%20written%20into%20the%20register%20but%20i%20am%20not%20sure%20whether%20the%20enrty%20is%20created%20or%20not%20%3F%3CBR%20%2F%3Eand%20also%20the%20reflection%20of%20Dynamic%20entry%20of%20L2%20lookup%20table%20is%20not%20getting%20reflected%20%3F%3CBR%20%2F%3Eso%20how%20can%20i%20verify%20the%20L2%20lookup%20table%20enrty%20is%20created%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136563%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136563%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%3CP%3E1.%20Bit%20Shift%20Syntax%20(%26lt%3B%26lt%3B%2C%20%26gt%3B%26gt%3B)%3CBR%20%2F%3EIt%20appears%20that%20some%20of%20the%20bit%20shift%20operators%20in%20your%20code%20were%20replaced%20with%20HTML%20entities%20like%20%26lt%3B%26lt%3B%20and%20%26gt%3B%26gt%3B.%20This%20typically%20happens%20when%20code%20is%20copied%20into%20web-based%20platforms.%20Anyway%2C%20please%20check%20it%20directly%20in%20your%20code.%3C%2FP%3E%0A%3CP%3E%23define%20L2_CTRL_VALID_BIT%20(1U%20%26lt%3B%26lt%3B%2031)%3C%2FP%3E%0A%3CP%3Eshould%20be%3A%3CBR%20%2F%3E%23define%20L2_CTRL_VALID_BIT%20(1U%20%26lt%3B%26lt%3B%2031)%3C%2FP%3E%0A%3CP%3E2.%20Entry%20Issue%3CBR%20%2F%3EThere%20are%20several%20syntax%20errors%20and%20missing%20shift%20values%20in%20the%20CreateL2Entry()%20function%2C%20particularly%20in%20entry%5B3%5D%2C%20entry%5B4%5D%2C%20and%20entry%5B5%5D.%20These%20may%20result%20in%20incomplete%20or%20invalid%20register%20writes.%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ee.g.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3C!--ScriptorStartFragment--%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22scriptor-paragraph%22%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ETRAPTOHOST%3C%2FSPAN%3E%20%3CSPAN%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%3E%200x1%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%20%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%3CLI-WRAPPER%3E%3CSPAN%3E%3C!--ScriptorEndFragment--%3E%3C%2FSPAN%3E%3C%2FLI-WRAPPER%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20recommend%20comparing%20your%20implementation%20against%20the%20Python%20reference%20script%2C%20which%20correctly%20constructs%20all%20six%2032-bit%20words%20of%20the%20L2%20entry.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136419%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136419%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E3.)I%20have%20changed%20the%20Register%20address%20to%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%23define%20L2_ENTRY0_ADDR%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E0x00000023%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSPAN%3Ebut%20still%20i%20am%20not%20able%20to%20identify%20the%20table%20which%20i%20am%20trying%20to%20add%20getting%20reflected%20when%20i%20transmit%20the%20message%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%22%3CSPAN%3EIf%20I%20understand%20correctly%2C%20you're%20referring%20to%20the%20L2%20Lookup%20Table%20described%20in%20Table%201182%20of%20UM11107.%20This%20table%20consists%20of%20six%2032-bit%20registers%20per%20entry.%20You%20can%20see%20this%20structure%20reflected%20in%20the%20debug%20output%20from%20the%20Python%20script.%3C%2FSPAN%3E%22%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20i%20am%20facing%20up%20with%20the%20issue%20in%20a%20way%20where%20i%20am%20trying%20to%20write%20the%20data%20into%20address%20which%20need%20to%20create%20a%20Dynamic%20Entry%20in%20L2%20lookup%20table%20but%20its%20not%20creating%20a%20Dynamic%20Entry%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%23define%20L2_ENTRY0_ADDR%200x00000023%3CBR%20%2F%3E%23define%20L2_ENTRY1_ADDR%200x00000024%3CBR%20%2F%3E%23define%20L2_ENTRY2_ADDR%200x00000025%3CBR%20%2F%3E%23define%20L2_ENTRY3_ADDR%200x00000026%3CBR%20%2F%3E%23define%20L2_ENTRY4_ADDR%200x00000027%3CBR%20%2F%3E%23define%20L2_ENTRY5_ADDR%200x00000028%3CBR%20%2F%3E%23define%20L2_CTRL_ADDR%200x00000029%3C%2FP%3E%3CP%3E%23define%20L2_CTRL_VALID_BIT%20(1U%20%26lt%3B%26lt%3B%2031)%3CBR%20%2F%3E%23define%20L2_CTRL_WR_RDB_BIT%20(1U%20%26lt%3B%26lt%3B%2030)%3CBR%20%2F%3E%23define%20L2_CTRL_VALIDENTRY_BIT%20(1U%20%26lt%3B%26lt%3B%2028)%3CBR%20%2F%3E%23define%20L2_CTRL_HOSTCMD_SHIFT%2023%3CBR%20%2F%3E%23define%20L2_CTRL_HOSTCMD_WRITE%20(0b011U%20%26lt%3B%26lt%3B%20L2_CTRL_HOSTCMD_SHIFT)%3C%2FP%3E%3CP%3EStd_ReturnType%20CreateL2Entry(uint32_t%20entry%5B6%5D)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Euint16_t%20INDEX%20%3D%2011%3B%3CBR%20%2F%3Euint64_t%20MACADDR%20%3D%200x661122334455%3B%3CBR%20%2F%3Euint64_t%20MACADDR_MASK%20%3D%200xFFFFFFFFFFFF%3B%3CBR%20%2F%3Euint16_t%20VLANID%20%3D%203%3B%3CBR%20%2F%3Euint16_t%20VLANID_MASK%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20IOTAG%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20IOTAG_MASK%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20SRCPORT%20%3D%205%3B%3CBR%20%2F%3Euint8_t%20SRCPORT_MASK%20%3D%200xF%3B%3CBR%20%2F%3Euint8_t%20DESTPORTS%20%3D%200x02%3B%3CBR%20%2F%3Euint8_t%20ENFPORT%20%3D%201%3B%3CBR%20%2F%3Euint8_t%20RETAG%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20MIRROR%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20TAKETS%20%3D%200%3B%3CBR%20%2F%3Euint16_t%20MIRR_VLAN%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20TRAPTOHOST%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20CBSIDIN%20%3D%200x3F%3B%3CBR%20%2F%3Euint8_t%20CBENONDA%20%3D%200%3B%3CBR%20%2F%3Euint16_t%20VLIDX%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20SA_POLICE%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20DA_POLICE%20%3D%200%3B%3C%2FP%3E%3CP%3Eentry%5B0%5D%20%3D%20((INDEX%20%26amp%3B%200x03FF)%20%26lt%3B%26lt%3B%201)%20%7C%3CBR%20%2F%3E((ENFPORT%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2011)%20%7C%3CBR%20%2F%3E((DESTPORTS%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%2012)%20%7C%3CBR%20%2F%3E((SRCPORT%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2023)%20%7C%3CBR%20%2F%3E((MACADDR%20%26amp%3B%200x1F)%20%26lt%3B%26lt%3B%2027)%3B%3C%2FP%3E%3CP%3Eentry%5B1%5D%20%3D%20(uint32_t)((MACADDR%20%26gt%3B%26gt%3B%205)%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3Eentry%5B2%5D%20%3D%20(((MACADDR%20%26gt%3B%26gt%3B%2037)%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((VLANID%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2011)%20%7C%3CBR%20%2F%3E((IOTAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2023)%20%7C%3CBR%20%2F%3E((MACADDR_MASK%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%2024)%3B%3C%2FP%3E%3CP%3Eentry%5B3%5D%20%3D%20(uint32_t)((MACADDR_MASK%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3Eentry%5B4%5D%20%3D%20(((MACADDR_MASK%20%26gt%3B%26gt%3B%2040)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((VLANID_MASK%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%3CBR%20%2F%3E((IOTAG_MASK%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2020)%20%7C%3CBR%20%2F%3E((SRCPORT_MASK%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2021)%20%7C%3CBR%20%2F%3E((RETAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2025)%20%7C%3CBR%20%2F%3E((MIRROR%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2026)%20%7C%3CBR%20%2F%3E((TAKETS%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2027)%20%7C%3CBR%20%2F%3E((MIRR_VLAN%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2028)%3B%3C%2FP%3E%3CP%3Eentry%5B5%5D%20%3D%20(((MIRR_VLAN%20%26gt%3B%26gt%3B%204)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((TRAPTOHOST%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%3CBR%20%2F%3E((CBSIDIN%20%26amp%3B%200x3F)%20%26lt%3B%26lt%3B%209)%20%7C%3CBR%20%2F%3E((CBENONDA%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2015)%20%7C%3CBR%20%2F%3E((VLIDX%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2017)%20%7C%3CBR%20%2F%3E((SA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2029)%20%7C%3CBR%20%2F%3E((DA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2030)%3B%3C%2FP%3E%3CP%3Ereturn%20E_OK%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EStd_ReturnType%20WriteL2LookupEntry(uint8_t%20swt)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Eif%20(swt%20%26gt%3B%200)%20return%20E_NOT_OK%3B%3C%2FP%3E%3CP%3EStd_ReturnType%20ret%3B%3CBR%20%2F%3Euint32_t%20ctrlReg%20%3D%200%3B%3CBR%20%2F%3Euint32_t%20entry%5B6%5D%3B%3C%2FP%3E%3CP%3E%2F%2F%20Step%201%3A%20Create%20the%20entry%3CBR%20%2F%3Eret%20%3D%20CreateL2Entry(entry)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3E%2F%2F%20Step%202%3A%20Wait%20for%20VALID%20bit%20to%20clear%3CBR%20%2F%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_CTRL_ADDR%2C%20%26amp%3BctrlReg)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3E%7D%20while%20(ctrlReg%20%26amp%3B%20L2_CTRL_VALID_BIT)%3B%3C%2FP%3E%3CP%3E%2F%2F%20Step%203%3A%20Write%20entry%20data%20to%20registers%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY0_ADDR%2C%20entry%5B0%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY1_ADDR%2C%20entry%5B1%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY2_ADDR%2C%20entry%5B2%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY3_ADDR%2C%20entry%5B3%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY4_ADDR%2C%20entry%5B4%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY5_ADDR%2C%20entry%5B5%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3E%2F%2F%20Step%204%3A%20Set%20control%20register%20to%20trigger%20write%3C%2FP%3E%3CP%3Euint32_t%20ctrlValue%20%3D%20(1U%20%26lt%3B%26lt%3B%2031)%20%7C%3CBR%20%2F%3E(1U%20%26lt%3B%26lt%3B%2030)%20%7C%3CBR%20%2F%3E(1U%20%26lt%3B%26lt%3B%2028)%20%7C%3CBR%20%2F%3E(1U%20%26lt%3B%26lt%3B%2027)%20%7C%3CBR%20%2F%3E(3U%20%26lt%3B%26lt%3B%2023)%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_CTRL_ADDR%2C%20ctrlValue)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_CTRL_ADDR%2C%20%26amp%3BctrlReg)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3E%7D%20while%20(ctrlReg%20%26amp%3B%20L2_CTRL_VALID_BIT)%3B%3C%2FP%3E%3CP%3Ereturn%20E_OK%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3Ecan%20you%20check%20once%20whether%20any%20issues%20is%20there%20because%20its%20not%20creating%20Dynamic%20Entry%20for%20the%20L2%20lookup%20Table%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136348%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136348%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%3CP%3E1.%26nbsp%3BYes%2C%20the%20host%20tools%20were%20originally%20developed%20for%20the%20SJA1110-EVM%20board.%20I%20personally%20use%20these%20scripts%20with%20debug%20prints%20to%20verify%20my%20understanding%20of%20register%20access.%20While%20you%20cannot%20run%20them%20directly%20on%20the%20S32G-VNP-RDB2%20platform%2C%20the%20underlying%20logic%20can%20be%20adapted%2C%20since%20the%20S32G%20accesses%20the%20SJA1110%20via%20SPI.%3C%2FP%3E%0A%3CP%3E2.%26nbsp%3BIf%20you're%20looking%20for%20SPI%20read%2Fwrite%20implementations%20for%20the%20S32G%20platform%2C%20you%20have%20two%20main%20options%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERefer%20to%20the%20SPI%20examples%20provided%20in%20the%20S32G%20RTD%204.0.0%20package.%3C%2FLI%3E%0A%3CLI%3EAlternatively%2C%20I%20recommend%20posting%20a%20dedicated%20question%20on%20the%20NXP%20S32G%20Community%20Forum%2C%20where%20the%20S32G%20support%20team%20can%20assist%20you%20further.%20I%20focus%20primarily%20on%20Automotive%20Ethernet%20topics%2C%20with%20limited%20overlap%20into%20platform-specific%20drivers.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E3.%26nbsp%3BIf%20I%20understand%20correctly%2C%20you're%20referring%20to%20the%20L2%20Lookup%20Table%20described%20in%20Table%201182%20of%20UM11107.%20This%20table%20consists%20of%20six%2032-bit%20registers%20per%20entry.%20You%20can%20see%20this%20structure%20reflected%20in%20the%20debug%20output%20from%20the%20Python%20script.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136140%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136140%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20having%20some%20certain%20questions%3CBR%20%2F%3E1.)%20This%20Debug%20print%20of%20l2_write_lookup_table.py%20was%20taken%20from%20SJA1110%20EVM%20Board%20Implementation%20ryt%20its%20not%20from%20S32G-VNP%20RDB%20Board%3F%20and%20we%20can't%20implement%20l2_write_lookup_table.py%20in%20S32G-VNP-RDB32%20Board%20directly%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E2.)can%20you%20provide%20me%20the%20code%20of%20SPI_read%20and%20Spi_write%20for%20integrating%20with%20the%20above%20code%3F%3CBR%20%2F%3Ebecause%20in%20through%20the%20implementation%20in%20S32G%20writing%20it%20via%20SPI_Read%20and%20SPI_write%20is%20doing%20the%20operation%20but%20unable%20to%20see%20the%20Dynamic%20Entry%20getting%20added%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EStd_ReturnType%20spi_read_reg(uint32_t%20regAddress%2C%20uint32_t*%20regValue)%3CBR%20%2F%3E%7B%3CBR%20%2F%3EStd_ReturnType%20ret%3B%3CBR%20%2F%3Euint32_t%20TxChBuf%5B65%5D%20%3D%20%7B0%7D%3B%3CBR%20%2F%3Euint32_t%20RxChBuf%5B65%5D%20%3D%20%7B0%7D%3B%3CBR%20%2F%3Euint16_t%20regCount%20%3D%201%3B%3C%2FP%3E%3CP%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%200U)%3B%3C%2FP%3E%3CP%3Eret%20%3D%20getSpiAPCommand(false%2C%20regAddress%2C%20regCount%2C%20TxChBuf%2C%20regValue)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%201U)%3B%3CBR%20%2F%3Ereturn%20ret%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Eret%3DSpi_SetupEB(5u%2C%20(uint8_t*)TxChBuf%2C%20(uint8_t*)RxChBuf%2C%208u)%3B%3CBR%20%2F%3Eif%20(ret%20%3D%3D%20E_OK)%20%7B%3CBR%20%2F%3Eret%3DSpi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja)%3B%3CBR%20%2F%3Eif%20(ret%20%3D%3D%20E_OK)%20%7B%3CBR%20%2F%3E*regValue%20%3D%20RxChBuf%5B1%5D%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%201U)%3B%3CBR%20%2F%3Ereturn%20ret%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3EStd_ReturnType%20spi_write_reg(uint32_t%20regAddress%2C%20uint32_t%20regValue)%3CBR%20%2F%3E%7B%3CBR%20%2F%3EStd_ReturnType%20ret%3B%3CBR%20%2F%3Euint32_t%20TxChBuf%5B65%5D%20%3D%20%7B0%7D%3B%3CBR%20%2F%3Euint32_t%20RxChBuf%5B65%5D%20%3D%20%7B0%7D%3B%3CBR%20%2F%3Euint16_t%20regCount%20%3D%201%3B%3CBR%20%2F%3Euint32_t%20regValArray%5B1%5D%20%3D%20%7B%20regValue%20%7D%3B%3C%2FP%3E%3CP%3E%2F%2F%20Pull%20chip%20select%20LOW%3CBR%20%2F%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%200U)%3B%3C%2FP%3E%3CP%3Eret%20%3D%20getSpiAPCommand(true%2C%20regAddress%2C%20regCount%2C%20TxChBuf%2C%20regValArray)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20%7B%3CBR%20%2F%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%201U)%3B%3CBR%20%2F%3Ereturn%20ret%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Eret%3DSpi_SetupEB(5u%2C%20(uint8_t*)TxChBuf%2C%20(uint8_t*)RxChBuf%2C%208u)%3B%3CBR%20%2F%3Eif%20(ret%20%3D%3D%20E_OK)%20%7B%3CBR%20%2F%3Eret%3DSpi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_sja)%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3ESiul2_Dio_Ip_WritePin(SPI_MCU_ES1_CS_AP_PORT%2C%20SPI_MCU_ES1_CS_AP_PIN%2C%201U)%3B%3CBR%20%2F%3Ereturn%20ret%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3ECorrect%20me%20if%20i%20am%20wrong%20!!%3CBR%20%2F%3E%3CBR%20%2F%3E3.)I%20have%20changed%20the%20Register%20address%20to%26nbsp%3B%3CSPAN%3E%23define%20L2_ENTRY0_ADDR%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E0x00000023%3C%2FSTRONG%3E%3CBR%20%2F%3Ebut%20still%20i%20am%20not%20able%20to%20identify%20the%20table%20which%20i%20am%20trying%20to%20add%20getting%20reflected%20when%20i%20transmit%20the%20message%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135866%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135866%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%3CP%3Eyour%20code%20looks%20good.%20However%2C%20if%20you%20want%20to%20access%20dynamic%20tables%20by%20SPI%2C%20the%20entry%20addresses%20are%20without%20FF%20and%20shifted%20right%20by%202.%20As%20I%20already%20mentioned%20in%20some%20of%20my%20previous%20post.%3C%2FP%3E%0A%3CP%3ESo%2C%26nbsp%3B%3CSPAN%3E%23define%20L2_ENTRY0_ADDR%20%3CSTRONG%3E0xFF00008c%3C%2FSTRONG%3E%20should%20be%26nbsp%3B%23define%20L2_ENTRY0_ADDR%20%3CSTRONG%3E0x00000023%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBut%20it%20depends%2C%20what%20your%20routine%26nbsp%3B%3CSPAN%3Espi_write_reg%20actually%20does.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHere%20is%20output%20of%20the%20write_l2_lookup_table.py%20%2C%20incl.%20my%20debug%20prints%20(tx%2Frx%20refers%20to%20data%20what%20would%20be%20seen%20on%20SPI%20wires%20by%20oscilloscope%20or%20by%20logic%20analyzer)%3A%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x02000290'%2C%20'0xAABBCCDD'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_rx%3A%20%5B'0x02000290'%2C%20'0x00000000'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_read%200x0029%20-%26gt%3B%200x00000000%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0023%20%26lt%3B-%200x37FFFA00%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000230'%2C%20'0x37FFFA00'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0024%20%26lt%3B-%200x119A22AB%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000240'%2C%20'0x119A22AB'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0025%20%26lt%3B-%200xFF807089%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000250'%2C%20'0xFF807089'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0026%20%26lt%3B-%200xFFFFFFFF%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000260'%2C%20'0xFFFFFFFF'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0027%20%26lt%3B-%200xF1FFFFFF%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000270'%2C%20'0xF1FFFFFF'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0028%20%26lt%3B-%200x1FFE7EFF%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000280'%2C%20'0x1FFE7EFF'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_write%200x0029%20%26lt%3B-%200xD9800000%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EDBG%20spi_tx%3A%20%5B'0x80000290'%2C%20'0xD9800000'%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%2B-------%2B-------------%2B-------------------%2B--------%2B---------%2B-------%2B%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%7C%20INDEX%20%7C%20DESTPORTS%20%7C%20MACADDR%20%7C%20VLANID%20%7C%20ENFPORT%20%7C%20IOTAG%20%7C%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%2B-------%2B-------------%2B-------------------%2B--------%2B---------%2B-------%2B%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%7C%20256%20%7C%2011111111111%20%7C%2011%3A22%3A33%3A44%3A55%3A66%20%7C%2014%20%7C%201%20%7C%201%20%7C%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3E%2B-------%2B-------------%2B-------------------%2B--------%2B---------%2B-------%2B%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%20size%3D%222%22%3EL2%20Lookup%20Table%20Entry%20Written%20(SW1)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3ERegarding%20the%20FAE%20request%2C%20FAE%20is%20not%20on%20my%20escalation%20path.%20Your%20company%20has%20assigned%20FAE%2C%20so%20you%20can%20contact%20FAE%20directly.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135119%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135119%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%23define%20L2_ENTRY0_ADDR%200xFF00008c%3CBR%20%2F%3E%23define%20L2_ENTRY1_ADDR%200xFF000090%3CBR%20%2F%3E%23define%20L2_ENTRY2_ADDR%200xFF000094%3CBR%20%2F%3E%23define%20L2_ENTRY3_ADDR%200xFF000098%3CBR%20%2F%3E%23define%20L2_ENTRY4_ADDR%200xFF00009C%3CBR%20%2F%3E%23define%20L2_ENTRY5_ADDR%200xFF0000A0%3CBR%20%2F%3E%23define%20L2_CTRL_ADDR%200xFF0000A4%3CBR%20%2F%3EStd_ReturnType%20CreateL2Entry(uint32_t%20entry%5B6%5D)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Euint16_t%20INDEX%20%3D%2011%3B%3CBR%20%2F%3Euint64_t%20MACADDR%20%3D%200x661122334455%3B%3CBR%20%2F%3Euint64_t%20MACADDR_MASK%20%3D%200xFFFFFFFFFFFF%3B%3CBR%20%2F%3Euint16_t%20VLANID%20%3D%203%3B%3CBR%20%2F%3Euint16_t%20VLANID_MASK%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20IOTAG%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20IOTAG_MASK%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20SRCPORT%20%3D%205%3B%3CBR%20%2F%3Euint8_t%20SRCPORT_MASK%20%3D%200xF%3B%3CBR%20%2F%3Euint8_t%20DESTPORTS%20%3D%200x02%3B%3CBR%20%2F%3Euint8_t%20ENFPORT%20%3D%201%3B%3CBR%20%2F%3Euint8_t%20RETAG%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20MIRROR%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20TAKETS%20%3D%200%3B%3CBR%20%2F%3Euint16_t%20MIRR_VLAN%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20TRAPTOHOST%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20CBSIDIN%20%3D%200x3F%3B%3CBR%20%2F%3Euint8_t%20CBENONDA%20%3D%200%3B%3CBR%20%2F%3Euint16_t%20VLIDX%20%3D%200xFFF%3B%3CBR%20%2F%3Euint8_t%20SA_POLICE%20%3D%200%3B%3CBR%20%2F%3Euint8_t%20DA_POLICE%20%3D%200%3B%3C%2FP%3E%3CP%3Eentry%5B0%5D%20%3D%20((INDEX%20%26amp%3B%200x03FF)%20%26lt%3B%26lt%3B%201)%20%7C%3CBR%20%2F%3E((ENFPORT%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2011)%20%7C%3CBR%20%2F%3E((DESTPORTS%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%2012)%20%7C%3CBR%20%2F%3E((SRCPORT%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2023)%20%7C%3CBR%20%2F%3E((MACADDR%20%26amp%3B%200x1F)%20%26lt%3B%26lt%3B%2027)%3B%3C%2FP%3E%3CP%3Eentry%5B1%5D%20%3D%20(uint32_t)((MACADDR%20%26gt%3B%26gt%3B%205)%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3Eentry%5B2%5D%20%3D%20(((MACADDR%20%26gt%3B%26gt%3B%2037)%20%26amp%3B%200x7FF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((VLANID%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2011)%20%7C%3CBR%20%2F%3E((IOTAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2023)%20%7C%3CBR%20%2F%3E((MACADDR_MASK%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%2024)%3B%3C%2FP%3E%3CP%3Eentry%5B3%5D%20%3D%20(uint32_t)((MACADDR_MASK%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xFFFFFFFF)%3B%3C%2FP%3E%3CP%3Eentry%5B4%5D%20%3D%20(((MACADDR_MASK%20%26gt%3B%26gt%3B%2040)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((VLANID_MASK%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%3CBR%20%2F%3E((IOTAG_MASK%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2020)%20%7C%3CBR%20%2F%3E((SRCPORT_MASK%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2021)%20%7C%3CBR%20%2F%3E((RETAG%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2025)%20%7C%3CBR%20%2F%3E((MIRROR%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2026)%20%7C%3CBR%20%2F%3E((TAKETS%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2027)%20%7C%3CBR%20%2F%3E((MIRR_VLAN%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2028)%3B%3C%2FP%3E%3CP%3Eentry%5B5%5D%20%3D%20(((MIRR_VLAN%20%26gt%3B%26gt%3B%204)%20%26amp%3B%200xFF)%20%26lt%3B%26lt%3B%200)%20%7C%3CBR%20%2F%3E((TRAPTOHOST%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%3CBR%20%2F%3E((CBSIDIN%20%26amp%3B%200x3F)%20%26lt%3B%26lt%3B%209)%20%7C%3CBR%20%2F%3E((CBENONDA%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2015)%20%7C%3CBR%20%2F%3E((VLIDX%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2017)%20%7C%3CBR%20%2F%3E((SA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2029)%20%7C%3CBR%20%2F%3E((DA_POLICE%20%26amp%3B%200x1)%20%26lt%3B%26lt%3B%2030)%3B%3C%2FP%3E%3CP%3Ereturn%20E_OK%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3EStd_ReturnType%20WriteL2LookupEntry(uint8_t%20swt)%3CBR%20%2F%3E%7B%3CBR%20%2F%3Eif%20(swt%20%26gt%3B%200)%20return%20E_NOT_OK%3B%3C%2FP%3E%3CP%3EStd_ReturnType%20ret%3B%3CBR%20%2F%3Euint32_t%20ctrlReg%20%3D%200%3B%3CBR%20%2F%3Euint32_t%20entry%5B6%5D%3B%3C%2FP%3E%3CP%3Eret%20%3D%20CreateL2Entry(entry)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_CTRL_ADDR%2C%20%26amp%3BctrlReg)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3E%7D%20while%20(ctrlReg%20%26amp%3B%20(1U%20%26lt%3B%26lt%3B%2031))%3B%3C%2FP%3E%3CP%3Eret%20%3D%20spi_write_reg(L2_ENTRY0_ADDR%2C%20entry%5B0%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY1_ADDR%2C%20entry%5B1%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY2_ADDR%2C%20entry%5B2%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY3_ADDR%2C%20entry%5B3%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY4_ADDR%2C%20entry%5B4%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_ENTRY5_ADDR%2C%20entry%5B5%5D)%3B%20if%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3Euint32_t%20ctrlValue%20%3D%20(1U%20%26lt%3B%26lt%3B%2031)%20%7C%20(1U%20%26lt%3B%26lt%3B%2030)%20%7C%20(1U%20%26lt%3B%26lt%3B%2028)%20%7C%20(1U%20%26lt%3B%26lt%3B%2027)%20%7C%20(3U%20%26lt%3B%26lt%3B%2023)%3B%3CBR%20%2F%3Eret%20%3D%20spi_write_reg(L2_CTRL_ADDR%2C%20ctrlValue)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3C%2FP%3E%3CP%3Edo%20%7B%3CBR%20%2F%3Eret%20%3D%20spi_read_reg(L2_CTRL_ADDR%2C%20%26amp%3BctrlReg)%3B%3CBR%20%2F%3Eif%20(ret%20!%3D%20E_OK)%20return%20ret%3B%3CBR%20%2F%3E%7D%20while%20(ctrlReg%20%26amp%3B%20(1U%20%26lt%3B%26lt%3B%2031))%3B%3C%2FP%3E%3CP%3Ereturn%20E_OK%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20was%20the%20current%20implementation%20for%20Creating%20a%20Dynamic%20Entry%20can%20you%20cross%20verify%20with%20FAE%20whether%20this%20implementation%20is%20correct%20!!%3CBR%20%2F%3EAny%20other%20changes%20need%20to%20be%20done%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135107%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135107%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%3CP%3EAnswers%20to%20your%20question%20are%20related%20to%20your%20application%20use%20case.%3C%2FP%3E%0A%3CP%3EYou%20can%20create%20a%20dynamic%20entry%20absolutely%20anywhere%2C%20also%20in%20S32G%20or%20in%20SJA1110%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Etransfer%20the%20entry%20in%20any%20supported%20way%20to%20the%20S32G%20and%20write%20it%20to%20SJA1110%20via%20SPI%2C%20or%20via%20Ethernet%3C%2FLI%3E%0A%3CLI%3Eor%2C%20transfer%20the%20entry%20to%20the%20SJA1110%20via%20Ethernet%20and%20use%20internal%20AHB%20access%3C%2FLI%3E%0A%3CLI%3Eor%2C%20send%20a%20custom%20trigger%20event%20(GPIO%2C%20Ethernet%20frame%2C%20...)%20to%20the%20SJA1110%2C%20create%20a%20dynamic%20entry%20there%20and%20write%20the%20entry%20via%20AHB%20access%3C%2FLI%3E%0A%3CLI%3Eor%2C%20....%3C%2FLI%3E%0A%3CLI%3Eor%2C%20....%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThere%20are%20examples%20how%20to%20write%20dynamic%20entry%20to%20the%20switchcore%20of%20SJA1110%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Evia%20SPI%20-%20python%20script%26nbsp%3Bwrite_l2_lookup_table.py%3C%2FLI%3E%0A%3CLI%3Evia%20AHB%20-%20source%20code%20of%20ECT%20server%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBets%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134811%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134811%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E1.)%20So%20this%20change%20of%20accessing%20the%20register%20for%20Dynamic%20configuration%20need%20to%20be%20done%20in%20S32G%20or%20SJA1110%20switch%20%3F%3CBR%20%2F%3E2.)if%20via%20SJA1110%20switch%20whether%20reading%20and%20writing%20the%20register%20by%20SPI%20need%20to%20be%20performed%20and%20where%20this%20implementation%20need%20to%20be%20carried%20in%20between%20SWITCH_DRV%3F%3CBR%20%2F%3E3.)%20where%20we%20can%20create%20our%20Dynamic%20entry%20so%20that%20it%20will%20get%20append%20in%20switch%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EMore%20Explanation%20would%20be%20great%20help!!%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134755%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%3CP%3EI%20apologize%20for%20late%20response%20caused%20my%20current%20workload.%3C%2FP%3E%0A%3CBR%20%2F%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%3CDIV%3E%3CSPAN%3EBest%20regards%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EPavel%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2133023%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2133023%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3Ecan%20you%20give%20me%20the%20complete%20address%20for%20Reading%20and%20writing%26nbsp%3B%3CBR%20%2F%3EAddress%20Name%20Access%20Reset%20Description%3CBR%20%2F%3E%3CSTRONG%3E8Ch%3C%2FSTRONG%3E%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY0%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3E(FFFFFFFEh)%3CBR%20%2F%3E%3CBR%20%2F%3Ebefore%26nbsp%3B%3CSTRONG%3E8ch%26nbsp%3B%3C%2FSTRONG%3E%20what%20would%20be%20the%20base%20address%3F%3CBR%20%2F%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%3CBR%20%2F%3E8Ch%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY0%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3E(FFFFFFFEh)%3CBR%20%2F%3E90h%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY1%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3E94h%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY2%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3E98h%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY3%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3E9Ch%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY4%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3EA0h%20DYN_BE_LKP_%3CBR%20%2F%3EENTRY5%3CBR%20%2F%3ER%2FW%200h%3CBR%20%2F%3EA4h%20DYN_BE_LKP_CTRL%20R%2FW%200h%3CBR%20%2F%3E(FF800000h)%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2132441%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2132441%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%3CP%3EI'm%20not%20aware%20of%20any%20supporting%20documents%20-%20that's%20a%20general%20knowledge%2C%20device%20independent.%20I%20have%20consulted%20this%20topic%20with%20Copilot%20and%20it%20should%20be%20possible%20to%20modify%26nbsp%3Bsja11xx_ftdi4232.py%20to%20use%20DSPI5%20instead%20of%20FTDI.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2132405%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2132405%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3ETo%20use%20this%20script%20with%20the%20S32G-VNP-RDB2%20or%20RDB3%20board%2C%20the%20FTDI%20layer%20would%20need%20to%20be%20modified%20to%20communicate%20via%20DSPI5%20on%20the%20S32G%20processor.%3C%2FSPAN%3E%3CBR%20%2F%3EHow%20to%20do%20that%3F%20is%20there%20any%20supporting%20documents%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2132387%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2132387%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%3CP%3EQ1%3A%20%22So%20since%20the%20Linux%20BSP%20is%20pre-installed%20on%20the%20SD%20Card...%20will%20it%20enable%20dynamic%20configuration%20automatically%3F%22%3CBR%20%2F%3EA1%3A%20No%2C%20the%20BSP%20includes%20the%20DSA%20driver%2C%20which%20supports%20dynamic%20configuration%2C%20but%20it%20is%20not%20automatically%20enabled%20for%20all%20use%20cases.%3C%2FP%3E%0A%3CP%3EQ2%3A%20%22For%20configuring%20the%20L2%20lookup%20entry%20via%20Dynamically%20using%20the%20write_l2_lookup.py%20(python%20evm%20host%20tools)%20whether%20that%20process%20remains%20same%20%3For%20for%20S32G-VNP-RDB%20board%20it%20will%20change%22%3CBR%20%2F%3EA2%3A%20The%20general%20flow%20for%20creating%20and%20uploading%20a%20dynamic%20entry%20remains%20the%20same%2C%20as%20described%20in%20UM11107%20and%20AN12925.%3CBR%20%2F%3EHowever%2C%20the%20write_l2_lookup_table.py%20script%20uses%20the%20FTDI%20driver%20to%20access%20the%20SJA1110-EVM%20via%20USB.%3CBR%20%2F%3ETo%20use%20this%20script%20with%20the%20S32G-VNP-RDB2%20or%20RDB3%20board%2C%20the%20FTDI%20layer%20would%20need%20to%20be%20modified%20to%20communicate%20via%20DSPI5%20on%20the%20S32G%20processor.%3C%2FP%3E%0A%3CP%3EQ3%3A%20%22Whether%20it%20is%20possible%20to%20interface%20Laptop%20%26amp%3B%20S32G-VNP_RDB32%20board%20creating%20a%20Dynamic%20entry%3F%22%3CBR%20%2F%3EA3%3A%20Yes%2C%20it%20is%20possible.%20You%20are%20free%20to%20develop%20custom%20software%20running%20on%20Linux%20to%20handle%20your%20own%20protocol%20over%20SPI%20or%20Ethernet%20to%20configure%20dynamic%20entries.%3C%2FP%3E%0A%3CP%3EQ4%3A%20%22and%20one%20more%20thing%20whether%20SJA1110_SDK_1.0.2%20is%20a%20main%20thing%20needed%20for%20implementing%20RTM1.0.0%20would%20that%20be%20fine%3F%22%3CBR%20%2F%3EA4%3A%20No%2C%20it%20is%20recommended%20to%20use%20the%20latest%20version%20of%20SJA1110%20SDK%201.0.2%20for%20compatibility%20and%20stability.%3C%2FP%3E%0A%3CP%3EFor%20further%20support%2C%20please%20contact%20your%20FAE%20or%20submit%20a%20ticket%20via%20%3CA%20href%3D%22https%3A%2F%2Fsupport.nxp.com%2Fs%2F%3Flanguage%3Den_US%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.nxp.com%2Fs%2F%3Flanguage%3Den_US%3C%2FA%3E.%3CBR%20%2F%3EThank%20you%20for%20your%20understanding.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2132231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2132231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20since%20the%20Linux%20BSP%20is%20pre-installed%20on%20the%20SD%20Card%20if%20the%20SD%20card%20is%20getting%20inserted%20into%20the%20S32G-VNP-RDB%20board.%20so%20whether%20the%20BSP%20which%20present%20in%20SD%20card%20which%20will%20be%20enabling%20Dynamic%20configuration%20automatically%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20configuring%20the%20L2%20lookup%20entry%20via%20Dynamically%20using%20the%20write_l2_lookup.py%20(python%20evm%20host%20tools)%20whether%20that%20process%20remains%20same%20%3For%20for%20S32G-VNP-RDB%20board%20it%20will%20change%26nbsp%3B%3CBR%20%2F%3EIf%20the%20Process%20remains%20same%20how%20can%20we%20interface%20laptop%20%26amp%3B%20RDB32Board%20when%20interfacing%20it%20via%20Laptop%20and%20SJA1110%20EVM%20board%20it%20will%20be%20connected%20using%20USB%20interface%20which%20will%20help%20to%20configure%20it%20Dynamic%20entry%20So%20in%20the%20case%20of%20S32G-VNP-RDB32%20Board%20How%20the%20interface%20will%20be%3F%3CBR%20%2F%3EWhether%20it%20is%20possible%20to%20interface%20Laptop%20%26amp%3B%20S32G-VNP_RDB32%20board%20creating%20a%20Dynamic%20entry%3F%3C%2FP%3E%3CP%3Eand%20one%20more%20thing%20whether%20SJA1110_SDK_1.0.2%20is%20a%20main%20thing%20needed%20for%20implementing%20RTM1.0.0%20would%20that%20be%20fine%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131732%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131732%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%3CP%3EThe%20Linux%20BSP%20is%20already%20pre-installed%20on%20the%20SD%20card%20delivered%20with%20the%20S32G-VNP-RDB3%20board%2C%20so%20no%20additional%20action%20is%20required%20in%20that%20regard.%3C%2FP%3E%0A%3CP%3EI%20assume%20you%20have%20successfully%20brought%20up%20the%20board%20(apologies%20if%20you%20already%20mentioned%20this%20in%20previous%20messages).%3C%2FP%3E%0A%3CP%3EThe%20BSP%20includes%20the%20SJA1110%20DSA%20driver%2C%20which%20provides%20a%20range%20of%20useful%20features%20%E2%80%94%20including%20support%20for%20dynamic%20L2%20lookup%20table%20configuration.%3CBR%20%2F%3EThe%20DSA%20driver%20is%20enabled%20by%20default.%3C%2FP%3E%0A%3CP%3EAs%20this%20case%20has%20evolved%20into%20a%20multi-domain%20topic%2C%20I%E2%80%99ve%20reached%20out%20to%20your%20FAE%20to%20discuss%20how%20we%20should%20proceed%20further.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131661%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131661%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20currently%20trying%20to%20implement%20it%20in%20S32G-VNP-RDB32%20--%20SJA1110%20Switch%26nbsp%3B%3CBR%20%2F%3Ecurrently%2C%20I%20don't%20have%20any%20firmware%20on%20my%20own%26nbsp%3B%3CBR%20%2F%3EWhich%20Linux%20BSP%20need%20to%20be%20utilized%26nbsp%3B%3CBR%20%2F%3EWhat%20might%20be%20the%20complete%20changes%20need%20to%20be%20done%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131660%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%3CP%3EIf%20you're%20planning%20to%20do%20this%20from%20the%20S32G-VNP-RDB3%20board%2C%20that%20changes%20things%20significantly.%20Will%20you%20be%20running%20the%20Linux%20BSP%20on%20the%20board%2C%20or%20do%20you%20plan%20to%20use%20your%20own%20firmware%3F%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131589%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E3.%20SPI_HAP%20(Host%20Access%20Protocol)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EThe%20write_l2_lookup_table.py%20script%20from%20the%20host%20tools%20demonstrates%20how%20to%20configure%20the%20L2%20table%20dynamically%20via%20SPI.%20This%20approach%20can%20be%20used%20by%20any%20external%20MCU%20or%20host%20processor.%20The%20logic%20from%20this%20script%20can%20also%20be%20ported%20to%20run%20directly%20on%20the%20internal%20M7%20core%20if%20needed.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20am%20looking%20to%20configure%20an%20entry%20via%20write_l2_lookup_table.py%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Evia%20how%20the%20configuration%20which%20we%20written%20in%20write_l2_lookup_table.py%20file%20will%20be%20moving%20to%20the%20RDB32%20Board%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Ewhat%20interface%20need%20to%20be%20done%20from%20laptop%20to%20RDB32Board%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Ewhat%20are%20the%20communication%20mechanism%20through%20which%20we%20can%20pass%20our%20l2%20lookup%20entry%20to%20the%20device%20(RDB32%20Board)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Ecan%20you%20give%20me%20a%20procedure%20or%20where%20i%20can%20find%20the%20procedure%20for%20implementation%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131568%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131568%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%3CP%3EYes%2C%20you're%20right%20%E2%80%94%20when%20the%20system%20boots%2C%20the%20static%20configuration%20is%20automatically%20loaded%20from%20external%20flash.%3C%2FP%3E%0A%3CP%3ELet%20me%20clarify%20the%20concept%20of%20dynamic%20configuration%20in%20more%20detail.%3C%2FP%3E%0A%3CP%3EThe%20task%20of%20dynamic%20configuration%20can%20be%20split%20into%20two%20parts%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAssembling%20a%20valid%20entry%26nbsp%3B%E2%80%94%20see%26nbsp%3BUM11107%2C%20chapter%205.6%20%22Dynamic%20configuration%22%3C%2FLI%3E%0A%3CLI%3EWriting%20this%20entry%20to%20the%20switch%26nbsp%3B%E2%80%94%20see%26nbsp%3BAN12925%2C%20chapter%205.1.3.2%20%22Writing%20an%20L2%20Lookup%20Table%20Entry%22%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EThere%20are%20three%20interfaces%20that%20can%20be%20used%20for%20this%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAHB%26nbsp%3B%E2%80%94%20via%20the%20internal%20M7%20core.%20SDK%20support%20is%20available%2C%20and%20the%20ECT%20server%20source%20code%20can%20serve%20as%20a%20starting%20point.%3C%2FLI%3E%0A%3CLI%3ESPI_HAP%26nbsp%3B%E2%80%94%20the%20host%20processor%20assembles%20a%20valid%20entry%20and%20writes%20it%20to%20the%20switch.%20This%20is%20what%26nbsp%3Bwrite_l2_lookup_table.py%26nbsp%3Bdoes.%3C%2FLI%3E%0A%3CLI%3EEthernet%26nbsp%3B%E2%80%94%20the%20host%20processor%20sends%20a%20user-defined%20message%20(UDP%2C%20TCP%2C%20etc.)%2C%20which%20is%20processed%20by%20the%20internal%20M7%20core.%20The%20M7%20decodes%20the%20message%2C%20assembles%20a%20valid%20entry%2C%20and%20writes%20it%20to%20the%20switch%20%E2%80%94%20so%20we%E2%80%99re%20effectively%20back%20to%20point%201.%20This%20is%20how%20ECT%20works%20internally.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131417%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E3.%20SPI_HAP%20(Host%20Access%20Protocol)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EThe%20write_l2_lookup_table.py%20script%20from%20the%20host%20tools%20demonstrates%20how%20to%20configure%20the%20L2%20table%20dynamically%20via%20SPI.%20This%20approach%20can%20be%20used%20by%20any%20external%20MCU%20or%20host%20processor.%20The%20logic%20from%20this%20script%20can%20also%20be%20ported%20to%20run%20directly%20on%20the%20internal%20M7%20core%20if%20needed.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20looking%20to%20configure%20an%20entry%20via%20write_l2_lookup_table.py%26nbsp%3B%3CBR%20%2F%3Evia%20how%20the%20configuration%20which%20we%20written%20in%20write_l2_lookup_table.py%20file%20will%20be%20moving%20to%20the%20RDB32%20Board%3CBR%20%2F%3Ewhat%20interface%20need%20to%20be%20done%20from%20laptop%20to%20RDB32Board%3F%3CBR%20%2F%3Ewhat%20are%20the%20communication%20mechanism%20through%20which%20we%20can%20pass%20our%20l2%20lookup%20entry%20to%20the%20device%20(RDB32%20Board)%3CBR%20%2F%3Ecan%20you%20give%20me%20a%20procedure%20or%20where%20i%20can%20find%20the%20procedure%20for%20implementation%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131374%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131374%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%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20mentioned%20I%20would%20like%20to%20configure%20the%20switch_core%20configuration%20Dynamically%26nbsp%3B%3CBR%20%2F%3EWhen%20a%20System%20boots%20the%20static%20configuration%20which%20we%20configured%20in%20peripherals%20is%20getting%20loaded%26nbsp%3B%3CBR%20%2F%3EI%20am%20looking%20in%20a%20way%20to%20configure%20the%20Table%20entry%20which%20are%20configured%20in%20Static%20needs%20to%20be%20configured%20it%20via%2C%20Dynamically.%3C%2FP%3E%3CP%3EIn%20either%20case%2C%20there%20are%20generally%20three%20ways%20to%20update%20the%20switch%20configuration%20dynamically%3A%3C%2FP%3E%3CUL%3E%3CLI%3EFrom%20the%20internal%20M7%20core%3C%2FLI%3E%3CLI%3EFrom%20the%20host%20processor%20via%20SPI_HAP%3C%2FLI%3E%3CLI%3EFrom%20the%20host%20processor%20via%20Ethernet%3CBR%20%2F%3Eso%20you%20are%20saying%20these%20are%20the%20only%20ways%20of%20updating%20the%20system%20dynamically%20%3F%3C%2FLI%3E%3C%2FUL%3E%3CP%3Eif%20these%20are%20the%20only%20possible%20way%2C%20then%20configuring%20it%20in%20as%20a%20code%20which%20i%20provided%20will%20work%20or%20will%20not%20work%20%3F%3CBR%20%2F%3Eand%20also%20the%20three%20process%20which%20mentioned%20here%20is%20it%20same%20as%20the%20ECT%20%26amp%3B%20write_l2_lookup_table.py%3F%20or%20these%20are%20different%20one%20!!%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2130953%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130953%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%3CP%3ECould%20you%20please%20clarify%20your%20use%20case%20for%20using%20a%20dynamic%20L2%20lookup%20table%3F%3C%2FP%3E%0A%3CP%3EPersonally%2C%20I%20would%20consider%20using%20dynamic%20entries%20in%20two%20typical%20scenarios%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWhen%20you%20want%20to%20maintain%20a%20common%20switch%20configuration%20across%20multiple%20devices%20and%20then%20%22personalize%22%20each%20switch%20dynamically%20after%20power-up.%3C%2FLI%3E%0A%3CLI%3EWhen%20you%20need%20to%20modify%20the%20switch%20configuration%20at%20runtime%20based%20on%20application-specific%20requirements.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20either%20case%2C%20there%20are%20generally%20three%20ways%20to%20update%20the%20switch%20configuration%20dynamically%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFrom%20the%20internal%20M7%20core%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20host%20processor%20via%20SPI_HAP%3C%2FLI%3E%0A%3CLI%3EFrom%20the%20host%20processor%20via%20Ethernet%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EDoes%20your%20use%20case%20fall%20into%20one%20of%20these%20categories%2C%20or%20are%20you%20aiming%20for%20something%20different%3F%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2130802%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130802%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%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20mentioned%20it%20i%20tried%20incorporating%20the%20code%26nbsp%3B%3CBR%20%2F%3Ecan%20you%20confirm%20where%20do%20i%20need%20to%20place%20the%20code%20which%20will%20help%20us%20in%20creating%20the%20entry%26nbsp%3B%3CBR%20%2F%3EEarlier%20Message%20you%20have%20mentioned%20there%20were%20Two%20Methods%20via%20doing%20it%20using%20ECT%20(Ethernet%20configuration%20Tool)%26nbsp%3B%20and%20SPI_HAP%26nbsp%3B%3CBR%20%2F%3Eso%20these%20tools%20and%20files%20are%20needed%20to%20process%20on%20run%20-time%20ryt%20%3F%3F%3CBR%20%2F%3EThe%20code%20which%20i%20shared%20is%20which%20i%20am%20trying%20to%20implement%20it%20without%20these%20tools%26nbsp%3B%3CBR%20%2F%3EI%20am%20looking%20to%20create%20a%20Dynamic%20L2%20Lookup%20Entry%20whether%20it%20is%20fine%20to%20do%20%3F%3F%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3CBR%20%2F%3EAtkinson%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2130598%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130598%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%3CP%3EI%20apologize%20for%20the%20delayed%20response%20due%20to%20public%20holidays.%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20sharing%20your%20code.%20I%20had%20a%20quick%20look%2C%20and%20at%20first%20glance%2C%20it%20appears%20to%20align%20with%20the%20principles%20outlined%20in%20AN12925%2C%20chapter%205.1.3.2%20Writing%20a%20L2%20Lookup%20table%20entry.%20I%20also%20noticed%20that%20the%20%23define%20statements%20seem%20to%20be%20reused%20from%20SJA1110.h%2C%20which%20is%20standard%20practice.%3C%2FP%3E%0A%3CP%3EPlease%20note%2C%20however%2C%20that%20an%20in-depth%20custom%20code%20review%20goes%20beyond%20the%20scope%20of%20our%20complimentary%20online%20support.%20Additionally%2C%20the%20timing%20and%20context%20in%20which%20this%20function%20should%20be%20called%20are%20highly%20application-specific%20and%20may%20vary%20depending%20on%20your%20system%20architecture%20and%20requirements.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2129272%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2129272%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%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3Estatic%20status_t%20wait_for_valid_clear(uint8_t%20swt)%20%7B%3CBR%20%2F%3Estatus_t%20status%3B%3CBR%20%2F%3Euint32_t%20ctrl%20%3D%200%3B%3CBR%20%2F%3Edo%20%7B%3CBR%20%2F%3Estatus%20%3D%20SWITCH_DRV_Read(swt%2C%201%2C%20DYN_BE_LKP_CTRL%2C%20%26amp%3Bctrl)%3B%3CBR%20%2F%3Eif%20(status%20!%3D%20STATUS_SUCCESS)%20return%20status%3B%3CBR%20%2F%3E%7D%20while%20(ctrl%20%26amp%3B%20DYN_BE_LKP_CTRL_VALID_MASK)%3B%3C%2FP%3E%3CP%3Eif%20(ctrl%20%26amp%3B%20DYN_BE_LKP_CTRL_ERROR_MASK)%20return%20STATUS_ERROR%3B%3CBR%20%2F%3Ereturn%20STATUS_SUCCESS%3B%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3Estatus_t%20SJA1110_AddL2LookupEntry_Dynamic(uint8_t%20swt)%20%7B%3CBR%20%2F%3Estatus_t%20status%3B%3C%2FP%3E%3CP%3E%2F%2F%20MAC%20%3D%2066%3A11%3A22%3A33%3A44%3A55%3CBR%20%2F%3Euint8_t%20mac%5B6%5D%20%3D%20%7B0x66%2C%200x11%2C%200x22%2C%200x33%2C%200x44%2C%200x55%7D%3B%3CBR%20%2F%3Euint64_t%20mac64%20%3D%20((uint64_t)mac%5B0%5D%20%26lt%3B%26lt%3B%2040)%20%7C%20((uint64_t)mac%5B1%5D%20%26lt%3B%26lt%3B%2032)%20%7C%20((uint64_t)mac%5B2%5D%20%26lt%3B%26lt%3B%2024)%20%7C%3CBR%20%2F%3E((uint64_t)mac%5B3%5D%20%26lt%3B%26lt%3B%2016)%20%7C%20((uint64_t)mac%5B4%5D%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%20(uint64_t)mac%5B5%5D%3B%3C%2FP%3E%3CP%3E%2F%2F%20Prepare%20L2%20lookup%20entry%20fields%3CBR%20%2F%3Euint32_t%20entry%5BWORD_COUNT%5D%20%3D%20%7B0%7D%3B%3C%2FP%3E%3CP%3Eentry%5B0%5D%20%3D%20((5%20%26amp%3B%200xF)%20%26lt%3B%26lt%3B%2024)%20%7C%20(1%20%26lt%3B%26lt%3B%2011)%3B%20%2F%2F%20SrcPort%2C%20DestPorts%201%20%26amp%3B%202%3CBR%20%2F%3Eentry%5B1%5D%20%3D%20(uint32_t)(mac64%20%26amp%3B%200xFFFFFFFF)%3B%3CBR%20%2F%3Eentry%5B2%5D%20%3D%20(uint32_t)((mac64%20%26gt%3B%26gt%3B%2032)%20%26amp%3B%200xFFFF)%3B%3CBR%20%2F%3Eentry%5B2%5D%20%7C%3D%20(3%20%26lt%3B%26lt%3B%2016)%3B%20%2F%2F%20VLAN%20ID%20%3D%203%3CBR%20%2F%3Eentry%5B3%5D%20%3D%200%3B%20%2F%2F%20Optional%20masks%3CBR%20%2F%3Eentry%5B4%5D%20%3D%200%3B%3CBR%20%2F%3Eentry%5B5%5D%20%3D%20(8%20%26lt%3B%26lt%3B%204)%20%7C%20(1%20%26lt%3B%26lt%3B%2010)%3B%20%2F%2F%20CB_SID_IN%20%3D%208%2C%20CB_ON_DA%20%3D%201%3C%2FP%3E%3CP%3E%2F%2F%20Wait%20until%20previous%20operation%20completes%3CBR%20%2F%3Estatus%20%3D%20wait_for_valid_clear(swt)%3B%3CBR%20%2F%3Eif%20(status%20!%3D%20STATUS_SUCCESS)%20return%20status%3B%3C%2FP%3E%3CP%3E%2F%2F%20Write%20L2%20entry%20data%20to%20registers%3CBR%20%2F%3Estatus%20%3D%20SWITCH_DRV_Write(swt%2C%20WORD_COUNT%2C%20DYN_BE_LKP_ENTRY0%2C%20entry)%3B%3CBR%20%2F%3Eif%20(status%20!%3D%20STATUS_SUCCESS)%20return%20status%3B%3C%2FP%3E%3CP%3E%2F%2F%20Construct%20control%20register%20value%3CBR%20%2F%3Euint32_t%20ctrl%20%3D%20DYN_BE_LKP_CTRL_VALID_MASK%20%7C%3CBR%20%2F%3EDYN_BE_LKP_CTRL_RDWRSET_MASK%20%7C%3CBR%20%2F%3E(HOSTCMD_WRITE%20%26lt%3B%26lt%3B%20DYN_BE_LKP_CTRL_HOSTCMD_SHIFT)%3B%3C%2FP%3E%3CP%3E%2F%2F%20Trigger%20write%3CBR%20%2F%3Estatus%20%3D%20SWITCH_DRV_Write(swt%2C%201%2C%20DYN_BE_LKP_CTRL%2C%20%26amp%3Bctrl)%3B%3CBR%20%2F%3Eif%20(status%20!%3D%20STATUS_SUCCESS)%20return%20status%3B%3C%2FP%3E%3CP%3E%2F%2F%20Wait%20for%20operation%20to%20complete%3CBR%20%2F%3Ereturn%20wait_for_valid_clear(swt)%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3EWhether%20this%20code%20can%20be%20utilized%20for%20generating%20a%20Dynamic%20entry%20%3F%3CBR%20%2F%3Eif%20this%20code%20is%20correct%2C%20where%20the%20function%20needs%20to%20be%20called%3F%3F%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3CBR%20%2F%3EAtkinson%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2128648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2128648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%23include%20%3CSTDINT.H%3E%3CBR%20%2F%3E%23include%20%3CSTDBOOL.H%3E%3C%2FSTDBOOL.H%3E%3C%2FSTDINT.H%3E%3C%2FP%3E%3CP%3E%2F%2F%20Define%20register%20addresses%20as%20per%20your%20SoC%20mapping%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY0%200x000%20%2F%2F%20Replace%20with%20actual%20address%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY1%200x004%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY2%200x008%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY3%200x00C%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY4%200x010%3CBR%20%2F%3E%23define%20DYN_BE_LKP_ENTRY5%200x014%3CBR%20%2F%3E%23define%20DYN_BE_LKP_CTRL%200x018%3C%2FP%3E%3CP%3Evoid%20insert_l2_unicast_entry(void)%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%2F%2F%20%3D%3D%3D%20INPUTS%20%3D%3D%3D%3CBR%20%2F%3Euint64_t%20mac%20%3D%200x021122334455ULL%3B%20%2F%2F%20MAC%20address%3CBR%20%2F%3Euint16_t%20vlan_id%20%3D%203%3B%3CBR%20%2F%3Euint8_t%20dest_port%20%3D%203%3B%20%2F%2F%20Port%203%3CBR%20%2F%3Euint16_t%20dest_ports_mask%20%3D%20(1%20%26lt%3B%26lt%3B%20dest_port)%3B%3CBR%20%2F%3Euint16_t%20index%20%3D%205%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%201%3A%20Wait%20for%20previous%20operation%20to%20complete%20%3D%3D%3D%3CBR%20%2F%3Ewhile%20(read_register(DYN_BE_LKP_CTRL)%20%26amp%3B%20ETHSW_DYN_BE_LKP_CTRL_bValid_MASK)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%202%3A%20Prepare%20entry%20fields%20%3D%3D%3D%3CBR%20%2F%3Euint32_t%20mac_lo%20%3D%20(uint32_t)(mac%20%26amp%3B%200xFFFFFFFF)%3B%20%2F%2F%20Lower%2032%20bits%3CBR%20%2F%3Euint32_t%20mac_hi%20%3D%20(uint32_t)((mac%20%26gt%3B%26gt%3B%2032)%20%26amp%3B%200xFFFF)%3B%20%2F%2F%20Upper%2016%20bits%3C%2FP%3E%3CP%3Euint32_t%20entry0%20%3D%20ETHSW_DYN_BE_LKP_ENTRY0_uvEntry_30__0_(0x00000000)%3B%3CBR%20%2F%3Euint32_t%20entry1%20%3D%20ETHSW_DYN_BE_LKP_ENTRY1_uvEntry_62__31_(mac_lo)%3B%3CBR%20%2F%3Euint32_t%20entry2%20%3D%20ETHSW_DYN_BE_LKP_ENTRY2_uvEntry_94__63_(mac_hi)%3B%3CBR%20%2F%3Euint32_t%20entry3%20%3D%20ETHSW_DYN_BE_LKP_ENTRY3_uvEntry_126__95_(%3CBR%20%2F%3E((vlan_id%20%26amp%3B%200xFFF)%20%26lt%3B%26lt%3B%2016)%20%7C%20(dest_ports_mask%20%26amp%3B%200xFFFF))%3B%3CBR%20%2F%3Euint32_t%20entry4%20%3D%20ETHSW_DYN_BE_LKP_ENTRY4_uvEntry_158__127_(0x00000000)%3B%20%2F%2F%20optional%20flags%2Freserved%3CBR%20%2F%3Euint32_t%20entry5%20%3D%20ETHSW_DYN_BE_LKP_ENTRY5_uvEntry_190__159_(index)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%203%3A%20Write%20entries%20to%20DYN%20registers%20%3D%3D%3D%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY0%2C%20entry0)%3B%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY1%2C%20entry1)%3B%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY2%2C%20entry2)%3B%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY3%2C%20entry3)%3B%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY4%2C%20entry4)%3B%3CBR%20%2F%3Ewrite_register(DYN_BE_LKP_ENTRY5%2C%20entry5)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%204%3A%20Trigger%20WRITE%20via%20control%20register%20%3D%3D%3D%3CBR%20%2F%3Euint32_t%20ctrl_val%20%3D%200%3B%3CBR%20%2F%3Ectrl_val%20%7C%3D%20ETHSW_DYN_BE_LKP_CTRL_bValid(1)%3B%3CBR%20%2F%3Ectrl_val%20%7C%3D%20ETHSW_DYN_BE_LKP_CTRL_bWrRdB(1)%3B%20%2F%2F%20Write%20operation%3CBR%20%2F%3Ectrl_val%20%7C%3D%20ETHSW_DYN_BE_LKP_CTRL_uvHostCommand(0b011)%3B%20%2F%2F%20Host%20write%3CBR%20%2F%3Ectrl_val%20%7C%3D%20ETHSW_DYN_BE_LKP_CTRL_bValidEntry(1)%3B%20%2F%2F%20Valid%20entry%3C%2FP%3E%3CP%3Ewrite_register(DYN_BE_LKP_CTRL%2C%20ctrl_val)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%205%3A%20Wait%20for%20operation%20to%20complete%20%3D%3D%3D%3CBR%20%2F%3Ewhile%20(read_register(DYN_BE_LKP_CTRL)%20%26amp%3B%20ETHSW_DYN_BE_LKP_CTRL_bValid_MASK)%3B%3C%2FP%3E%3CP%3E%2F%2F%20%3D%3D%3D%20STEP%206%3A%20Check%20for%20error%20%3D%3D%3D%3CBR%20%2F%3Euint32_t%20status%20%3D%20read_register(DYN_BE_LKP_CTRL)%3B%3CBR%20%2F%3Eif%20(status%20%26amp%3B%20ETHSW_DYN_BE_LKP_CTRL_bError_MASK)%20%7B%3CBR%20%2F%3E%2F%2F%20Handle%20the%20error%3CBR%20%2F%3E%2F%2F%20You%20can%20print%20or%20log%20this%20as%20needed%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3Ewhether%20can%20i%20insert%20this%20code%20for%20Dynamically%20Writing%20the%20data%20to%20L2%20Lookup%20Table%26nbsp%3B%3CBR%20%2F%3EWhere%20should%20i%20insert%20this%20code%20to%20test%20%3F%3CBR%20%2F%3ELooking%20forward%20for%20your%20reply%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3CBR%20%2F%3EAtkinson%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2128426%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2128426%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20the%20Method%20of%20configuring%20via%20SPI_HAP%26nbsp%3B%3CBR%20%2F%3Ewhere%20can%20i%20find%20the%20write_l2_lookup_table.py%3F%3CBR%20%2F%3EHow%20this%20needs%20to%20be%20communicated%20via%20SPI_HAP%3F%20when%20after%20the%20device%20bootup%26nbsp%3B%3CBR%20%2F%3EIn%20Previously%20during%20the%20static%20configuration%2C%20we%20have%20configured%20it%20each%20data%20via%20each%20index%3F%3CBR%20%2F%3Eso%20whether%20data%20if%20static%20initially%20configured%20is%20fine%20or%20none%20of%20the%20static%20configuration%20its%20shouldn't%20be%20connected%3F%3CBR%20%2F%3Ewhether%20this%20write_l2_lookup_table.py%20can%20you%20share%20it%3F%3CBR%20%2F%3Ewhen%20running%20this%20script%20from%20where%20(which%20port%20it%20need%20to%20be%20connected%20to%20pass%20the%20data)%20the%20script%20will%20be%20polling%20the%20data%3F%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3CBR%20%2F%3EAtkinson%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2128013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Dynamic%20configuration%20in%20sja1110%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2128013%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%3CP%3EThe%20method%20of%20dynamic%20configuration%20depends%20on%20your%20use%20case%20%E2%80%94%20it%20can%20be%20performed%20either%20by%20the%20internal%20M7%20core%20or%20externally%20via%20SPI.%20Below%20is%20a%20list%20of%20possible%20solutions%3A%3C%2FP%3E%0A%3CP%3E1.%20ECT%20(Ethernet%20Control%20Tool)%3CBR%20%2F%3EDynamic%20configuration%20via%20external%20Ethernet%20(UDP)%20frames.%20The%20internal%20firmware%20running%20on%20the%20M7%20core%20receives%20the%20configuration%20and%20applies%20it%20to%20the%20switch%20core.%3C%2FP%3E%0A%3CP%3E2.%20Modified%20ECT%3CBR%20%2F%3EThe%20ECT%20source%20code%20can%20be%20adapted%20to%20accept%20any%20Ethernet%20frame%20format%20(not%20just%20UDP).%20This%20allows%20integration%20into%20custom%20protocols%20or%20systems.%20The%20internal%20logic%20remains%20the%20same%20%E2%80%94%20the%20M7%20core%20performs%20the%20actual%20register%20updates.%3C%2FP%3E%0A%3CP%3E3.%20SPI_HAP%20(Host%20Access%20Protocol)%3CBR%20%2F%3EThe%20write_l2_lookup_table.py%20script%20from%20the%20host%20tools%20demonstrates%20how%20to%20configure%20the%20L2%20table%20dynamically%20via%20SPI.%20This%20approach%20can%20be%20used%20by%20any%20external%20MCU%20or%20host%20processor.%20The%20logic%20from%20this%20script%20can%20also%20be%20ported%20to%20run%20directly%20on%20the%20internal%20M7%20core%20if%20needed.%3C%2FP%3E%0A%3CP%3EAll%20of%20the%20above%20methods%20follow%20the%20same%20principle%20described%20in%20AN12925%2C%20section%205.1.3.2.%20The%20register-level%20flow%20is%20identical%20and%20includes%20polling%20the%20control%20register%2C%20writing%20to%20the%20entry%20registers%2C%20and%20triggering%20the%20update%20via%20the%20control%20register.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E