This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Pratim Ugale <pratim.ugale@gmail.com> | |
* | |
* To change Date, Time settings of the clock, switch OFF "Automatically set time from the Internet" on your PC | |
* | |
* Run this program with root permissions(sudo) | |
* | |
*/ | |
#include <iostream> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# For the pruss_api driver | |
sudo depmod -ae | |
# For the prussd daemon service | |
sudo chmod a+x /usr/bin/prussd.py | |
sudo systemctl enable prussd.service | |
sudo systemctl daemon-reload | |
sudo systemctl start prussd.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Incorrect values written in PRU SRAM: (Each line denotes the data in that memory address offset) | |
Byte 1: 0x0001 0000: 53 | |
Byte 2: 0x0001 0001: 0 | |
Byte 3: 0x0001 0002: 0 | |
Byte 4: 0x0001 0003: 0 | |
Byte 5: 0x0001 0004: 53 | |
53 | |
62 | |
56 | |
43 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debian@beaglebone:~/PRUSS-Bindings/examples/firmware_examples/example9-multichannel-waveform-gen$ ./userspace.o | |
Message from syslogd@beaglebone at Aug 19 20:37:04 ... | |
kernel:[ 3182.544410] Internal error: Oops: 5 [#1] PREEMPT SMP ARM | |
Message from syslogd@beaglebone at Aug 19 20:37:04 ... | |
kernel:[ 3182.651471] Process prussd.py (pid: 2103, stack limit = 0xdaab0218) | |
Message from syslogd@beaglebone at Aug 19 20:37:04 ... | |
kernel:[ 3182.657767] Stack: (0xdaab1f00 to 0xdaab2000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile that contains the install instructions to create the pruapi debian package. | |
# Path to the pruss_api.c loadable kernel module. | |
MDIR := drivers | |
# Path to the prussd.py python daemon service. | |
DDIR := prussd | |
# Path to the cpp-bindings. | |
CDIR := cpp-bindings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debian@beaglebone:~/work/PRUSS-Bindings/examples/firmware_examples/example9-multichannel-waveform-gen$ sudo rmmod rpmsg_pru | |
debian@beaglebone:~/work/PRUSS-Bindings/examples/firmware_examples/example9-multichannel-waveform-gen$ ./test.o | |
Wave 1Sample 0 | |
Wave 2Sample 0 | |
Wave 3Sample 0 | |
Wave 4Sample 0 | |
Wave 5Sample 0 | |
Message from syslogd@beaglebone at Jul 31 15:21:52 ... | |
kernel:[ 354.481219] Internal error: Oops: 5 [#1] PREEMPT SMP ARM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# prussd.py - Daemon to process PRU access requests | |
# for non-root processes | |
# | |
# Copyright (c) 2018 Mohammed Muneeb | |
# | |
# This program is free software: you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License version 3 as published by | |
# the Free Software Foundation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When showing the oops message: | |
$ dmesg | |
[ 209.638868] remoteproc remoteproc2: powering up 4a338000.pru | |
[ 209.652589] remoteproc remoteproc2: Booting fw image am335x-pru1-fw, size 74736 | |
[ 209.655820] pruss 4a300000.pruss: configured system_events[63-0] = 0x00000000.000c0000 | |
[ 209.655841] pruss 4a300000.pruss: configured intr_channels = 0x0000000a host_intr = 0x0000000a | |
[ 209.663057] remoteproc remoteproc2: registered virtio0 (type 7) | |
[ 209.663078] remoteproc remoteproc2: remote processor 4a338000.pru is now up | |
[ 209.778529] virtio_rpmsg_bus virtio0: creating channel rpmsg-pru addr 0x1f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/example9-multichannel-waveform-gen$ dmesg | |
[ 0.000000] Booting Linux on physical CPU 0x0 | |
[ 0.000000] Linux version 4.14.71-ti-r80 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 | |
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d | |
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
[ 0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black | |
[ 0.000000] Memory policy: Data cache writeback | |
[ 0.000000] efi: Getting EFI parameters from FDT: | |
[ 0.000000] efi: UEFI not found. | |
[ 0.000000] cma: Reserved 48 MiB at 0x9c800000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../../../cpp-bindings/pruss.h" | |
#include <iostream> | |
#include <math.h> | |
#define PI 3.14159 | |
using namespace std; | |
int main() | |
{ |
NewerOlder