I’m making available for image download a sample (clock) application with these features:
- turnkey – after initial EULA agreement step, the application launches on boot
- there is NO WARRANTY on ANY part of this project
- uses both PRU and the ARM processor
- not only one, but two ring buffers enabling fast data transfer (1.2MB/sec)
- connected by /dev/mem
- this app in no way needs this fast transfer, but your app might
- Needs ILI9341 SPI (4wire) connection … PRU0 implements minimal SPI protocol:
.asg “pru0outP9_31_hi”, RESET_HI
.asg “pru0outP9_31_low”, RESET_LOW
.asg “pru0outP9_27_hi”, DC_DATA
.asg “pru0outP9_27_low”, DC_COMMAND
.asg “pru0outP9_28_hi”, SS_HI
.asg “pru0outP9_28_low”, SS_LOW
.asg “pru0outP9_29_hi”, MOSI_HI
.asg “pru0outP9_29_low”, MOSI_LOW
.asg “pru0outP9_25_hi”, CLOCK_HI
.asg “pru0outP9_25_low”, CLOCK_LOW - my wrapper for PRUdebug included and preconfigured
- no djb configuration pain
- easy to use with this app
- video showing clock display during PRU stress test (1.2MB / sec)
- image file NOT a flasher – run without EMMC modification
- run app from uSD
- gzip file a little larger than 1GB
- https://drive.google.com/file/d/1Va7U4zgoVnjmociYIhewZVZxAi4f5EHE/view?usp=share_link
- custom scheduler controls launch
- ntp sync (clock app) … configured for Ubuntu pool
- wait for remoteproc file system to be created
- pin configuration
- PRU initialization
- application initialization
- when using ring buffers, it is important that the processors are started in the correct order
- application independent abstractions for pin manipulation … see pru.h
.asg “.t1”, pru0P9_29
.asg “CLR pruout, :pruout::pru0P9_29:”, pru0outP9_29_low
.asg “SET pruout, :pruout::pru0P9_29:”, pru0outP9_29_hi
.asg “CLR pruin, :pruin::pru0P9_29:”, pru0inP9_29_low
.asg “SET pruin, :pruin::pru0P9_29:”, pru0inP9_29_hi - image file distribution has benefits similar to VM’s
- dogtag – BeagleBoard.org Debian Image 2018-10-07
- system code already loaded and configured
- Perl
- cr.yp.to
- ncat
- …
- ILI9341 device orientation is landscape
- if your display is upside down, the ‘flip_horizontal’ step can be adjusted
- if device pins are on the left of the display, ‘flip_horizontal’ is a no op
- video of earlier implementation:
- Most of work done on PRU(s)
- barely measurable ARM utilization
- clock app generates and average of 650 bytes / second
- PRU stress test utilizes ARM process @ 40% (performance freq 1Ghz)
- 60MB input file executes in 50 seconds (1.2MB/sec)
use as you wish, in good health
gomer