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
1answer
76 views

Enable up to 5 SPI on Raspberry Pi 4

I'm trying to enable all the SPI Ports on my raspberry pi 4 (as mentioned in the datasheet). I already enable the SPI interfaces over the raspi-config tool but that only gives me spi0.0 and spi0.1 ...
1
vote
0answers
32 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....
0
votes
0answers
30 views

Can't read data from PN532 NFC reader over SPI

I'm using Pi4J library to read data from a NFC reader based on PN532, connected to my Pi via SPI. However, I don't seem to receive any data from if when I put a NFC card to my reader. I'm using SPI0 ...
0
votes
1answer
39 views

How to detect if an SPI device is connected

Hello I am i have connected an MCP23S17 spi GPIO expansion, upon testing it with the sample code from here, It does not seem to work. There could be many reasons why this is happening. I would like to ...
1
vote
0answers
154 views

Read/Write to SPI NAND using RPI

I have an SPI NAND flash that I want to read/write the data to it using Raspberry Pi but since flashrom doesn't support SPI NAND and I couldn't find any tools that can do SPI NAND reading raw from the ...
0
votes
0answers
16 views

Raspberry PI SPI clock change

Need to change a clock speed for RPI SPI Is it possible to add a clock config to this string: dtoverlay=jedec-spi-nor,flash-spi0-0?
0
votes
1answer
32 views

Can't set modes 1 and 3 in Auxillary SPI(1)

The auxiliary SPI will not accept modes 1, or 3. I’ve enabled spi1-1cs, and /dev/spidev1.0 is created. I can send and receive data but only SPI_MODE_2 and SPI_MODE_0. Setting to mode 3 produces a file ...
0
votes
1answer
54 views

Number of SPI devices limited just by CS pins? And pin assignment flexibility question

I've done some research, but not probably not enough, as I'm still confused some. First of all, I've got a Pi rev 1 Model B (with the 26 pin connector) and two devices: The Waveshare AD/DA board and ...
1
vote
0answers
93 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
479 views

How to connect ST7789 LCD to Raspberry Pi

I'm trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I'm connecting to pi like this https://imgur....
0
votes
0answers
45 views

SPI_Communication on Raspberry

for two weeks I have been testing the serial communication on my raspbrery pi2 and the microkontroler STM32G4. for the UART communication there is no problem however the SPI communication does not ...
0
votes
2answers
71 views

Using ENC28J60 on /dev/spidev1.0 or /dev/spidev1.2

I'm forced to use port /dev/spidev0.0 with a camera that I'm not able to configure at this time. Hence I need to change my current configuration where I'm using ENC28J60 on /dev/spidev0.0 and move it ...
0
votes
0answers
26 views

Varying possibly broken behavior of different GPIO pins on bitbanging LED display driver

I connect Raspberry Pi 3 b+ directly to 8x8 LED display, packaged with max7219cng display driver. To control GPIO pins, I'm using baremetal code, written by myself. For working with GPIO I've ...
0
votes
0answers
57 views

Control two SPI devices at the same time

I have a problem with Raspberry Pi 3b+. I need to connect two DACs (MCP4911) to SPI bus 1. The two DACs are expected to output the different DC voltage level. However, I found that when I connected ...
0
votes
0answers
34 views

Raspberry Pi 0 W SPI ioctl() call failure

I'm trying to setup my Rasperry Pi 0 to use two SPI ports simultaneously I need such configuration since I need: to connect this board trough ETHERNET to a local LAN; to collect video stream from a ...
1
vote
1answer
70 views

Choosing GPIO for Chip select SPI on Rpi 3B+

I would like to ask what GPIO pins are best suited for Chip select. The Raspberry Pi 3B+ and Raspberry Pi 4 has 2 chip select GPIO 7 and GPIO 8 but i have 6 slave devices (MCP3008 A/D converter). As ...
3
votes
1answer
608 views

Write to spi EEPROM in Raspberry Pi 4

The Pi4 has 512Kb of EEPROM which hold the bootloader. Does anyone know if it is possible to write to spi memory to be used in programs in the user space without corrupting the bootloader? Is there ...
1
vote
1answer
32 views

Boot behavior, Pi 3 B+ won't boot with GPIOs connected, 3 B boots fine

I have a 40 pin ribbon which connects an RPi 3 B (SPI and GPIO) to another microprocessor. It seems to work fine on a 3B. I've recently found out that if I connect a 3 B+ instead the Pi will not boot, ...
3
votes
1answer
92 views

High level of noise of SPI pins on RPi Zero W

I have a zero W powered via USB from a laptop. I have setup up for the SPI drivers and run a very simple test program which is: import spidev import time spi = spidev.SpiDev() spi.open(0, 0) ...
0
votes
1answer
37 views

spidev sanity check not working

ArchARM on Raspberry Pi 3, spidev installed from AUR. I'm trying to control a Waveshare device via SPI, and can't get SPI to work from Python. The most basic sanity test I can think of is failing: ...
0
votes
0answers
29 views

I want to multithread raspberry pi spi0 and spi1

I'm controlling two ssd1351 oleds in Raspberry Pi. When I tested using one spi bus, I see the images on both screens differently. (One eye is closed first) So, I wanted to threading another spi bus ...
0
votes
1answer
81 views

How do I connect Raspberry PI SPI pins to LED Segment via SPI?

The led segment (SPI Slave) I have got has the pin names - VCC, GND, DN, CS, CLK. The raspberry pi model is 3 model B version 1.2. The segment model is XC-3714. Is my understanding correct here that ...
0
votes
0answers
62 views

Raspbi spi CS line won't drive low

Raspberry pi 2 Model B V1.1 Not sure what's happening here, everything should work. Tried different cables, different pins on the analyzer, different laptop... the CE0 line won't go low. Currently ...
2
votes
1answer
65 views

2.5 V and 3.3 V on Raspberry Pi 3 MOSI line

I'm trying to read a SPI sensor via the raspberry pi, but I seem to be getting strange voltage levels on the MOSI line and no response on the MISO line. The chip-select line and clock lines make ...
0
votes
1answer
89 views

How to solve Argument list size exceeds 4096 bytes when working with large number of DotStar LEDs

I'm working with an array of ~1400 dotstar LED's running off a Raspberry Pi 3 B+ with raspian 4.19. The program is in python 3.5 using the DotStar package and I'm running into an issue. Specifically, ...
0
votes
1answer
117 views

is there a way to change SPI clock in shell or bash file?

I would like to write a bash to light up an OLED screen with SSD1306 driver, I can use below code to send commands: echo -ne $cmd > /dev/spidev0.0 however the SPI clock seems too fast for SSD1306,...
0
votes
0answers
18 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
94 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
54 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 ...
10
votes
1answer
2k 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
131 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
78 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
114 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
667 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
100 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
51 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
262 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
367 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
192 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
216 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
63 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 ...
2
votes
3answers
359 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
55 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
272 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
505 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
64 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
221 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
38 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
690 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
528 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....