Questions tagged [spi]

SPI is a low-level 3 or 4 wire serial bus interface with clock (SCLK), data in (MISO) and data out (MOSI). The fourth wire is a Slave Select to uniquely select a device on the bus. This signal is usually active-low. Slave Select, Chip Select, CS#, SS# stand for the same function, typically. Be sure to check the datasheet, though. The SPI bus is a *de facto* standard lacking the formal specification.

273 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
90 views

SPI SDHC card will not come ready, Regular (older) SD card works fine

I am trying to make an SPI interface on a 186 Microprocessor using bit banging and a GPIO to control the CS, SCLK, MOSI and reading in the MISO lines. Mode 0. I cannot get SDHC (version2) cards to ...
3
votes
0answers
130 views

Need help troubleshooting Teensy 3.6 SPI to DAC8568

running out of things to check with this problem I'm having. I designed a board around the Teensy 3.6 microprocessor, and I wanted to connect a DAC8568 chip to it for some analog outputs. It works ...
3
votes
0answers
274 views

Unexplained Data Enable Pin

Looking at This datasheet for the LSM9DS1TR 9-axis IMU, there is a pin labeled DEN_A/G with the description "Accelerometer and gyroscope data enable" on page 11. I can find no further explanation ...
3
votes
0answers
411 views

SPI comunication - Only receive 0xFF (Linux)

I've been stuck in setting up the SPI communication in Linux and can't figure out any solution. I working with a beagle bone black, which runs Linux. I have a piece of code that send data through the ...
3
votes
2answers
955 views

Embedded Ethernet Solution w/ PoE+; SPI or MII?

