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
1 vote
0 answers
21 views

SPI Chip Select (CS) Control?

I am working with spidev on my RPi4 project and I have noticed that there is a significant delay caused by the CS signal. I am using the hardware CS pin (CE0, pin header 24) to drive the CS signal for ...
2 votes
0 answers
27 views

Multiple SPI reads on Pi Pico requires reinitialisation

I'm playing around with reading in analogue inputs from an MCP3208 ADC via SPI. However, reading multiple inputs seems to cause a seg fault unless I reinitialise the SPI on each read/write. I've ...
0 votes
0 answers
40 views

SPI device driver for Raspberry Pi 4B using Buildroot 2022.02.5

I'm new to buildroot and using it to flash an image to Raspberry Pi and I need to learn it for a project in a college subject. This particular project needs a GUI so I acquired an SPI Display Module (...
0 votes
2 answers
94 views

Pi Pico SPI Interrupt only fires once

I have set an interrupt for spi0 which fires only once. Here is my entire code: int main() spi_init(spi0, 1000 * 1000); spi_set_slave(spi0, true); gpio_set_function(...
0 votes
1 answer
65 views

Connecting MCP2515 with raspi

I am trying to connect mcp2515 can bus module with raspi 4b. On using pi@piv2:~ $ sudo ip link set can0 up type can bitrate 125000 the terminal freezes so i downgraded my terminal to 5.4.61-v7l ,t ...
0 votes
0 answers
54 views

Adding two ENC2860 ethernets on 2 spi of Raspberry Pi Zero

I have successfully added enc2860 using spi0, I followed https://www.raspberrypi-spy.co.uk/2020/05/adding-ethernet-to-a-pi-zero/ to get it working without any issue on eth0. But I now want to add 2nd ...
1 vote
0 answers
121 views

How to use SPI touch screen with RPi?

I bought a SPI TFT 2.4" display with a resistive touchscreen from eBay (this one). The screen is ILI9341 and works fine with Python and displays what I want. But how do I make use of the touch ...
  • 151
1 vote
0 answers
25 views

How do you connect 1 or more Waveshare 2.9inch eInk to Raspberry Pi 4 Model B (2018)?

Apologies for this newbie question, but I am not sure how to safely (?) connect at least one Waveshare 2.9inch eInk module to a Rasp Pi 4 Model B. I am assuming that the colored wires go into some of ...
  • 111
1 vote
0 answers
66 views

How to connect SD card and battery to Pico?

I have been looking into components I need for a MicroPython project. I needs to be battery powered and be able to read/write to a removable SD card. For this, I have discovered SD breakout boards. ...
1 vote
1 answer
62 views

Raspberry Pi spidev CLK working but no signal on MOSI

I have a Raspberry Pi Zero W that uses this LCD screen, including its touch interface using SPI0. What I am trying to achieve is to add another SPI device that uses SPI0. I am able to successfully ...
3 votes
0 answers
58 views

Enabling SPI card reader in device tree on Raspberry Pi

Good evening, I have MFRC522 card reader. It works well with generic spidev kernel-level driver and high-level python driver. However, as I wanted to learn device trees in linux, I tried to bind ...
0 votes
0 answers
52 views

Two independent SPI connections for LoRa modules using board and rfm9x libraries

We have been trying to allow for two simultaneous and independent SPI connections in a Raspberry Pi 4 but have had no luck until now. In particular, we want to use two rfm9x LoRa modules ...
0 votes
0 answers
65 views

SPI Interrupt Bit-Offset / Too Early

I´m running an SPI Slave on my Pico and executing an interrupt when 16 bits of Data are received. I visualized the interrupt with a gpio spike on the beginning and end of the interrupt to see when it´...
  • 11
0 votes
0 answers
215 views

How to set SPI master on RPI Pico to some exact frequency?

I want to have SPI master on my RPI Pico, and I require it to have exactly 4.8 MHz clock. But I don't know how to set it up properly, since SPI clock doesn't allow every value. I read about peripheral ...
  • 101
0 votes
0 answers
261 views

SPI Transfer without CS/SS on Raspberry Pi Pico

I´m operating with a Master SPI device, that sends Serial Data via SPI, but there is no ChipSelect / SlaveSelect available. The input Data has to go to the PC Com Port. My idea was to work with either ...
  • 11
0 votes
1 answer
187 views

Software SPI Interrupt

I´m trying to set up an interrupt function, that gets triggerd, when the 8bit RX register of my SPI port is filled on my Raspberry Pi Pico. The Raspberry is running in Slave Mode. I have checked the ...
  • 11
0 votes
0 answers
25 views

spi driver works on pi 3 and pi 4, but not on pi cm4

I have a spi driver for an nrc7292. When I load it on a pi3 or 4 it works every time, but when I load it on a cm4 it only loads correctly about half the time. What could possibly be different? Once ...
0 votes
0 answers
41 views

Getting fbcp to work on a generic ili9341 display

I’m trying to get fbcp to work on my raspberry pi. I’m following the instructions on the GitHub repo, however, when I type in make -j it gives an error. I’ll paste the error below
  • 1
0 votes
0 answers
66 views

spi driver fails to load sometimes

I am getting an error when I try to load a driver for a spi device, but only about 50% of the time. I was hoping all I would have to do is hook up the devices reset pin, but I'm not sure that does ...
1 vote
1 answer
28 views

RPI Zero spiWrite bit order in PIGPIO

I'm trying to interface with an ADXL355 accelerometer via SPI on an RPI Zero W, and am unsure about the order that bits are written out via the function spiWrite. The datasheet for the ADXL355 shows a ...
0 votes
1 answer
35 views

Spi wrong voltage

Obviously, my spi is not happy. MISO and MOSI were idling around 1.5v instead of 3.3 so I added a 10k pull up, and that helped a bit, but as you can see, it's still not good. It idles around 2.8v ...
2 votes
0 answers
50 views

Raspberry Pi and RFM69HCW (Adafruit) not working - SPI used (URGENT)

I am working on a project, and I was trying to get the Pi 4 working with an RFM69HCW module. I tried using spidev for this, and read the spidev documentation. I followed the steps but I keep getting ...
  • 21
2 votes
1 answer
171 views

Raspberry pi 4, UART4 and SPI0

Raspberry pi 4 has 4 usable uart ports, uart 4 with rx in gpio 9 and tx in gpio 8, share rx pin with SPI0 miso0 pin. I would like to use both peripherals no ate the same time, but in different moment ...
0 votes
1 answer
40 views

Pigpio Hardware PWM_unable to write frequency above 5Khz

I have been using the pigpio library as a modified spi interface to send and receive serial data. I use Chip Select, Clock, and Data Lines but i am using "bit-banging" for the timing between ...
  • 11
0 votes
0 answers
50 views

How can I interpret this GPIO Alt-Modes?

I have a Hyperpixel 4.0 Touchscreen, which i use one my Raspberry PI 3b+ This Touchscreen is attached directly on the 40 GPIO-Pins and a few Pins have some special Alt-modes. I analysed the alt Modes ...
0 votes
3 answers
238 views

CAN bus from Raspberry Pi3+ to Arduino Nano

I am currently trying to add my RPi-3B+ to my CAN-Network. I successfully have a running CAN-Network with 10 Unos\Nanos. In the future the Pi should act as a command center and data storage. My ...
  • 101
0 votes
0 answers
31 views

Are Waveshare 2-CH_RS232_HAT stackable?

Is it possible to stack the Waveshare 2-CH_RS232_HAT? This is a link to the wiki page: https://www.waveshare.com/wiki/2-CH_RS232_HAT. The hat is driven via SPI, the interrupt pin can be chosen, there ...
  • 1
1 vote
1 answer
186 views

PiPico Quad Spi library to controll NOR flash modules

I need to use quad SPI NOR flash modules (W25Q128JV) for a project and I bought a Pi Pico as a simple way of validating the design before moving to an FPGA for the final project (the project is real-...
  • 21
1 vote
0 answers
78 views

SpiDev xfer not working when called from inside function

I have been working on integrating an absolute encoder using SPI (link to datasheet) into my project and have run into a problem with the SpiDev library for Python. When running the test script below,...
  • 11
0 votes
1 answer
94 views

Talking to MAX31865 from Raspberry Pi using Serial Peripheral Interface

I am trying to talk to the MAX31865 board from a Raspberry Pi over SPI but am not getting the results I'd expect. Can someone with more SPI experience take a look at my setup and point to what I may ...
-1 votes
0 answers
68 views

Raspberry Pi split screen with two connected screens to SPI

I'm fairly new at Raspberry Pi and would like to connect two SPI displays. After connected I want to make use of a camera to project the video on both screens. Therefore the one screen needs to have ...
1 vote
1 answer
75 views

Odd SPI issue only works when toggled

I'm running a pi 3b+ and I'm having a weird issue with SPI. I have a breadboard with an mcp3008 chip, and a potentiometer connected to it. I can get voltage values some of the time. I either have to ...
0 votes
1 answer
332 views

Raspberry Pi Compute Module 4 SPI bus not registering on custom Poky OS [Yocto]

I am trying to get a MCP2515 (CAN-bus IC that works on SPI) to work on a Raspberry Pi Compute Module 4 (8GB eMMC, No Wifi, 4GB RAM). I have been able to get the module working on a regular Raspberry ...
2 votes
2 answers
179 views

How to send data to a Pervasive eink display via Python?

I got a 5.8" eink display from Pervasive Displays and cannot get it to work, I feel that only a little bit is missing. After a lot of struggle I managed to run it via their sample C code, but the ...
  • 73
0 votes
0 answers
52 views

What's the proper ili9341 driver for raspberry 4b ubuntu 20.04 system?

Newly purchased 2.4 lcd,but my system is not origin raspberry os. As to ubuntu 20.04,what's the proper ili9341 driver for raspberry 4b?
  • 101
-1 votes
1 answer
178 views

Turn LED off and on using I2C, SPI or UART GPIO Pin

I have project requiring several simple LEDs and buttons, MORE that the number of ‘simple’ GPIO pins. Can I turn the LED TOTALLY OFF and on using a IC2, SPI, or UART pin? Can those pins be programed ...
0 votes
0 answers
50 views

Additional SPI bus raspberry pi 3b+

I'm trying to read 2 devices from SPI bus nRF24 module and MAX31865. I read the MAX module constantly every second and need to read the nRF24 module from time to time in other binary, but when I just ...
0 votes
1 answer
167 views

SPI Communication between Raspberry Pi and Arduino questions

Basically the title, but I have been looking into SPI as I am working on a project that basically requires a Serial connection between a Raspberry Pi (as a master) and an Arduino (slave); I intended ...
  • 89
0 votes
1 answer
103 views

Fast SPI reading

I am trying to read MCP3201 with 44100 samples per second. The chip has top clock frequency of 1Mhz, which should be sufficient for 62500 two-byte samples per second. sampnumb = 44100 spi = spidev....
  • 429
0 votes
1 answer
324 views

How to enable SPI and access RFID RC522 Chip on Alpine Linux

I've set up Alpine on a Raspberry Pi 3B in diskless mode and it runs exceptionally smooth. I've managed to address GPIO pins (e.g. to read from temperature sensors) without much effort. Now I'm trying ...
1 vote
1 answer
124 views

How to set the SPI comms delay from CS to SCLK?

I am using a Raspberry Pi to communicate with a SPI-enabled device over the 40-pin cable. To the best of my understanding, the Python scripts rely on the SpiDev device. The script uses the xfer3() API ...
  • 113
1 vote
0 answers
119 views

GPIO9 Input Always Active

Porting an application from a RPi 3 to an RPi 4 that requires several button inputs. All are working properly, except the button in GPIO9 (Pin 21) is always high/true. Guessing this has to do with SPI ...
1 vote
1 answer
233 views

Error setting up GPIO direction of SPI_CE0_N pin

I'm using a Rapsberry Pi Zero 2 to control an FPGA, the Lattice iCE40, via SPI (which I have accordingly enabled via raspi-config). In order to upload the image on the FPGA, I need to follow the ...
  • 45
0 votes
1 answer
133 views

RP2040- Memory architecture

I am designing an RP2040 board that has external access to the QSPI chip. I need to be able to program the microcontroller externally without USB, and I thought this would be the easiest method. I'm ...
0 votes
1 answer
306 views

Pi Pico- How to use XIP

I am trying to boot my Pico from an external NOR flash module, but I'm not sure how to do it. The QSPI pins on the RP2040 look to be used already, is there any way I can access these externally or set ...
0 votes
1 answer
238 views

How to control 2 devices using the SPI bus and one Chip Select

Just wanted to check my understanding of the SPI0 bus on the pi zero w. I have a DAC (MCP4921) driving the gate of a MOSFET as a current source for a load in the drain. I also have a ADC (MCP3008) ...
0 votes
0 answers
90 views

Using RFID-RC522 with spi on RBpi 3B+

Hello_friends, I am trying to get a RFID reader working on a Raspberry 3b+ That same setup and codebase used to work well on the older 3b+ model from 2015 (the current one is 2017 edition), but now ...
  • 216
1 vote
1 answer
295 views

Strange SPI error message during boot, but all SPI devices seem working

Folks, I have attached 2 SC16IS752 breakout boards to SPI0. This way I can have 4 UARTs (SC0..3). All four ports are working, but I have these strange lines during boot: [ 13.239108] spi-bcm2835 ...
  • 259
1 vote
3 answers
149 views

why doesn't spi1 in pi4j work?

I'm trying to connect raspberry with another pcb via spi. It is connected via spi1 port and I can't change it. So I have a python script that works well, so I can send and receive data. The python ...
5 votes
1 answer
209 views

raspberry pi 4 using SPI 4 & 5 at the same time causes kernel oops and crashes the whole system

intro i want to use multiple SPI busses at the same time. but when i use to use SPI 4 and SPI 5 at the same time it crashes the whole system it doesn't crash instantly sometimes it takes 10 seconds ...
  • 51

1
2 3 4 5
10