Skip to main content
Associate
January 25, 2026
Solved

stlink bridge api spi

  • January 25, 2026
  • 1 reply
  • 202 views

hello

I want to use your api to speed up the developpment of a driver based on spi communication, this function seemed appropriate in your stlink-v3-bridge-v1-2-0:

Brg_StatusT Brg::ReadSPI(uint8_t *pBuffer, uint16_t SizeInBytes, uint16_t *pSizeRead)

unfortunatly I found this comment:

* In #SPI_DIRECTION_2LINES_FULLDUPLEX dummy data are sent while receiving.

and i check with a scope that it is the case (data written are '0'),

this is a pity because read/write are frequently simultaneous in spi,

is there a possibility to send data instead of dummy in the mean time we are reading ?

regards

Benjamin

Best answer by benjamina

thanks for the quick response,

yes I have a FTDI board and software which works as expected, I wanted to use a STLINK instead because the software looked simpler, but it does not come with as many features,

regards

Benjamin

1 reply

TDK
Super User
January 25, 2026

ReadSPI is a read-only operation. WriteSPI is write-only. There is no two-way read/write operation unfortunately.

This is most likely because the interface mimics the other protocols which are either read or write but not both.

There are some FTDI USB-to-SPI adapters that might work better for you.

"If you feel a post has answered your question, please click ""Accept as Solution""."
benjaminaAuthorBest answer
Associate
January 25, 2026

thanks for the quick response,

yes I have a FTDI board and software which works as expected, I wanted to use a STLINK instead because the software looked simpler, but it does not come with as many features,

regards

Benjamin