Sja formasını abevjavaya necə yükləyə bilərəm
Standard timings are calculated with the CanSetBaudrate(); API , but if special timings are requested, the user can add the special timing to the registry with X=Bitrate/kB Baud(X)=hex:(brp),(btr1)
E.g. to specify a special timing for 50KBaud
SJA1000 Can Bus Support
Keith & Koep GmbH delivers boards which are equipped with a Philips (NXP) SJA1000 CAN controller. This CAN controller follows the CAN 2.0B standard. It can serve BasicCAN and extended Frames and handles bitrates up to 1MBit/s.
SJA1000 peripheral chip: sja1000_3.pdf
Background
Keith & Koep delivers a Windows CE canbus driver, based on an early adoption of Garz & Fricke’s CAN Driver for SH-3.
The driver has been heavily reworked. But there is still an old version of the documentation available in html form, which can be used to access the driver with through the gfcan32.dll.
Demos using the can-libraries accessing the driver
The newer singlecan.dll and dualcan.dll libraries can be used to access a single instance or multiple instances of canbus drivers. Most of the code will be compatible to the gfcan32.dll.
Here is some democode to access a single instance:
Using multiple can controllers please bind to dualcan.dll, the API has an additional argument selecting the canbus controller instance.
Here is a democode using up to 4 can controllers:
Special bit-timings
Standard timings are calculated with the CanSetBaudrate(); API , but if special timings are requested, the user can add the special timing to the registry with X=Bitrate/kB Baud(X)=hex:(brp),(btr1)
E.g. to specify a special timing for 50KBaud
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SJA1000] "Baud50"=hex:09,1c
Sja formasını abevjavaya necə yükləyə bilərəm
Əgər siz mobil qadjet, smartfon işlətmirsinizsə, Amazon, Ebay, Linkedin şirkətləri barədə məlumatınız yoxdursa, komputerinizə Microsoft Office proqramlarından başqa heçnə yazılmayıbsa onda məqaləni bağlayın – Siz Javadan çox uzaqsınız (açığı onda məqalə necə əlinizə düşüb, bilmirəm). Yox, əgər oxumağa davam eləmək istəyirsinizsə, hazır olun. Sizə ən maraqlı proqramlaşdırma dillərindən biri olan Java haqqında danışacağam. Java dünyaya 23 May 1995-ci ildə “Sun Microsystems” şirkətində gəldi. Yeri gəlmişkən, bir müddət sonra bu şirkəti onun Java adlı məhsulu ilə birgə Oracle alır. Yarandıqda bu balaca proqramlaşdırma dilinin adı Oak (Palıd) idi. Jeyms Qoslinq onu əslində kiçik elektron məişət cihazları üçün yaratmışdı. Az müddət keçdikdən sonra o böyüdü və adını indi bildiyimiz Javaya dəyişdi. Deyilənə görə Qoslinq bu adı sevdiyi Java kofesinin şərəfinə dəyişdi. Bəzi mənbələrdə isə ümumiyyətlə Javanın ilkin olaraq bir kiçik kofe aparatı üçün yazıldığı qeyd olunur. Böyüdükdə təbii ki, gördüyü işin də həcmi genişləndi. Hal hazırda Javada klient proqramlarından tutmuş server təminatına qədər, köhnə mobil oyunlarından tutmuş müasir Android tətbiqlərinə qədər milyonlarla proqram təminatı yazılır. Bunlar barədə birazdan daha ətraflı danışacağıq. İndi isə istərdim ki, siz Javaya həsr olunmuş kiçik komedik bir kinoya baxasınız. (çox maraqlıdır)
Bənzər xəbər
Bir ‘Java’ proqramçısı illik nə qədər qazanır? Necə ‘Java’ proqramçısı ola bilərəm?
Kinoya baxdız? Maraqlıdır? Yəqinki başa düşdüz niyə Java belə geniş yayılıb. Sərhədsizlik, asanlıq, azadlıq, geniş imkanlar. Dil özündə bir növ gənclik üsyanı daşıyırdı və bu da onun qısa bir zamanda sürətlə yayılmasına səbəb oldu. Düzdür indi Node.js, C#, Dart, Go kimi yeni dillər yaranıb, Javanın artıq 22 yaşı var. Bəli, bu rəqəm artıq bir proqramlaşdırma dili üçün qoca sayılır. Amma necə deyərlər “old but gold”. Dil hələ də o aktivliyini itirməyib. Əmin olmaq üçün dice.com saytında “Java” dilini axtarışa daxil edin və qlobal bazarda nə qədər vakansiya mövcud olduğunu özünüz görəcəksiz. Yox, əgər siz ölkədaxilində iş düşünürsünzsə o işi özünüz də qura bilərsiniz. Javanı bildikdə siz Android sistemi üçün mükəmməl tətbiqlər yaza biləcəksiniz. Bilmək olmaz, bəlkə siz Angrybirds kimi bir oyun yazacaqsınız? Bəlkə siz yeni bir fotoredaktor, və ya videoredaktor yazacaqsız? Ola bilər ki, tam ciddi bir hesablama sistemi yaratdınız. Sərhəd yoxdur. Nə istəsəz yaradın. (bircə subway surfers-dən başqa,xahiş edirəm. O oyunu hələdə metroda oynayan görürəm).
Java öyrənmək üçün kurs? Həm də Bakıda. Buradan tanış ola bilərsiniz.
Mobildən o qədər danışdım ki, desktop yaddan çıxdı. Siz Gmail işlədirsiz? Bilirsiz ki o da Javada kodlanıb? İçərisində mürəkəb hesablama mexanizmi olan bir çox saytların “backend” hissəsində məhz Java durur. Masaüstü oyunların sayı o qədərdə çox deyil. Amma Javada yazılmış bir oyun sizə deyə bilərəm hansını ki mütləq ki, görmüsüz bəlkə oynamısız da. Minecraft! Bəli bəli. Bu yekəpikselləri olan maraqlı sərhədsiz online oyun məhz Javada yazılmışdır.
Oracle şirkətinin verdiyi rəsmi məlumata görə, hal hazırda 3 milyardan çox cihaz Java ilə işləyir. Bu o deməkdir ki siz Javadan istifadə edərək “hardware” ixtiralar da edə bikərsiniz.
Goldman Sachs, Citigroup, Barclays, Standard Charted şirkətlərini tanıyırsız? (Wolf of Wall Street kinosundaki investisiya şirkətlərinin bənzərləri). Yəgin onların hər saniyə milyonlarla məlumatı hesabladığını başa düşürsünüz. Baxın bu şirkətlərin proqram təminatları da Javada yazılır. Gəldik çatdıq məqalənin sonuna. Düzdür mən sizə böyük hesabatlar alqoritmlar vermədim. Məqsədim sizi maraqlandırmaq və sizə bu dili öyrənməyə motivasiya vermək idi. Və məncə mən buna nail oldum. Ümüdvaram ki, bu məqaləni oxuyandan sonra bir neçə insan bu dili öyrənəcək və yaxın zamanlarda maraqlı proqramlarla bizim marağımızı cəlb edəcəklər. 1 dəqiqə, hələ bitmədi. “Bu dili necə və hansı vasitələrlə öyrənə bilərik?” – desəz, sizə bir şad xəbər verə bilərik. 1 il müddətində sizi mütəxəssis səviyyəsində yetişdirə biləcək və qlobal sertifaktla təmin edəcək IT Kurs – Step IT Akademiya Java üzrə proqram təminatının yaradılması kurslarına start verib. Nə üçün Java öyrənməliyik sualına isə ən yaxşı cavabı elə Akademiyanın özü verir.
nxp-archive/openil_sja1105-tool
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch branches/tags
Branches Tags
Could not load branches
Nothing to show
Could not load tags
Nothing to show
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Cancel Create
- Local
- Codespaces
HTTPS GitHub CLI
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Latest commit message
Commit time
README.md
- LS1021ATSN
The sja1105-tool is a Linux userspace application for configuring the NXP SJA1105 Automotive Ethernet L2 switch. The tool supports:
- Importing a configuration for the SJA1105 switch from an XML file
- Exporting the current SJA1105 configuration as an XML file
- Uploading the current SJA1105 configuration to the switch through its SPI interface
- Inspecting the current SJA1105 configuration
- On-the-fly modification of the current SJA1105 configuration through command line or scripting interface
To compile this demo you need to have setup a Linux machine with the following:
- An ARMv7 toolchain for the LS1021. You can get one from Linaro (version used here is 7.4.1).
cd base_dir> mkdir linaro-armv7-toolchain cd linaro-armv7-toolchain wget https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz wget https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/sysroot-glibc-linaro-2.25-2019.02-arm-linux-gnueabihf.tar.xz tar xvf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz tar xvf sysroot-glibc-linaro-2.25-2019.02-arm-linux-gnueabihf.tar.xz # rm -rf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz # rm -rf sysroot-glibc-linaro-2.25-2019.02-arm-linux-gnueabihf.tar.xz # Copy and paste this command down until (and including) the EOF cat <'EOF' > envsetup #!/bin/bash export TOPDIR=$(cd "$(dirname "$" )" && pwd) export SYSROOT_PATH="$/sysroot-glibc-linaro-2.25-2019.02-arm-linux-gnueabihf" export PKG_CONFIG_PATH="$/usr/lib/pkgconfig" export PATH="$/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin:$PATH" export CC="arm-linux-gnueabihf-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=$" export CXX="arm-linux-gnueabihf-g++ -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=$" export CPP="arm-linux-gnueabihf-gcc -E -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=$" export AS="arm-linux-gnueabihf-as " export LD="arm-linux-gnueabihf-ld --sysroot=$" export GDB="arm-linux-gnueabihf-gdb" export STRIP="arm-linux-gnueabihf-strip" export RANLIB="arm-linux-gnueabihf-ranlib" export OBJCOPY="arm-linux-gnueabihf-objcopy" export OBJDUMP="arm-linux-gnueabihf-objdump" export AR="arm-linux-gnueabihf-ar" export NM="arm-linux-gnueabihf-nm" export M4="m4" export TARGET_PREFIX="arm-linux-gnueabihf-" export CONFIGURE_FLAGS="--target=arm-linux-gnueabihf --host=arm-linux-gnueabihf --build=x86_64-linux --with-libtool-sysroot=$" export CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -I$/include" export CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -I$/include" export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -L$/lib" export ARCH="arm" export CROSS_COMPILE="arm-linux-gnueabihf-" EOF # Keep a note of this folder, because we'll be referring it later in the tutorial export TOOLCHAIN_PATH="$ "
- Libxml2. Unfortunately, this is not included in the standalone ARM toolchain we’re using, so we have to add it manually:
cd base_dir> # Grab the latest libxml tarball (I used 2.9.3) wget http://xmlsoft.org/sources/libxml2-sources-2.9.3.tar.gz # Extract it in the current directory tar xvf libxml2-sources-2.9.3.tar.gz cd libxml2-2.9.3 # Remember the $TOOLCHAIN_PATH we set just above source "$ /envsetup" ./configure \ --prefix="$ " \ --host=arm-linux-gnueabihf \ --includedir="$ /usr/include" \ --libdir="$ /usr/lib" \ --without-python \ --without-lzma make -j 128 make install # When compiling sja1105-tool, it will use pkg-config to find the proper # location of libxml2, which is the --libdir parameter from above.
cd base_dir> git clone git@github.com:openil/sja1105-tool.git cd sja1105-tool # Again, remember your $TOOLCHAIN_PATH source "$ /envsetup" make -j 128 # To build the manpages, run "make man" or "make all" # However, this step requires the "pandoc" package to be installed. DESTDIR=out make install
The following manual pages are provided:
cd docs/man man -l ./sja1105-tool.1 # General command overview man -l ./sja1105-tool-config.1 # Detailed usage of sja1105-tool config man -l ./sja1105-tool-status.1 # Detailed usage of sja1105-tool status man -l ./sja1105-tool-reset.1 # Detailed usage of sja1105-tool reset man -l ./sja1105-conf.5 # File format for sja1105-tool configuration man -l ./sja1105-tool-config-format.5 # File format for XML switch configuration tables
Port numbering on the NXP LS1021ATSN board
| Chassis port label | Switch port number | PHY ID |
|---|---|---|
| ETH2 | RGMII 1 | 3 |
| ETH3 | RGMII 2 | 4 |
| ETH4 | RGMII 3 | 5 |
| ETH5 | RGMII 0 | 6 |
| Internal | RGMII 4 | – |
- Link speed autonegotiation is not supported.
In the default LS1021ATSN configuration, link speed on all ports is set to 1000Mbps.
The 5 ports of the SJA1105 switch do not have a Linux kernel driver. As such, the PHY chip (BCM5464R) attached to the 4 externally connected ports of the LS1021ATSN board (ETH2, ETH3, ETH4, ETH5) is not controlled by the Linux kernel either.
There is a workaround for this issue, that is to disable auto-negotiation on the PHY and keep the link speeds manually in sync between the PHY and the switch ports. The init script that does this is etc/sja1105-link-speed-fixup , and is deployed in OpenIL at /etc/init.d/S46sja1105-link-speed-fixup . Link speeds should be set at their desired values in this init script.
- Clock synchronization via TTEthernet (SAE AS6802) is not supported.
When creating a new issue in the Github tracker, it may be useful to describe the usage scenario, as well as provide an XML configuration and an SPI dump of the configuration you are sending to the switch.
To get an XML configuration:
sja1105-tool config save bug.xml
To get an SPI dump:
# Modify /etc/sja1105/sja1105.conf: # dry_run = false sja1105-tool config upload > spi_dump.log
About
The sja1105-tool is a Linux userspace application for configuring the NXP SJA1105 Automotive Ethernet L2 switch.
Comments are closed, but trackbacks and pingbacks are open.