Questions tagged [spi]

The SPI bus, Serial Peripheral Interface, is a synchronous serial communication interface for short distance communication, e.g. between components in an embedded system such as the Pi. Devices communicate in full duplex mode using a master-slave architecture with a single master. The master device (typically the Pi) initates all communications.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Has anyone used spidev library with python 3?

I am currently trying to interface a RPI 3B+ with a flash memory chip using SPI communication. do anyone have a good resource for using SPI communication with memory? What language should I use. I ...
0
votes
1answer
32 views

Fluctuating SCLK voltage with increase in frequency

Raspberry pi newbie here. As part of my academics i was working on Raspberry Pi 3 B+ , Raspbian OS kernel 4.14.98-v7 and i was testing protocols and i am stuck at SPI. I am running spidev_test.c from ...
2
votes
1answer
18 views

CE1 not going low for pigpio.spi_open() with flags

I'm attempting to modify joan's test script (https://raspberrypi.stackexchange.com/a/44320/42126) for an RPi SPI master to communicate with an Atmega328P slave. I cannot change which GPIO pins I have ...
8
votes
1answer
1k views

Pi 4 I/O interface options… and where to find them

The BCM2711's hardware documentation lists multiple I/O interface options. Among others these are: up to 6 × I2C, up to 6 × UART (muxed with I2C), up to 6 × SPI (only five exposed on Raspberry Pi ...
1
vote
1answer
47 views

Speed up SPI transfer

So I need to transfer a byte on the spi interface on raspberry pi. Here's my code in python import spidev import time import binimp fhandle=open("white.txt") initial=binimp.extract(fhandle,'192','...
2
votes
0answers
34 views

SPI0 and UART0 interference caused by SPI interrupt

I have a raspberry CM3 running a custom Linux version created by buildroot (kernel: 4.19.44-v7). The CM3 is configured to be part of a measurement system that is used on a quad-bike (so a lot of ...
1
vote
0answers
29 views

SPI Display – fbtft connects to wrong frame buffer

Today I installed an SPI display to my pi. I'm using fbtft and follow the wiki. I don't want screen mirroring, but force the SPI display to be a secondary monitor. I discovered, that fbtft connects ...
2
votes
3answers
403 views

Separate SPI data

I am using the AD/DA Hat from WaveShare https://www.waveshare.com/wiki/High-Precision_AD/DA_Board I want to realize a continuous readout of the data. It worked very well so far, but I am not so ...
2
votes
0answers
24 views

SPI NOR Flash: Unstable reads

So I hooked up an Winbond 25Q256JVEQ to my Raspi3 via SPI (spi0.0) and want to read its content. I use the jedec-nor-spi dtoverlay so its available as MTD. However when I want to read the chips ...
1
vote
1answer
37 views

Why Raspberry Pi Zero W is missing to log data constantly every second?

I'm doing a project where I want to record IMU (Inertial Measurement Unit) readings. I want to use pretty high sampling frequency and I'm using Raspberry Pi Zero W to send PWM signal of 800Hz to ...
7
votes
0answers
127 views

Cannot Use SPI frequency above 500 kHz

I am running Arch Linux ARM on a Raspberry Pi 2 Model B, and I am attempting to communicate with a TFT display. I am writing a kernel module to interface with the display using SPI, and it works, but ...
-2
votes
2answers
71 views

SPI driver for communication

I want to load my kernel module which communicates with my device over spi interface. I have tried loading my modules but it's showing spidev is already installed. I see 2 modules named spidev and ...
-1
votes
1answer
39 views

Using two SPI ports simultaneously on Raspberry Pi 0 W

I'm trying to use two SPI busses on Raspberry Pi 0 W. I found some hints around but I really cannot understand how to use it and if there are restrictions on it. On this thread it seems that the ...
0
votes
1answer
47 views

Unable to open device /dev/spi

I'm trying to communicate with a 128x64 screen on SPI (GFX-hat pimori). It seems that the device /dev/spi* does not exist, I looked at how to do it on the net, but the device refuses to be created. ...
1
vote
2answers
34 views

Raspberry Pi and Arduino Due Spi

Is there any way to establish SPI communnication between Raspberry Pi 3B + and Arduino Due. Both only support master mode. I tried to google but mostly answers from 2013 come up. Has there any recent ...
1
vote
3answers
86 views

Options to add 20 UART to RPi

So I am undergoing a project where I will need to add 20 UART (RX/TX) to a single raspberry Pi 3. Each device runs at 9600 After looking at the pi, I found it only has 1 UART on it. What would be ...
0
votes
0answers
41 views

Using waveshare LCD and SPI1 for LEDs

My problem is that I cant get SPI1 and the LCD screen to work at the same time. Only SPI1 with the spi1-1cs overlay worked and only the waveshare35a overlay working, I tried to make my own overlay ...
0
votes
1answer
75 views

Adding a USR-ES1 W5500 chip for Raspberry 3 A+

I am currently thinking about a project in which space should be kept to a minimum. Now I am using the A+ model because it is smaller however I do need an ethernet port. So what I am planning to do ...
0
votes
2answers
165 views

Reading only 0 from ADC using RPi SPI

Everytime I try to read analog channel 0 from ADC, it only prints 0. I am confused why. I shorted MISO and MOSI on my RPi to check SPI send/receive and it was working. But if I test it after properly ...
1
vote
0answers
34 views

Cant read both SPI Buses of Raspberry Pi 3B+

I want to read 3 analogue sensors simultaneously. I have successfully connected 2 sensors using a MCP 3002 A/D converter which is connected to CS0 of SPI 0 of raspberry pi and I have activated 3 more ...
0
votes
1answer
93 views

Using FLIR Lepton3 module with Raspberry Pi 0 W low frame rate issue

I'm trying to use FLIR Lepton 3 module with Raspberry Pi 0 W board running Raspbian 9 Stretch. I followed all official FLIR recomendations: connected Lepton module to Raspberry in the correct way (...
1
vote
0answers
24 views

CAN bus read on RPI3

I have 10 CAN IDs on the bus and would like to read all the 10 IDs every 0.1 seconds. I was able to write the code below but it shows me one message only. import can bus = can.interface.Bus ("can0", ...
2
votes
2answers
132 views

How to check if SPI is enabled and functional on Raspi 3b+?

I have run raspi-config and enabled SPI and also verified that /boot/config.txt contains the line: dtparam=spi=on However, when I run lsmod | grep spi I get the following: spidev ...
1
vote
2answers
115 views

Find out whether SPI is enabled or not

I have a game that needs SPI. In the installation instructions, I noted that SPI has to be enabled via raspi-config. Now, I'd like to check in a shell script whether the user has activated SPI or not....
2
votes
1answer
103 views

how can I get a fixed sampling rate of 1 ksps when interfacing MCP3008 (10 bit ADC) with raspberry pi using SPI?

Whenever I take data from the MCP3008, my sample rate keeps changing. Sometimes it's 24ksps, sometimes 200sps. I want to keep this fixed. Python Code for SPI communication on raspberry pi: import ...
1
vote
0answers
45 views

Configure SPI from Kernel Space by writing to the SPI Registers

I'd like to write my own SPI driver to configure the SPI interface by means of writing to the CS, FIFO, and CLK SPI registers. I have disabled the SPI interface in raspi-config. I followed the ...
1
vote
1answer
212 views

I am using a RFID reader module MFRC522 with my raspberry pi but it is not working with python 3

I am using RFID reader module (MFRC522) with my raspberry pi and when I run the script with python 2 it works fine and reads the RFID tag but when I run it with python3 I get an error - No Module ...
1
vote
1answer
84 views

SPI sending function

I'm currently reworking a project from someone who graduated a few years back and I'm supposed to change the function of his work for a bit. I have trouble understanding these few lines from SPI ...
0
votes
0answers
26 views

Emulate USB devices from one Pi zero to another Pi zero

I'm looking for the best way to emulate USB devices that are plugged into a Pi zero and connected to another Pi zero through GPIO pins, so the second Pi zero will emulate the actual device that is ...
1
vote
2answers
296 views

5V-3.3V Sensors Confusion

Most of the sensors available in the market requires 3.3V-5V. The GPIO of the Raspberry Pi is 3.3V max only and not 5V tolerant. I have seen tutorials around the internet that they supply the sensors ...
0
votes
0answers
54 views

SPI voltage level

I had troubles reading an IC (ADAS1000-4) with my raspberry. As soon as I connect the chip to the SPI bus of the Raspberry, the Low voltage doesn't get as low as I expect (please have a look on the ...
0
votes
0answers
54 views

piscope SPI pin activity even though the SPI device is not connected

my final goal is to use python (spidev) to communicate with a BMS chip. Until now I was quite unsuccessful, thats why I wanted to use piscope to track the activity of the SPI pins. The device is not ...
0
votes
0answers
155 views

SPI DMA in Raspbian

Is it possible to access the SPI DMA on a Raspberry Pi running Raspbian without using custom drivers by directly reading and writing to the associated hardware registers? I assume the register ...
0
votes
0answers
164 views

MAX7219 7-segment via SPI not working

I am following these instructions to get a simple 7-segment display working: https://github.com/rm-hull/luma.led_matrix My problem is that as soon as one of the 3 SPI Pins are connected the digits ...
0
votes
0answers
50 views

How do I find which pins my TFT display is using?

I have a TFT Touch Screen Display from Tontec that I'm using for a project. According to the product description the display only uses 8 pins. However, the connector cable takes up 26 pins worth of ...
0
votes
0answers
61 views

How to stop the NXP NFC-EXPLORE library from interfering with my i2c oled display?

I've been working on a new project with my raspberry pi 3b+ to turn in into a NFC jukebox/bluetooth speaker and I used the NXP EXPLORE-NFC header to take on the NFC scanning part. I've connected it ...
1
vote
0answers
33 views

Bootup activity on SPI0, even when not enabled

RPi 3B+ uname -a Linux GWf231a6 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux /boot/config.txt: #dtparam=spi=on I'm getting weird waveforms on my SPI bus at boot even when SPI ...
0
votes
1answer
23 views

Why won't my Raspberry Pi connect using SSH when NRF24L01 or ATTiny85 are Connected via SPI?

As the question states, my Pi (3 B+) won't accept SSH connections (times out) when I have either my NRF24L01 or ATTiny85 boards hooked-up. I hook both up (at different times of course) to pins 17, 19, ...
1
vote
1answer
169 views

spi/mcp3008 trouble with getting a reading from chip, all channels read 0 (zero)

Pi model: Pi 3 A+ Os: Raspbian GNU/Linux 9 (stretch) <- it's stretch lite SPI: On Loop back test: spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 ...
0
votes
1answer
114 views

Connect 6 accelerometers to Raspberry Pi

I need to connect 6 LIS3DH Accelerometers to a Raspberry Pi. Is this possible, and how would I do this? Do I need to use I2C or SPI? Or do I need something like an I2C multiplexer? (If another type ...
0
votes
0answers
46 views

What is the maximum usable SPI frequency for Raspberry Pi 3 Compute Module?

I have checked What SPI frequencies does Raspberry Pi support? question, anyway its subject is RPi, not RPi Compute module. Also, I want to check for usable frequency, not theoretical. Limitations ...
2
votes
1answer
178 views

SPI access via C# .NET Core console app

I do not have much experience with C# or Linux/Raspbian so would like some advice/guidance please. Basically I need to write a C# .NET Core console app which will run on a Raspberry Pi Compute 3 ...
1
vote
1answer
50 views

Finding the right SPI pins on the Rapsberry for Digital Pot MCP42010

Here is the data sheet for the MCP42010: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf Here are my best guesses: Pin 1 CS goes to Pin 11 / SPI1 CS0 (GPIO17) Pin 2 SCK goes to Pin 23 / ...
2
votes
1answer
63 views

Two data parsing frames for SPI reads of MCP3008 ADC, any advantages or disadvantages of either one?

I am reading an MCP3008 ADC using pigpio, I've abstracted the script below. I have also found a slightly different construction or parsing of the three SPI command bytes and reconstruction of the ADC ...
1
vote
2answers
46 views

Connecting 2 raspberry pi zero to one spi screen

I wanted to know if you can connect 2 pi zero's to 1 spi screen and have a switch to switch between them?
0
votes
1answer
114 views

Raspberry PI SPI interface

I'm looking at a Raspberry Pi and I am a bit new to Serial Peripheral Interface. I see the Rasperry Pi has two SPI interfaces on the GPIO pins. Can one SPI interface be programmed to connect to ...
0
votes
1answer
64 views

Raspberry pi with NRF24

I've tried building a few libraries from source; they compile fine, but the receiving pi gets no data. I found this post describing similar issues. If someone could help me understand the reply that ...
0
votes
2answers
96 views

After switching from pigpio to pigpiod, how can SPI write operations display random bit errors?

I've already written and tested some code using pigpio to drive a Futaba GP9002A VFD. When using the pigpio lib directly, it worked almost absolutely fine, but after migrating to the pigpio daemon (...
0
votes
1answer
234 views

How to speed up SPI chip select transition using “spidev”?

I successfully drive a DAC via SPI using the spidev native SPI driver using a RaspberryPi3. The core portion of my code is as follows: fd = open("/dev/spidev0.0", O_RDWR); txarr[0]=0xAA; txarr[1]=...
0
votes
1answer
119 views

Is SPI in Raspberry Pi Reliable..?

I'am trying to initiate a two way communication between Raspberry pi and Arduino. I worked with spidev library and directly using the SPDR register in the Arduino micro-controller without being able ...