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.

156 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
0answers
1k 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 ...
4
votes
1answer
945 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 ...
3
votes
0answers
130 views

How to write a Kernel module using SPI properly?

I have no experience writing kernel modules. I build some examples with gpio interrupts and they worked prety well. Now I want to use SPI from my kernel module and I will explain why I need it. I am ...
3
votes
1answer
483 views

Conflicting dtoverlays and framebuffer

I have a RPi3 with latest standard kernel. I am making use of spi1. In config.txt I have the line: dtoverlay=spi1-3cs. I have 2 ADC's connected to spi1 and all seems fine, using an HDMI screen to ...
3
votes
1answer
1k views

Pi Zero SPI too slow (spi_bcm2835)

I am running a display using SPI. When running it on my Pi Model B, everything runs fine and fast. But when connecting it to my Zero instead, it runs very slow. Then I put the SD card of my Zero in ...
3
votes
0answers
2k views

Pi4J and Mifare RC-522 via SPI

I am having problems with coding a program that allows me to read RFID Tags with Pi4J on my Raspberry Pi 2 Model B. I am totally new to Python and would prefer a program written in Java to save some ...
3
votes
0answers
493 views

Raspbian Jessie+ breaks SPI (RFID Reader MFCR 522)?

Long version: I have a very odd problem: I connected a Mifare MFRC 522 RFID Reader to my raspberry Pi (it handles communication via SPI). For that I used one of the many Tutorial already on the ...
2
votes
0answers
59 views

USB via MAX3421

I am trying to get an additional USB port working by using the MAX3421 chip over SPI on a Raspberry Pi Zero W running raspbian. I have successfully installed the driver as a kernel module. The chip ...
2
votes
0answers
157 views

Loopback SPI interface not working

I'm trying to do the loopback test for the SPI interface on my raspberrypi model 2 B V1.1, by following the intruction on this website : https://www.raspberrypi.org/documentation/hardware/raspberrypi/...
2
votes
0answers
280 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 ...
2
votes
0answers
186 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 ...
2
votes
0answers
441 views

Accessing 3+ SD/MMC /dev/mmcblk devices

I've successfully followed some instructions for access 2 SD cards via SPI on a Raspberry Pi 3: https://ralimtek.com/Raspberry_Pi_Secondary_SD_Card/ How do I configure it to access more than 2 SD ...
2
votes
0answers
11k views

How to check whether SPI working or not?

I am totally new to Raspberry Pi. I am trying to simulate a sensor with raspberry pi where my - Devices Sensor: ANALOG DVICES ADIS16227-CMLZ iSensor (ADIS1622x/PCBZ) Device: ...
2
votes
0answers
417 views

How construct MISO byte order with SPI interface

I have a raspberry Pi 3, model B. I have an RFID-RC522 hooked up to it using SPI. I want to read from it, raspi being master device, RFID being slave(MISO). I am struggling to construct the correct ...
2
votes
0answers
1k views

SpiDev - spi.xfer([xxx]) -> Invaild argument error -> what?

I got trouble with a seemingly dumb-proofly simple code: import time import pigpio import spidev DS = 17 STCP = 27 SHCP = 22 MR = 5 spi = spidev.SpiDev() spi.open(0, 0) spi.xfer([0b10011011]) ...
2
votes
0answers
3k views

How to setup resistive LCD touchscreen over SPI

I've been following a guide for setting up an LCD touchscreen, without success. When the screen is plugged into the GPIO pins it just shows a white screen. After all my attempts it remains white. ...
2
votes
0answers
795 views

Low-latency SPI for MCP 3008

So, I am using the SPI interface on the Pi 2 model B to communicate with a MCP 3008 ADC chip, following the tutorial on http://www.raspberrypi-spy.co.uk/2013/10/analogue-sensors-on-the-raspberry-pi-...
2
votes
0answers
250 views

How to get an output from microstack GPS with an C# application?

we're currently working with my friend on a functional GPS module whcih will get your location etc. But we're stuck on this thing, we know that our device communicates and this is the ouput we got "...
2
votes
0answers
2k views

