cancel
Showing results for 
Search instead for 
Did you mean: 

stlink bridge api spi

benjamina
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2
TDK
Super User

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".

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