Arduino UNO SPI Communicating With Other Device

Good time of day. I recently started using UNO for some tests of my device with FT220X SPI-USB convector (may be somebody used it and will understand the problem faster).

For now I get messages from UNO to my device and successfully read them. But I can’t to understand how to write data to UNO at same time.

So, I realized how to write data from UNO to device. But how to write from device to UNO I don’t understand.
As I readed about SPI lib, SPI.transfer() must recieve accepted data. But when it does? Until SS gets HIGH? Or at some timing? If it’s about timing, so how long is it?

Here is my code from Arduino:

#include <SPI.h>

// Here is data that I send to my device. First bit 0x00 is device command to read from Master
byte buff[] = {0x00, 0x02, 0x04, 0x05, 0xFF}; 
// This is a byte for recieved data
uint8_t acData;

void setup() {
  // Start Serial for debugging
  Serial.begin(9600);

  // Settings here are OK, so there is no problem
  SPI.begin();
  SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE1));
  
  delay(1000);
}


void loop() {
  // Here is code for sending data package from above. I successfully get it on my device.
/*
  delay(100);
  digitalWrite(SS, LOW);
  for (int i = 0; i < sizeof(buff); i++){
      Serial.println(SPI.transfer(buff[i]));
      delayMicroseconds(20);
  }
  digitalWrite(SS, HIGH);
  delay(100);

  delay(100);
  digitalWrite(SS, LOW);
*/ 
  // Here I tried to get data from my device. 
  acData = SPI.transfer(0x01);
  Serial.print(acData);
  Serial.println();
  
  digitalWrite(SS, HIGH);
  delay(100);

}

Don’t forget, my device is not another Arduino, so there could be problem about UNOs SPI lib. But I saw the example with EEPROM communicating, so I don’t think that problem is about SPI lib.

And if you interested in my C++ device code I could send it, bit I’m not sure that I can do it here, on Arduinos’ forum…

Every time you send a byte via SPI you are also receiving a byte.

Usually, the bytes you receive while you are sending a data request are ignored and AFTER the request has been sent you receive the response by sending dummy bytes. The datasheet for your device will tell you how many dummy bytes to send and what value to use (usually zero). Each time you send a dummy byte you will simultaneously receive one byte of the reply. All this (sending the request bytes and sending dummy bytes to receive the reply bytes) is done while the Slave Select is held LOW.