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

Different SPI modes on one bus

I have two SPI slaves connected to one SPI bus on the raspberry. One uses SPI mode 1 the other uses SPI mode 3. In my C++ program I have two SPI_bus objects configured for each mode. If I now try to ...
-2
votes
0answers
11 views

Is it possible to plot an analog signal (Freq = 1.5kHz), in real time using R-Pi along with MCP3008?

Consider a sinusoidal signal of amplitude 1V-2V and frequency of 1.5kHz. I am trying display this waveform on raspberry pi's 5" display. I have decided upon the ADC and communication protocol, i....
0
votes
0answers
27 views

Pi4 MCP3008 - SPI port setup failed, no SPI available

I am trying to use a joystick with a MCP3008 in the middle (Connected to GPIO8 - SPI CS0) but I get following error: Exception in thread "main" java.lang.reflect.InvocationTargetException ...
0
votes
1answer
23 views

WiringPi SPI without Chip Select/Enable?

I am wondering how the WiringPi SPI works without using the chip select/enable spi.cs_change = true; in the following code. int wiringPiSPIDataRW (int channel, unsigned char *data, int len) { struct ...
0
votes
1answer
21 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 ...
3
votes
0answers
51 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 ...
1
vote
0answers
25 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?
0
votes
0answers
38 views

Raspberry pi 3 spi does not work

[![enter image description here][1]][1]I use MCP3008 adc to see a potentiometer values on raspberry pi 3. My connection same with the link down here. https://roboticadiy.com/potentiometer-analog-input-...
0
votes
1answer
30 views

Rx buffer overwrites Tx buffer in spidev xfer2

Coming here from electronics SE as it was suggested that I post here on this issue. The electronics SE post is here. I'm setting up a comms link between an STM32F407 MCU and the Pi3B+. The Pi is ...
0
votes
1answer
36 views

My pi 4 cant go beyond 5Mhz SPI without corrupting's the transaction

I am having troubles with my pi 4b, in which i could not push the spi beyond 5Mhz without the data being corrupted. I have an spi slave that is capable of abaout 15MHz on the serial clock (32ns high + ...
-1
votes
1answer
30 views

How to configure SPI to LSB_FIRST mode?

I am trying to configure my Raspberry Zero W SPI interface to communicate lsb-first. I've modified spidev_test.c, but when I run it, I get an error: uint8_t lsb_first = 1; ret = ioctl(fd, ...
0
votes
1answer
65 views

How to read SPI memory with raspberry pi? (using wiringpi)

This is the pinout I have for the flash memory W25Q128FV which I'm trying to interact with I'm trying to control it with a raspberry pi 3 B+. Here's how I wired everything: CS - GND D0 - SPIMISO WP - ...
0
votes
0answers
29 views

What is going on with the Raspberry PI SPI? Weird jitter in signal

I'm using python and spidev to do spi transactions over the Raspberry Pi's spi channel. I'm having a couple of different things happen that are not what I am expecting. This is a capture of a spi ...
1
vote
1answer
105 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/...
0
votes
1answer
35 views

Setting interface name in /boo/config.txt

I am trying to setup an interface name can1 (instead of can0) on spi0. Looking at the instructions at https://blog.stabel.family/raspberry-pi-4-device-tree/ I was able to add a new overlay file. Even ...
0
votes
0answers
26 views

Extra SPI0 chip select on GPIO16

Hey I have problem with using spidev on spi0.3 my CS pins: cs-gpios = <&gpio 8 1>, <&gpio 7 1> , <&gpio 25 1>, <&gpio 16 1>, <&gpio 23 1>; extra CS on ...
1
vote
1answer
27 views

my spidev code does not store the receive data

So i am using a trimmed down version of this code to do a spi transaction usin spidev. Here is my code /* * spi-driver-speed.c * 2016-11-23 * Public Domain */ #include <stdio.h> #include <...
-1
votes
1answer
65 views

1.44 inch ST7735S lcd screen on gpio only white output [closed]

I recently bought an lcd screen on ali express that is attached to the gpio, but the system does not detect it, screen is constantly white and output is only on hdmi. I tried turning spi on raspi-...
0
votes
0answers
45 views

Raspberry Pi 4 auxillary SPI mode 1 data on wrong clock edges

I know it is a known issue that modes 1 & 3 do not work on the rpi aux spi. I gave it a try anyway on an rp400 and found some interesting results. Am currently using pigpio via python. This image (...
0
votes
1answer
32 views

python spidev setting bits_per_word throws an error

so i need to set the bits per word to other than the deafult (which i think is 8) import spidev spi = spidev.SpiDev() spi.open(0,1) spi.bits_per_word = 8 This compiles no problem but when i set it ...
0
votes
0answers
36 views

How to use 4 CS for SPI in C++

I'm currently trying to implement 4 CS in RaspPi. I'm still a newby in this field and used the library wiringPi. For CS0 and CS1 this works totally fine. However now I have 2 more CS on the GPIO Pin ...
0
votes
0answers
29 views

DTS for custom board with sc16is752

im trying to write DTS for my custom board, but still is smth wrong: My hardware description on SPI0: CS-gpios: 8 7 25 16 23 CS0 - SC16IS752 (IRQ 24) CS1 - MCP2515 CS2 - RFID RC522 module CS3 - RFID ...
0
votes
2answers
23 views

spidev only returns zeroes, even when MISO pin is set HIGH

I'm trying to read out an MCP3008 chip using hardware SPI on a pi4, it wasn't working and in an effort to debug the problem I ended up connecting the spi input pin (MISO) directly to a 3.3V pin. I can ...
2
votes
2answers
126 views

Re-configure SPI-CS as gpio while using SPI

I am on a raspberry pi 4. Using both SPI's with no need for either chip select. I'm running out of I/O and could really use those. Does anyone know if there is a way to repurpose the SPI chip selects ...
0
votes
0answers
76 views

I2C not detecting BME280 (the I2C only version) when display is connected to SPI

I have bought an ePaper display and an BME280 sensor. The ePaper display itself is successfully powered via SPI (https://www.waveshare.com/wiki/4.2inch_e-Paper_Module_(B)) and the BME280 should be ...
-1
votes
1answer
18 views

SPI0 CE_0 dosn't works

I use custom board with raspberry pi on SPI0 CE0 I have connected SC16IS752 (spi-uart IC) on SPI0 CE1 MCP2515 (can IC) I have problem with init this first device GPIO 7: level=1 fsel=4 alt=0 func=...
0
votes
0answers
27 views

SPI6 on RPi4B does not load

i've got problem with load SPI6 on RPI4B. What I did is: enabling SPI interface in Raspberry Pi Configuration checking in /etc/modules whether there is spi-dev (I added manually) (based on README ...
0
votes
2answers
166 views

Troubleshooting: RPi 4B & ILI9341 display

I bought a generic 2.8" TFT LCD 240x320 Serial SPI Display that uses the ILI9341 driver. I cannot seem to make it work with my RPi 4B. Does anyone have an idea as to why? Or ideas to further ...
0
votes
0answers
48 views

Test TFT SPI ILI9341 display via startx & con2fbmap showing console

I have a 2.4" TFT LCD 240x320 Serial SPI (ILI9341 driver) that I am unsuccessfully trying to use with Raspberry Pi 4B and the Adafruit_blinka library having executed the necessary pre-requisites (...
0
votes
0answers
37 views

How to set Clock Divider field of the CLK register?

I have noticed that my SPI communication is slower that it should be.I know that there are some limitations of SPI in raspberry PI but I am reaching only around 20k samples/s from sensor this value is ...
0
votes
0answers
42 views

Specifics on connecting RFM69 to pi3

I am trying to follow these instructions to test a RFM69 module added to an Raspberry Pi 3. This is likely rather naive, but I would like to know details on how to connect the pi to the module. The ...
0
votes
2answers
54 views

Connect 2 Pi's for file transfer, but with minimum networking [closed]

I want to connect two Pi's together for the purpose of transferring files, but I want to do it in the most secure method possible. One Pi ("Device 1") will be connected to the internet, and ...
0
votes
0answers
49 views

Is it possible to run a SPI display off of a Pi zero?

I bought a 1.6" 130*130 display (Link, SKU: MSP1601, Driver Chip: SSD1283A) to use with me pi zero in a project (Mini handheld gaming console). I have been looking for hours how to use this ...
0
votes
1answer
45 views

Changing the SPI bus

I have a Waveshare Can/RS485 Hat on my Pi. The Hat uses SPI0 with CS0 going to the CAN side. CS1 goes to the RS485 side. I have a new device that uses SPI also. As I explore the sample code, ...
0
votes
0answers
39 views

add SPI wthernet connection , not working - how can I check why?

I have added a spi ethernet tp my pi zero connected it and added the needed files anyspi.dtbo , w5500.dtbo added in config.txt dtparam=spi=on dtoverlay=anyspi,spi0-0,dev="w5500",speed=...
0
votes
1answer
21 views

Scaling down the SPI0 clock value on RPi 3B+/4B

I have a custom STM32 MCU board that interfaces with an RPi 3B+ via the SPI protocol. The MCU (STM32F407) has its SPI peripheral clock set at 84MHz and is configured as a slave device. For reliable ...
1
vote
1answer
170 views

Raspberry pi4 + ADC

I have been working with Raspberry pi 4 to acquire analog signals. I get AD/DA High Precision Board by Waveshare (ADS1256 A/D) to convert analog input and I downloaded python source code from ...
0
votes
0answers
244 views

Using MCP2518 CAN controller and SocketCAN on CM4 with PiCore

Background I am planning on using a Raspberry Pi CM4 with PiCore (a version of TinyCore for the RPI) for an embedded project involving a MCP2518 CAN controller. There is an MCP251x driver already ...
0
votes
1answer
72 views

SPI is only working with pi@raspberrypi:$ pigs spio 0 50000 0

I enabled SPI on my Raspberry pi 4 like in many Tutorials explained. In sudo raspi-config I enabled SPI. In /boot/config.txt I added dtparam=spi=on $ ls -l /dev/spidev*** shows crw-rw---- 1 root spi ...
0
votes
1answer
29 views

How to get more samples from ADC converter using SPI

I am trying to use ADC converter in my raspberry which has speed around 100k smp/s. I am setting clock as producent of converter recomend for 20 Mhz. But I only recive around ~ 43k samples/s and I can'...
1
vote
1answer
346 views

RPi DMA transfer over SPI

I have an application where I want to write to an external DAC and read from an external ADC using the pi's SPI interface continuously. The data to the DAC could come from some arbitrary function, and ...
0
votes
0answers
48 views

Max number of RC522 RFID modules connected to RPi via SPI

Good day all, I am wanting to know the maximum number of RC522 RFID modules that can be successfully connected to one RPi 4 B with multiplexer/s using SPI interface. The RC522 RFID modules are only ...
0
votes
3answers
62 views

Why does connection between raspi and potentiometer via SPI fail after one time running code?

I'm pretty new in this forum and generally at wotking with Raspberry Pi. I'm trying to read the value of a potentiometer with my raspberry pi 4 B and am using MCP3008 through spi. My purpous is to ...
0
votes
0answers
36 views

Issues with an executable (C#) and sudo

first of all I am using Raspberry Pi 4 with Raspbian. I've made an executable in C # (Mono project) that uses the "unosquare/raspberryio" library for GPIO, SPI and I2C communication. If I ...
0
votes
0answers
149 views

Raspberry Pi Zero W problems with SPI

I followed this guide: https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/ Only thing I changed is the core bug repair procedure, which one I made this more up to ...
0
votes
0answers
14 views

Problems re-building modules getting SPI working on a bcm2832(RPi ZERO W) [duplicate]

When I try to get SPI working on a bcm2832(RPi ZERO W) by re-building modules and solving the kernel bug, following this post, I am getting the following errors I could not get solved: pi@raspberrypi:~...
1
vote
1answer
118 views

Waveshare AD/DA espansione board setting sampling frequency

In order to acquire 3 analog signals with Raspberry pi 4 I want to use ADS1256 Waveshare's AD expansion board ( 8 channels single-ended, 24 bit). I was wandering if there's a way to set a different ...
1
vote
0answers
40 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 ...
0
votes
0answers
68 views

RPI actual SPI communication speed

I tested my RPI 3B's actual SPI communication speed using the time stamp and spidev of Python. Then, I got the 353.2k bitrate per second when I set the SPI clock as 30MHz. Then, the real SPI ...
1
vote
1answer
283 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
2 3 4 5
9