Go to advanced search

by mntmst
Sat Aug 19, 2017 5:28 am
Forum: Device Tree
Topic: porting spi potocol driver from old linux os to device tree
Replies: 15
Views: 2423

Re: porting spi potocol driver from old linux os to device tree

Great! Nothing magical, tell the computer what you want, in the correct way and it works.
by mntmst
Fri Aug 18, 2017 5:43 pm
Forum: Device Tree
Topic: porting spi potocol driver from old linux os to device tree
Replies: 15
Views: 2423

Re: porting spi potocol driver from old linux os to device tree

By the way, I am using pi zero. Should I change the pin number also? Here is my overlay /* * Device Tree overlay for the gpiospi module used by Comedi daq_gert analog devices * */ /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; /* disable spi-dev for spi0.0 & sp...
by mntmst
Fri Aug 18, 2017 4:36 pm
Forum: Device Tree
Topic: porting spi potocol driver from old linux os to device tree
Replies: 15
Views: 2423

Re: porting spi potocol driver from old linux os to device tree

This is not a flame, just a warning - although that driver is well written and commented, it is not a good example of how to write a modern Linux device driver. It includes direct hardware access to the GPIOs (which, as well as being ugly, is a bad idea due to atomicity problems). But as long as yo...
by mntmst
Fri Aug 18, 2017 1:58 am
Forum: Device Tree
Topic: porting spi potocol driver from old linux os to device tree
Replies: 15
Views: 2423

Re: porting spi potocol driver from old linux os to device tree

Maybe you can look at my SPI protocol driver for rpi2/3 that also loads the comedi DAQ applications module as a working example for device tree. https://github.com/nsaspook/daq_gert/blob/master/daq_gert.c Kernel patch diff file. https://github.com/nsaspook/daq_gert/blob/master/daq_gert.diff_rpi-4.12...
by mntmst
Fri May 20, 2016 4:52 pm
Forum: Advanced users
Topic: ‘GPIO_BASE’ undeclared on Kernel compile
Replies: 4
Views: 1389

Re: ‘GPIO_BASE’ undeclared on Kernel compile

GPIO_BASE (and others) should be here: #include <mach/platform.h> From some local kernel module code for rpi-4.6 dev->iobase = GPIO_BASE; /* bcm iobase */ /* * dev->mmio is a void pointer with 8bit pointer indexing, * we need 32bit indexing so mmio is casted to a (__iomem uint32_t*) * pointer for GP...
by mntmst
Sat Oct 03, 2015 8:51 pm
Forum: Raspbian
Topic: Jessie: rc.local vs. systemd
Replies: 23
Views: 26291

Re: Jessie: rc.local vs. systemd

You can still install sysvinit, systemd-shim, sysvinit-utils and sysvinit-core if you still want init instead of systemd on your system.
by mntmst
Fri Oct 02, 2015 11:31 pm
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Re: Super Blood Moon

The ADS1220 ADC with the PI worked out perfectly as the frontend for the detector. If you need a low noise, low power 24-bit device for low level signal data it's a good choice. Here are a few FFT pictures of the noise levels with the input connected to a 4.7k metal film resistor. The RPi data logge...
by mntmst
Fri Oct 02, 2015 11:09 pm
Forum: Off topic discussion
Topic: Fake microSD card ? nope SD USB reader limit (2GIG)
Replies: 10
Views: 1796

Re: Fake microSD card ? nope fake USB reader

Got it ;) , I will go to the Canadian version of "poundland" (dollorama) to see if I can find a similar reader. Unbelievable that the Reader defect would show the behavior of a fake 2GIG SD card labeled as a 8GIG. I have no logical explanation for that. Ben It looks like it only supports the SD sta...
by mntmst
Wed Sep 30, 2015 5:03 am
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Re: Super Blood Moon

I've posted the data from the event here: https://www.physicsforums.com/threads/p ... st-5243967
by mntmst
Mon Sep 28, 2015 4:59 am
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Re: Super Blood Moon

Moon shots from Oregon. Blood Moon: https://c1.staticflickr.com/1/703/21762326142_dec71de947_b_d.jpg:size=150%20markers Moving back from the full eclipse: https://c1.staticflickr.com/1/594/21154024193_79cfd92b96_b_d.jpg:size=150%20markers https://c1.staticflickr.com/1/588/21748938776_b2083baa1e_b_d....
by mntmst
Sun Sep 27, 2015 3:58 am
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Re: Super Blood Moon

Not very clear as I was with the wife and her friend picking herbal medicines on a hill with just my crappy tablet camera. Moon rise near Mt. Hood on the day before the Super Blood Moon. https://c1.staticflickr.com/1/568/21754362091_6c84d88133_z_d.jpg I've got a HD-3000 webcam for the PI to see if I...
by mntmst
Sat Sep 26, 2015 5:08 am
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Re: Super Blood Moon

More hardware related information. The ADC uses SPI mode 1 The output of the ADC is binary twos complement so the RAW output has been converted in software to bipolar binary twos complement format for the user library. https://c1.staticflickr.com/1/566/21276435932_370ecc34a2_z_d.jpg Kernel program h...
by mntmst
Fri Sep 25, 2015 8:27 pm
Forum: Other projects
Topic: Super Blood Moon
Replies: 6
Views: 3960

Super Blood Moon

I'm running a little science project with one of my kids for the upcoming Lunar eclipse using an RPi2 to record changes in the moon light as it passes into the cone of the earths shadow. The basic hardware is pretty simple: ADS1220 24-bit Delta-sigma ADC connected via SPI from a original Gertboard a...
by mntmst
Sat Sep 19, 2015 9:42 pm
Forum: General discussion
Topic: nanosecond
Replies: 30
Views: 5649

Re: nanosecond

What you say is true with a CW signal but you don't use continuous signals in this mode, only light pulses with the the fastest rise time possible from the transmit/detector hardware. The receiver is used as a light level detector for time measurement not to decode the phase shift of a signal. It's ...
by mntmst
Sat Sep 19, 2015 9:27 am
Forum: General discussion
Topic: nanosecond
Replies: 30
Views: 5649

Re: nanosecond

mntmst, I like it. Now, assuming I have pulses at 1MHz on my light souce I will get 1MHz back on my receiver. With a phase delay dependent on the time of flight of light. How can we tweak that CTMU set up to make a continuous phase measurement and hence speed of light measurement? That is a brillia...
by mntmst
Fri Sep 18, 2015 4:23 pm
Forum: General discussion
Topic: nanosecond
Replies: 30
Views: 5649

Re: nanosecond

. Using a micro-controller to generate the transmitted signal is easy. No so sure about counting the time of flight though. You can measure time as the rate of change of an electrical parameter in a circuit. The http://ww1.microchip.com/downloads/en/AppNotes/CTMU%2001375a.pdf CTMU device module can...
by mntmst
Fri Sep 18, 2015 6:00 am
Forum: General discussion
Topic: nanosecond
Replies: 30
Views: 5649

Re: nanosecond

Measuring the time of flight for light requires sub-nanosecond timing (impossible with an RPi directly) for under a meter resolution. I've made several devices for measuring the length and characteristics of light-links using the PIC micro-controller CTMU module for about 0.1 nanosecond resolution w...
by mntmst
Mon Sep 07, 2015 2:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Add new SPI device (MPU6000) without kernel recompiling
Replies: 7
Views: 3128

Re: Add new SPI device (MPU6000) without kernel recompiling

Glad you have it working. The patch handles both device tree and non-device tree kernels. (that's now obsolete on the PI)
by mntmst
Sat Sep 05, 2015 6:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Add new SPI device (MPU6000) without kernel recompiling
Replies: 7
Views: 3128

Re: Add new SPI device (MPU6000) without kernel recompiling

I am using the SPI device driver but you can also have kernel protocol drivers to that device driver. That's what I'm developing and using. spi-bcm2835 is a device controller driver directly touching chip registers on the master for the standard Linux SPI framework. spidev is a protocol driver (grea...
by mntmst
Sat Sep 05, 2015 3:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Add new SPI device (MPU6000) without kernel recompiling
Replies: 7
Views: 3128

Re: Add new SPI device (MPU6000) without kernel recompiling

From the docs: https://www.kernel.org/doc/Documentation/spi/spidev SPI devices have a limited userspace API, supporting basic half-duplex read() and write() access to SPI slave devices. Using ioctl() requests, full duplex transfers and device I/O configuration are also available. #include <fcntl.h> ...
by mntmst
Sat Sep 05, 2015 8:21 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Add new SPI device (MPU6000) without kernel recompiling
Replies: 7
Views: 3128

Re: Add new SPI device (MPU6000) without kernel recompiling

If this is a SPI protocol driver like SPIDEV you will have to make a kernel patch and device-tree overlay entry so you can disable SPIDEV and hook your protocol driver to the spi framework with a device-tree file. I'm hacking a ADS1220 RPi2 (supermoon.c) driver for the Comedi DAQ library to track mo...
by mntmst
Tue Jun 23, 2015 7:54 pm
Forum: Bare metal, Assembly language
Topic: Dedicating one core to hard realtime tasks
Replies: 26
Views: 9428

Re: Dedicating one core to hard realtime tasks

dpotop wrote:Hello mntmst,
mntmst wrote:If you do manufacturing engineering...
I don't. :D
Of course, you're doing manufacturing with your RPi, then the situation changes. But I was assuming a hobby usage.

dpotop
Then 'value' is even more important :D as the money is coming directly from your pocket.
by mntmst
Sat Jun 20, 2015 7:10 pm
Forum: Bare metal, Assembly language
Topic: Dedicating one core to hard realtime tasks
Replies: 26
Views: 9428

Re: Dedicating one core to hard realtime tasks

If this is possible, that I would argue that using a coprocessor is overkill. It implies using extra hardware, another compiler, etc. dpotop It's all about 'value'. Is the lost value from scrap more than the cost of an added uC (with near 100% reliability not to scrap because the process can be res...

Go to advanced search