Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Z zynq-can-sja1000-top
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • canbus
  • zynq
  • zynq-can-sja1000-top
  • Wiki
  • ctucan_on_mz_apo

ctucan_on_mz_apo · Changes

Page history
Update ctucan_on_mz_apo authored Nov 10, 2019 by Pavel Pisa's avatar Pavel Pisa
Hide whitespace changes
Inline Side-by-side
ctucan_on_mz_apo.md
View page @ 2b32eafc
#Use of MZ_APO for CTU CAN FD testing
The [PiKRON](http://pikron.com/) [MZ_APO](https://cw.fel.cvut.cz/wiki/courses/b35apo/start) baseboard [documentation](https://cw.fel.cvut.cz/wiki/courses/b35apo/start).
[PiKRON](http://pikron.com/) [MZ_APO](https://cw.fel.cvut.cz/wiki/courses/b35apo/start) is [MicoroZed](http://zedboard.org/product/microzed) baseboard developed for [Computer Architectures](https://cw.fel.cvut.cz/wiki/courses/b35apo/start) course.
[Documentation](https://cw.fel.cvut.cz/wiki/courses/b35apo/start) of the design used for education.
Mechanical design [FreeCAD files etc.](https://gitlab.com/pikron/projects/mz_apo/microzed_apo).
The remotelly accesible target MZ_APO board on the address `147.32.86.sto` is connected to the control computer `147.32.86.stosedumnact`. The target board boots diskless way from the NFS exported directory `147.32.86.stosedmnact:/srv/nfs4/debian-armhf` of the control computer. The root filesystem is exported read only and overlaid by `tmpfs` at the target by [init-overlay](https://github.com/ppisa/rpi-utils/blob/master/init-overlay/sbin/init-overlay) script which is part of [rpi-utils](https://github.com/ppisa/rpi-utils).
The directory `147.32.86.stosedmnact:/srv/nfs4/debian-armhf-devel` of control computer is mounted into `/devel` directory of the target system filesystem namespace snadwich. This directory is mouted/share read write so it is place to easy deliver drivers and design build on the control computer into target filesystem and grab log files created by target from the control syetm account.
Linux kernel and U-boot modified for MZ_APO board repository [https://github.com/ppisa/zynq-rt-utils-and-builds](https://github.com/ppisa/zynq-rt-utils-and-builds)
Reset and monitor console of target MZ_APO board connected to control computers.
Reset and monitor console of target MZ_APO board from the control computers.
```
ssh -e none login@147.32.86.stosedumnact
......@@ -15,6 +21,34 @@ ttysendbreak /dev/ttyUSB0 5000 ; cu -s 115200 -l /dev/ttyUSB0
cu -s 115200 -l /dev/ttyUSB0
```
Run-time design update of programmable logic and device-tree uses [dtbocfg](https://github.com/ikwzm/dtbocfg) project. Update FPGA/PL configuration file `/devel/system.bit.bin` and specify device-tree overlay or update default file `/devel/bitstream+dt.dtbo`. Then run update request on the target.
```
ssh root@147.32.86.sto
cd /devel/
./upbit
```
It inserts `dtbocfg` module, removes old and creates new overlay directory `/sys/kernel/config/device-tree/overlays/pl` and runs
```
cat /devel/bitstream+dt.dtbo >/sys/kernel/config/device-tree/overlays/pl
```
The device tree overlay references `system.bit.bin` file in `/firmware` directory which links for simplicity to `/devel` directory.
The SJA1000 driver is bind to `can2` and `can3` automatically. The CTU CAN FD driver has to be inserted manyally in actual setup `insmod /devel/ctucanfd.ko`.
The script `/devel/setup-can2345` can be used to setup 2x [FD tol OpenCores CAN](https://gitlab.fel.cvut.cz/canbus/zynq/sja1000-fdtol) 2x [CTU CAN FD Core](https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core) for base bitrate 500kbps and data bitrate 2 Mbps if all other setup is done properly.
To capture traces by logic analyzer ([Zlogan]((https://github.com/eltvor/zlogan/)) run
```
cd /devel/zlogan/zlogan-capture
modprobe udmabuf udmabuf0=33554432
./rxla -o 190904-225640.zlo -n 10000000
```
Convert captured file into GTKwave format
```
./zlo2vcd <190904-225640.zlo | gzip > 190904-225640.vcd.gz
```
U-boot environment
```
......
Clone repository
  • B35APO Buid on MZ_APO
  • canlatester_ctucanfd
  • ctucan_on_mz_apo
  • Home