I am currently undertaking my first hardware design attempt of an embedded Ethernet project w/ PoE+. I have experience working with embedded systems with Ethernet (mostly ARM M3/M4 processors with ...
3
votes
0answers
2k views

STM32F7 - Quad SPI dummy cycle behavior

I am working with the STM32F767ZIT6. At the moment I am exploring the QuadSPI peripheral. After setting up the peripheral with the following configuration I noticed some undesired behavior of the data ...
3
votes
0answers
302 views

Can not interface with Winbond W25Q16DVSIG over SPI

I'm trying to attach Winbond W25Q16DVSIG to Atmega 1284P-PU. I've attached SPI bus according to the pinout, CS pin has 10K pullup resistor. Whenever I'm trying to perform any operation, chip is not ...
3
votes
0answers
830 views

Moving mass storage design from SD/MMC to NAND flash

We have a prototype design in the works, that is currently running on a reference board done my Olimex (Olinuxino maxi), but eventually we would like to move the storage from microsd to nand flash (or ...
2
votes
2answers
191 views

Is the Analog Devices "Introduction to SPI Interface" white paper wrong?

I am looking at the Analog Devices Introduction to SPI Interface and it has this diagram for SPI mode 2... It shows that the first data bits do not appear on MOSI and MISO until after (1) CS goes low,...
2
votes
0answers
58 views

RF PCB Layout for 915Mhz + BLE: Which is better?

I am designing a small board with a 915Mhz transceiver IC breakout (based on the CC1101 + CC1190 chipsets), controlled by an STM32. I have used the popular nrf24l01 chipset in the past, but was ...
2
votes
0answers
70 views

Latch SPI MOSI and MISO with opposite phase on STM32

Is it possible to configure the STM32 SPI peripheral such that MISO data is latched on the same clock edge where MOSI data is loaded? Usually (for CPOL=1 and CPHA=1) MOSI updates on the falling edge ...
2
votes
1answer
73 views

Configuring the Ports of an AVR Microcontroller for SPI Use

I am trying to configure the an ATtiny84A for use with SPI, but I have some confusion with what Is being said in the datasheet for configuring the ports. The ATtiny84A has, what the datasheet calls, &...
2
votes
1answer
237 views

Daisy-chaining two ADC with SPI protocol

I'm trying to configure and read two ADCs (MAX11156) with a RaspberryPi. The ADCs are daisy-chained together. For the communication, I'm using python code with the spidev library. The driver is ...
2
votes
0answers
104 views

Feedback on Crystal layout & signal routing for SPI /CAN

Crystal:NX5032GA 16Mhz i havnt had the experience in laying out crystals, im personally using https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-...
2
votes
0answers
84 views

How to improve a high frequency square wave for laser imaging

I am trying to create a current source for laser direct imaging and I have a problem in the circuit I cannot solve. The laser is a 120 mW 405nm diode and I use it in a laser module from a laser ...
2
votes
1answer
298 views

PIC32 DMA (connected to SPI) interrupt not working

I am working on my first PIC32 project on a custom board. I am utilizing a PIC32MZ2048EFH064 microcontroller which I am programming in MPLAB X IDE v5.40 (compiler: xc32 v2.41). My goal is to receive ...
2
votes
1answer
410 views

SPI data arrives at every 2nd send and in the wrong sequence

I am simulating a project where two STM32s communicate with each other through SPI (HAL drivers), where the SPI Master is an STM32F4 and the SPI Slave is an STM32F3. Basically, the master will send 5 ...
2
votes
0answers
102 views

Errors in SPI communication with SD card due to heat

Given is a PCB with a STM32L432KCU6 and a microSD card connected to it via SPI at 40 MHz in SPI Mode 0. The communication is protected by CRC which is calculated by the microSD card on the fly. When ...
2
votes
0answers
86 views

Does ATMEL SAMA5 SPI rely on NSS for byte alignment when configured as slave?

I am using the Atmel SAMA5D2 SPI interface configured as slave to communicate with an external device that insists on being master. I'm uncertain of the role of the NSS signal in this case. In a ...
2
votes
0answers
270 views

microSD card,looks initialized,but single read block returns 0xFFs

The 2GB micro SD card i'm working on looks initialized,all commands are giving the correct answer(i.e. CMD 8 returns the echo of the argument),command ACMD41 returns 0.At that point i try to read 512 ...
2
votes
0answers
626 views

ESD protection device impact on SPI

I have these ESD protection devices on my SPI lines. Now, my SPI clock is at approx 4MHz. I go as high as 20MHz. The datasheet states the following - It shows 0.1pF at 1MHz. Will this capacitance ...
2
votes
0answers
118 views

PIC32MX350F256 Errata , IO open Drain Issue

In one of our Product we used Microchip micro controller “ PIC32MX350F256L”. Attached image is small part of circuit showing uC interfacing with a SPI device. We are using bit banging communication ...
2
votes
0answers
528 views

Few SPIs at the same time as a bus?

According to http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN775/PF216846, All STM32F1xx-series MCUs (and up) "offer standard communication interfaces (up to two I2Cs, three SPIs, one HDMI ...
2
votes
0answers
280 views

Are there any metastability issues with microcontroller SPI slave ports that can operate during sleep?

If one is using SPI to interface two microcontrollers that may spend much of their time sleeping, and if the SPI slave port is supposed to wake up its controller when data is received, that would ...
2
votes
0answers
1k views

Writing an emulator for a SPI like slave device (LED Driver PT6959) using a PIC

I am working with a legacy device that uses a "SPI like" protocol. This device acts like a: SPI "master", but expects to talk with only one "slave" device. It does not expect any output/data exchange ...
1
vote
0answers
38 views

Pi PICO- Boot from XIP QSPI Flash

I am trying to boot a Pico from an external NOR flash module (Diligent Pmod SF3), but I can't find any information on how to configure the bootloader to do it. I looked at the documentation, but I'm ...
1
vote
1answer
138 views

STM32F722 SPI Data from ICM-20948

I am trying to write a driver for the ICM-20948 9 axis sensor by Invensense on my F722 nucleo board. The first thing I am trying to do is see if I can read the device ID (0xEA for the 20948). However, ...
1
vote
0answers
72 views

What are my troubleshooting options for Hyperbus RAM?

I have a custom PCB with a STM32H7A3ZI MCU, and a S27KL0642S27KS0642 Hyperbus RAM. My code, as well as the app note (AN5050) I'm following sets up the RAM for memory mapped access. I believe I've ...
1
vote
1answer
36 views

SPI clock settings for MSP432

SPI is set to use SMCLK but I am confused what the value of BRW (baud rate control) should be. Could someone guide me how to determine this value? The MSP432 (master) is sending a character over to ...
1
vote
0answers
49 views

AS5048A and STM32F446RE SPI communication

I am trying to get SPI communication working with my Nucleo-F446RE STM32 board and an AS5048A magnetic encoder. I am trying to read the angle register to get the angle value - however is seems to be ...
1
vote
1answer
91 views

SPI -- unstable clock confuses the SPI decoder

I am sending bytes 0xAA (10101010) and 0xBB (10111011) ...
1
vote
0answers
57 views

Command control for axi data mover block

I am a beginner in microcontroller programming and looking for a DMA block which will be a "bridge" between SPI and CPU ( memory). I have found AXI Data Mover block in IP catalogue of VIVADO....
1
vote
0answers
76 views

GPIO Configuration for Bit-Banging 3-Wire (SCK, MISO, CS) SPI

I have an issue with an SPI connection between a STM32F401RE Nucleo64 board and a MAX31855(Datasheet) thermocouple converter board. I understand the issue around wrong SCK polarity and have already ...
1
vote
2answers
77 views

Connecting multiple DACs to SPI bus but all SPI ports are in use

I am trying to setup multiple DACs (4 channel, TLV5620) at the same time with an STM32. My project requires 5 channels, but all SPI ports are currently in use. TLV5620 doesn't support a daisy chain ...
1
vote
0answers
92 views

STM32 - write to SPI on first rising edge, and read on first falling edge?

I'm trying to talk to another IC (a Microchip SPI flash chip) which wants to read in data on the rising edge but write it out on the falling edge using an STM32F4 series MCU. I saw this post but the ...
1
vote
0answers
50 views

Overvoltage shut down

A LCD display controller includes a 5 times DCDC converter. A circuit is needed to ensure that the in case of a fault in the display the 5 times voltage can not return to the CPU circuit in anyway. ...
1
vote
0answers
55 views

How to read / write data into a S25FL064L flash memory?

I try to read / write data (single byte) into an S25FL064L SPI flash memory with an nRF52 based radio SoC. The datasheet says that I have to enable a write to ...
1
vote
0answers
45 views

Is there a protocol like SPI that supports multiple MISO and MOSI channels?

I need to implement a driver that uses clock-data protocol within the data link layer. It's just like SPI but with multiple MOSI and MISO channels. Is there any pre-defined protocol like that? (DMA ...
1
vote
0answers
101 views

SPI data lines look identical, but results are different, how is that possible?

I have a golden sample system which consists of 2 devices communicating via SPI. I swap one of the devices and bit bang the SPI to make it similar to the golden sample. However the bit banged device ...
1
vote
1answer
51 views

Solution to interface SD card with microcontroller using only 2 pins (I2C/SPI)

So I am trying to add an SD card to my circuit and unfortunately, all I have left are 4 GPIOs, but I was asked to try and find a solution to only use 2. So using 4 is a worst case scenario. I thought ...
1
vote
0answers
29 views

Rx buffer overwrites Tx buffer in spidev xfer2

I'm setting up a comms link between an STM32F407 MCU and the Pi3B+. The code shown below works but when the data is printed out, it looks like the RX buffer overwrites the TX one. How do I stop that? ...
1
vote
0answers
57 views

Using Data Visualizer with Atmle-ice with SPI Physical interface

I am trying to output some debug strings from an AtMega328P to a terminal window on AtmelStudio using the DGI. I would like to use the 6-pin 100-mil connector of my Atmel-ICE Basic Kit, which I ...
1
vote
0answers
55 views

How to set SPI clock speed for MT7623N

first I must say, I am new to the HW programming, but I really enjoy it. My first project is writing a library for MT7623N (BananaPi R2) that handles GPIO pins. I got the GPIO part done and I can set ...
1
vote
0answers
84 views

PCB w/ ESP8266 NodeMCU - Multiple SPI modules not working

I've been working on a project for quite a while now, which involves the ESP8266 NodeMCU (v1.0), as well as two SPI Modules: ENC28J60, and RFID-RC522. With that being said, I encountered a problem ...
1
vote
1answer
40 views

In SPI rom, we configure both Normal and Fast Speed, how can we confirm if SPI clock is using fast speed or normal speed?

In SPI rom, we configure both Normal Speed i.e. 33Mhz and Fast Speed that is 66Mhz. How can we confirm if SPI clock frequency is fast speed or normal speed? Does SPI clock frequency changes based on ...
1
vote
0answers
83 views

Sustained SPI communication FT232H

Background I am using FT232H to communicate with my peripheral using the libMPSSE provided by FTDI. I am aware of the INFRA_SLEEP(2) issue with SPI_ToggleCS() function. My peripheral requires me to ...
1
vote
0answers
62 views

Is FT1248 same as Quad / Octo SPI?

When reading through the FTDI FT232H datasheet, I saw that the device can be configured as a "FT1248" slave. To me, the protocol they outline looks exactly like half-duplex 2/4/8-bit ...
1
vote
0answers
41 views

SPI Programming

I am trying to program the processor, eventually i connected NOR and Processor in the same line without any isolation. Now i need to program the Flash without interfacing the processor. Anyone please ...
1
vote
0answers
101 views

ATmega328P presumably dead after probable SPI short circuit

I am trying to use an ATmega328P to interface an SPI device (RFM95W radio module). This worked pretty well (I could measure the correct signals on SCK, MISO, MOSI and CS), but after some programming ...
1
vote
0answers
30 views

How to create chip select functionality for SK9822 addressable LEDs

I want to connect some SK9822 LEDs to an SPI bus that is already in use. As these LEDs do not have a chip select, I need to make one. Is it just as simple as an npn transistor (BC547 perhaps)? Feed ...

1
2 3 4 5 6