SJA1105q python tools failing

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

SJA1105q python tools failing

668 Views
gsally
Contributor II

I have the SJA1105Q/SJA1105(T) Evaluation Board Package software, when I execute

$ python SJA1105Q/switch_configurations/default.py
Traceback (most recent call last):
File "SJA1105Q/switch_configurations/default.py", line 29, in <module>
from ethsw.configuration import *
ImportError: No module named ethsw.configuration

Tried with both python 2 and 3. 

Is there any expectation this will run on a Linux host?  The file's line endings and lack of #! indicate this is from a windows host. 

file SJA1105Q/switch_configurations/default.py
SJA1105Q/switch_configurations/default.py: Python script, ASCII text executable, with CRLF line terminators

 

 

0 Kudos
4 Replies

579 Views
gsally
Contributor II

Kevin (@kaden),

Goal is to have the switch programmed to be a "dumb" L2 switch, fully-meshed, all ports able to route traffic to all ports w/o restrictions. I generated a configuration using the software package above.  The key difference being a change to line 94 of simplePQRS.py

"HOST_PORT" : 99, # no host port

As for this configuration, all ports will be used to move traffic.  Programmed the resulting file on the target, checked that bit 31 of register 1 is set.  

My board is wired for RGMII, this matches with what I see at the mii_mode_parameters set in line 364.  I can see I have link-up but for my connected phys, but I'm not seeing traffic going between ports on the switch. 

Reading the simplePQRS.py file, it seems to do what I'm looking for it do to (fully meshed, no tagging, on traffic shaping, etc), can you let me know if that's a correct read of the configuration file?

(edit) I was going through the datasheet, and looking at table 72, I found the N_SOFERR counter ticking upwards for the two ports I had connected.  Will read through sheet to see if this is the result of some settings or if I need to get help from my EE team. 

Thanks for your help,
gene

 

0 Kudos

569 Views
kaden
NXP Employee
NXP Employee

Hi @gsally 

Please note that if you are using RGMII you need to add a delay to the respective clock signals. This can either be done by the SJA1105 or the MAC connected to the respective port. 

On SJA1105P side, the relevant register would be the CFG_PAD_MIIx_ID register (see screenshot from the software user manual of SJA1105P attached as reference). 

Best regards

Kevin 

0 Kudos

616 Views
gsally
Contributor II

Kevin,

Downloaded tool at link, this worked for me to generate a configuration.

Thanks for your help!

-gene

0 Kudos

644 Views
kaden
NXP Employee
NXP Employee

Hi @gsally ,

The default.py script is only embedded there in order to be able to see what the default.hex switch configuration does look like. The script does generate the default.hex file which is also present in the same directory.

The default.hex file contains the switch configuration which can be loaded into the switch with the "download_config.py" script. If you want to generate a different switch configuration file (.hex) you need to use the SJA1105 switch configuration tools which can be download from the SJA1105PQRS products page on nxp.com (at the Software section -> Switch Configuration Tool for SJA1105x). 

https://www.nxp.com/products/interfaces/ethernet-/automotive-ethernet-switches/sja1105pel-qel-rel-se...

It comes with the ethsw package which is mentioned in your error message. 

Those scripts should work also on Linux. Please note that they require Python 2. 

I hope this does help you.

Best regards

Kevin

0 Kudos