SJA 1110 Configuration of Qbv

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

SJA 1110 Configuration of Qbv

Jump to solution
486 Views
8661NHM
Contributor II

We encountered some issues while configuring the Qbv functionality of the SJA1110:

  1. Scenario 1:
    When the switch acts as a gPTP bridge node, and our meter is synchronized as the master clock, Qbv does not seem to be working. No scheduled packets, except for gPTP packets, are being forwarded.
    Note: The PTP time on our master clock is aligned with UTC time and holds a very large value.
  2. Scenario 2:
    When the Switch is configured as a GM, the Qbv functionality works as expected.

So,What could be the reason for this behavior? How to make the Qbv enable in Scenario 1? I would greatly appreciate your assistance!

Our configuration for Scenario 1 is as follows:

We use S32DS graphical interface for configuration.

  • example Projects:

Switch_config_sja1110evm from the SJA 1110 SDK RTM v1.0.2.

  • Configuration parameters:

Port: SW2_P2_RGMII
GATE_EN: 1
CONFIG_CHANGE: 1
ADMINBASETIME[31:0]: 0
ADMINBASETIME[63:32]: 0
ADMINCYCLETIMEEXT: 0
ADMINCYCLETIME: 62500
ADMINCONTROLLISTEN: 8
ADMINGATES: 0b11111111
QMAXSDU[x]: 0x7ff
QBVCLKSRCFREERUN: False

  • Gate List:

Gates0: 0b00000001 TriggerTime: 1000
Gates1: 0b11111110 TriggerTime: 1000
Gates2: 0b11111110 TriggerTime: 1000
Gates3: 0b11111110 TriggerTime: 1000
Gates4: 0b11111110 TriggerTime: 1000

0 Kudos
1 Solution
340 Views
8661NHM
Contributor II

Hi,

1) We tried use your configuration that ADMINCYCLETIME = 125000,but Qbv function  still didn't work. According the NXP Qbv examples,ADMINCYCLETIME = 500,000,000 means that Cycle time is 8 seconds. The example seems to have some contradictions with what you said.Perhaps it's due to differences in hardware?

2) We don't have Lauterbach.We use OpenSDA Embedded Debug - USB port for debugging.If that script can work,please send it to me via email at wanghaonan1@caict.ac.cn. Thank you.

3)If  the switch is in gPTP GM mode,Qbv function  is working as we expected. We send Frames at 10000FPS and We can observe that the frames arrive at a period of 1 millisecond.The reult is in attachment.

View solution in original post

0 Kudos
9 Replies
439 Views
abdullahzafar
NXP Employee
NXP Employee

Hi,

"No scheduled packets, except for gPTP packets, are being forwarded."

- Does that mean that all the packets other then gPTP packets are dropped?

-  If that is the case, could you read out Ethernet diagnostics? please refer to software usermanual

of SJA1110(5.9.4 Ethernet port statistics)

- If possible, kindly share your project with me, so that I can double check other parameters aswell, 

you can either upload your project here or send it to me directly via email: abdullah.zafar@nxp.com

BR, 

Abdullah

0 Kudos
430 Views
8661NHM
Contributor II

The attachment is our project.

0 Kudos
433 Views
8661NHM
Contributor II

Thank you for your reply!

I am still not very familiar with the method of reading diagnostics. I can send you our project first, and it would be great if you could check the configuration for me. Thank you very much!

0 Kudos
427 Views
abdullahzafar
NXP Employee
NXP Employee

Hi, 

I just noticed that your Admincycle time of (62500) translates to 0.0005 seconds. 

A single trigger time is (1000) which translates to 0.0002 seconds trigger time

multiply the trigger time by x 5 = 0.001. 

Please correct me if I missed something but in the current setting, your sum of trigger time> Admin cycle time which should never be the case. Infact, it should be opposite. 

I would recommend you to test with following settings: 

- Admincycletime - 250000000

Just add two entries in the QBV administrative schedule table: 

1. trigger time: 250000 (Open or close)

2. trigger time:750000 (Open or close)

------------------------------------------------------------

1. Please refer SJA1110 software user manual section: 5.9.4.1 MAC_DIAG_CNTRS_FLGS Registers

You can try reading out these registors that will help us narrow down the issue. 

Are you using an evaluation board or a custom board? 

 

0 Kudos
404 Views
abdullahzafar
NXP Employee
NXP Employee

Hi, 

Update*: There is a possibility that your configuration might be correct. the Sum of trigger time I calculated was based on the assumption that 100M ports were used. I opened the project that you shared, I couldn't find the QBV tables in this. could you please double check if you shared the correct project. 

Many thanks, 

Abdullah

0 Kudos
401 Views
8661NHM
Contributor II

Hi,

Thank you for your reply.

We are using an evaluation board. And the Qbv port is SW2_P1(We uesd a 1000base-T1 SFP Module ). Because there are two switch chips in the board,So you can check the Port 1 of the SW2 Qbv Configuration to see our Qbv table.

I think Admincycle time of(62500)should translate to 0.001 seconds because the Qbv function was working properly (CycleTime is 1ms and Gate Open Time is 200us)when the board was in gPTP GM mode.So, I think it is that gptp function effects Qbv function.

In addition,how to use S32DS to check registers?

Thank you again for your help!

0 Kudos
376 Views
abdullahzafar
NXP Employee
NXP Employee

Hi, 

 

1) The speed of the clock is 125Mhz per slot (translates to 1 second)for ADMINCYCLETIME, hence your configured time is equal to 0.0005. The calculated triger time is correct. 
2) Which debugger are you using? I have a script for PE  micro that I can share over email. Lauterbach is fairly straight forward. 

3) what happends when gPTP is removed? does it still work? 

BR, 

Abdullah

0 Kudos
341 Views
8661NHM
Contributor II

Hi,

1) We tried use your configuration that ADMINCYCLETIME = 125000,but Qbv function  still didn't work. According the NXP Qbv examples,ADMINCYCLETIME = 500,000,000 means that Cycle time is 8 seconds. The example seems to have some contradictions with what you said.Perhaps it's due to differences in hardware?

2) We don't have Lauterbach.We use OpenSDA Embedded Debug - USB port for debugging.If that script can work,please send it to me via email at wanghaonan1@caict.ac.cn. Thank you.

3)If  the switch is in gPTP GM mode,Qbv function  is working as we expected. We send Frames at 10000FPS and We can observe that the frames arrive at a period of 1 millisecond.The reult is in attachment.

0 Kudos
149 Views
nico2
Contributor I
I found the same problem, and I found that after adjusting the master time to 1000000s, Qbv started working after about 80s. I think it may be that the time jump is too large, causing the Qbv working delay. You can test it.
Also, I don't know how to configure ADMINBASETIME correctly for further testing verification, I would like to know the ADMINBASETIME configuration format.
0 Kudos