Using SPI with pigpio to transfer data to Pi from an ADC

I've purchased an AD/DA Board in order to use analog inputs in my Pi, here it is: http://www.waveshare.com/high-precision-ad-da-board.htm As you can see it has a trimmer in it and I have wired it to ...
2
votes
1answer
2k views

controlling rgb led strip via spi and node js

I recently purchased a pi and a string of individually addressable rgb led lights from shenhzen kapata (actually amazon, but they're the ones who sell it) and I'm trying to control it with my ...
1
vote
0answers
32 views

SpiDev read from BMM150 Geomagnetic Sensor

I am completely new to this topic so please excuse my mistakes. I have this: https://www.mikroe.com/geomagnetic-click geomagnetic click with a BMM150 sensor with this datasheet: https://download....
1
vote
0answers
59 views

Problem in the SPI communication with RFID-RC522 (spi mode)

I have some trouble using the RFID-RC522 reader with my RPi. It was working in the past, but now it stopped. I'm trying to find if a configuration changed somewhere and I also looked at the code of ...
1
vote
0answers
94 views

change mfrc522 module SPI to I2C

I'm working on a project where I need to use touchscreen and RC522 senzor on same Raspberry Pi, now I need to change senzor from SPI to I2C in order to do that I need to change mfrc522 module which ...
1
vote
1answer
98 views

Enable ENC28J60 on Raspberry Pi 4 SPI1 CE1

I have a Raspberry Pi model 4B V1.4 running: Linux raspberrypi 5.10.42-v7l+ #1422 SMP Tue Jun 8 13:03:05 BST 2021 armv7l GNU/Linux I want to connect an ENC28J60 spi ethernet adapter on spi1. Using ...
1
vote
1answer
66 views

HQ Camera V4L2 - bad set of scene mode causes camera controls to become unresponsive

I have been playing with these cameras for some time using opencv/raspicam to control the camera. The raspicam/opencv interface allows setting the gain, this is dubious because there is no manual set ...
1
vote
1answer
87 views

How is spidev and the spi-bcm2835 module related?

Removing either one deletes the SPI devices from /dev/ What's the difference between the two modules and how do they relate?
1
vote
1answer
169 views

Using Rpi python and MCP3008 ADC to read flame (RGB) sensor data for FFT analysis

I have an IR pyroelectic flame sensor which detects flames within the 8-10hz of flame flicker. I am new to the ADC world so any help is very appreciated. Documentation: https://pyreos.com/wp-content/...
1
vote
0answers
71 views

Can you boot the RPI 3 or below from SPI EEPROM?

RPI4 has an eeprom, however the other versions don't. I would be interested in particular in the RPI Zero. Could you add an SPI EEPROM to the header/gpio pins in order to load u-boot or maybe even a ...
1
vote
1answer
520 views

how to use MCP23S17 pin expander via SPI

I'm working on a custom sensor that is wired to a couple of MCP23S17 gpio expanders, which are in term connected to a Raspberry Pi 4 via the SPI pins i.e. SPI_MOSI, SPI_MISO, SPI_SCLK and CE0 pin. I'm ...
1
vote
0answers
47 views

Can four UARTs plus either an SPI or i2c connection be used at the same time on a Pi 4?

Since using 5 UARTs at the same time on a Pi 4 is apparently not possible, is there any reason why 4 UARTs plus either an i2c or SPI connection at the same time (one or the other) would not work?
1
vote
0answers
33 views

What clock does the SPI SCLK use?

I would like to set the PWM and GPCLK pins to use the same clock source as the SPI bus uses, As mentioned by an answer to a previous question The PWM and GPCLK can be set to the following sources: 0 ...
1
vote
0answers
131 views

Rpi ILI9341 2.8" 240 x 320 5110 SPI TFT LCD Screen Setup Problem

I ordered a cheap 2.8 inch ILI9341 screen from Amazon (https://www.amazon.co.uk/240x320-Screen-Serial-Module-ILI9341/dp/B07MXH92RL/ref=sr_1_12?dchild=1&keywords=spi+screen&qid=1589230039&...
1
vote
0answers
456 views

Waveshare RS485 CAN hat over raspberry pi 3A+

So I have been at least trying to connect to the hat from the Pi, the following is my configuration: I follow the manual set in this link: https://www.waveshare.com/w/upload/2/29/RS485-CAN-HAT-user-...
1
vote
0answers
24 views

How do I hold SPI high value?

I'm using wiringPi spi library to communicate two raspberries. As the spi clks aren't synchronised, I don't read the high values, since they are only a pulse. Is there a way to hold the high value ...
1
vote
0answers
126 views

raspberry pi 3 spi issue

I connected MOSI to MISO on Raspberry PI 3 Executed the below code: import time import sys import spidev spi = spidev.SpiDev() spi.open(0,0) print(spi.bits_per_word) print(spi.mode) print(spi....
1
vote
0answers
594 views

Rpi4B buster SPI CAN Bus Interface Problem

I'm using PI4 OS Buster. I want to connect 2 canbus interfaces so I will be able to read both of them at the same time. this is the connections I have made GPIO CAN HEADR ...
1
vote
0answers
253 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 ...
1
vote
0answers
143 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 ...
1
vote
0answers
73 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", ...
1
vote
0answers
389 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
0answers
40 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 ...
1
vote
1answer
344 views

Single channel SPI DMA

The documentation on the SPI peripheral says: Two DMA channels are required, one to read from and one to write to the SPI. Is this necessarily true? I have a device where I need to write a few ...
1
vote
3answers
3k views

Raspberry Pi won't recognize nRF24L01+

I'm a Raspberry Pi n00b and a python beginner, but I have a lot of experience with DIY electronics, arduino and c#. I've tried everything I can think of, and I just can't get the Pi to recognise the ...
1
vote
0answers
263 views

Simultaneous sampling using ADC and displaying in graphical LCD

I am using Raspberry Pi 3 Model B and MCP3008 for sampling my analog signal and the sampling frequeny is approximately 10 kHz. I need to display the sampled values in 3.5' inch graphical LCD. I just ...
1
vote
0answers
895 views

What's wrong with my SPI interface?

I have been trying to get SPI working so that I can use Flashrom to program a BIOS chip with Libreboot. I am using a Raspberry Pi Model B+ connected via short F-F jumper wires to a Pomona 5252 clip ...
1
vote
0answers
166 views

Access more than two (2) slaves on spi0

Supposedly, there is a new driver that supports arbitrary GPIOs for SPI0 channel select, that is configurable via the device tree. Everything I try only half works. The hard works. If I toggle the ...
1
vote
0answers
145 views

In simultaneous use of SPI0 and DPI Mode 3 interfaces, can SPI0 CS0 be moved to a pin other than 8?

I am attempting to design a device using a Pi Zero which needs to connect to both an ENC18J60 SPI ethernet controller, and a VGA monitor via Mode 3 DPI and the Mincepi Pi Zero pi2vga schematic. While ...
1
vote
0answers
2k views

SPI always reading all zeros, including during loopback test

I'm trying to get started interfacing my Pi 3 (running Stretch) with an ADC via SPI, but all I'm ever reading from SPI are zeros, including when I wire GPIO pin 19 to wire 21 for a loopback test (and ...
1
vote
0answers
567 views

1.8" ST7735 TFT display on SPI bus fickering, refresh rate seems too fast

I have four identical displays I purchased on Amazon: https://www.amazon.com/gp/product/B01DKGJF1K/ One of them is visibly flickering, making the display very unpleasant. I took a "slo-mo" video ...
1
vote
1answer
212 views

Using GPIOs as Chip Selects on Raspberry pi 3 while using Windows IoT core

I need to control 5 SPI devices using Raspberry Pi 3 and Windows 10 IoT core. But, as we know, there are only 2 SPI Chip Selects available. Is there any way that I can use the GPIO of the Raspberry Pi ...