Skip to main content
Associate III
Nov 21, 2025 11:51 AM UTC
Question

SPI Receive - pulse in MOSI line

sreyas40_0-1763725623576.png

The above image represents logic analyzer output when HAL_SPI_Receive_DMA is executed. My doubt is regarding the single high pulse at MOSI line. During HAL_SPI_Transmit_DMA , no issues. Is this normal behaviour? STM as Full duplex master, i have disconnected the slave to check if it was responsible for the high pulse.

3 replies

Andrew Neil
Super User
Nov 21, 2025 12:10 PM UTC

Please show your code.

How to insert source code

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User
Nov 21, 2025 1:28 PM UTC

For a Full duplex master you should always use TransmitReceive , as the SPI shifts out and in same time.

or with dma:   HAL_SPI_TransmitReceive_DMA( ..)

(only receive on full duplex is like : receive and dont care about transmit... :)

It might send anything, maybe the remains from last receive, as you write nothing to send.)

If you feel a post has answered your question, please click on " Best Answer ".
Ozone
Principal
Nov 21, 2025 1:47 PM UTC

MOSI is "Master Out Slave In".
What you see on this line is what was written by your code to the SPI Tx register beforehand.