Performance Arduino Due communicating with ADC Converter

I'm trying to use Arduino Due to communicate with a MAX11040K ADC converter. Everything is working properly. I'm using Serial communication with Matlab, and SPI communication with the converter. But the rate of data acquisition is far below what I expected. I do a collection test for 1 second, and the maximum number of bytes I can collect is approximately 25,000. Is there any way to optimize my code or even communication? Can anyone tell me if this is the maximum bytes rate I can get?

Here is the code:

#include <DueTimer.h>         // interrupt Timer

#include <SPI.h>              // SPI communication

int CS = 24;                 // Chip Selected connected to digital pin 24
int comandoUsb=0;            // receive command via USB

const byte PinLed = 50;      // Led
bool state = false;

int byte1=0;                // bytes receiveds from SPI
int byte2=0;
int byte3=0;


void flash(){
  state = !state;

  digitalWrite(PinLed, state); // Led off...
  Timer3.stop();               // stop timer interrupt and stop transmition of data
}


void setup() {
   
    pinMode(CS, OUTPUT);    // sets the digital pin as output
    pinMode(PinLed, OUTPUT);    // sets the digital pin as output
    Timer3.attachInterrupt(flash);  // attach interrupt
    
    Serial.begin(250000);         // initialize the serial communication:
    
    SPI.begin();                // start SPI communication
    SPI.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE2)); // sets parameters SPI communication
}

void loop() {
  
  digitalWrite(CS, HIGH);           // CS HIGH
  if (Serial.available()) {         // if something in the buffer, read
       comandoUsb = Serial.read();
  }

  if(comandoUsb == 'a'){          // if receive 'a', set up converter register config 
    digitalWrite(CS, LOW);
    SPI.transfer(96);
    SPI.transfer(48);
    digitalWrite(CS, HIGH);
    comandoUsb= 0;
  }

  if(comandoUsb == 'b'){        // if receive 'b', read converter register config and send by Serial
    
    digitalWrite(CS, LOW);
    SPI.transfer(224);
    byte1 = SPI.transfer(0);
    digitalWrite(CS, HIGH);
    
    Serial.write(byte1) ;
    comandoUsb= 0;
  }
  
  if(comandoUsb=='c'){       // if receive 'c', read  data register while interrupt is not call
     state = !state;
     digitalWrite(PinLed, state);
     comandoUsb= 0;
     Timer3.start(1000000); // Calls every 1000ms
     while(state){
         digitalWrite(CS, LOW);
         SPI.transfer(240);
         byte1 = SPI.transfer(0);
         byte2 = SPI.transfer(0);
         byte3 = SPI.transfer(0);
         digitalWrite(CS, HIGH);
    
         Serial.write(byte1);
         Serial.write(byte2);
         Serial.write(byte3);
    }
  }
}

I expected it to get more bytes because I did some testing with an 8bit PIC18F4550 and 48Mhz clock and I got 53,000 bytes in a second. And this arduino works with 84MHz and 32bit, so you should get more

I appreciate any help.

Serial.begin(250000);  25000 samples a second, you say?

Yes, initially the Baud Rate was at 9600, then I tried to increase to the maximum and still it continued at 25000 bytes per second, which means about 8 thousand samples, because each sample is equivalent to 3 bytes.

How many samples do you need?

I expected to get at least 20000 samples per second, which means 60000 bytes per second.

I didn't ask you what rate you want, I asked how many samples you want.

Sorry I did not understand. So I'm working on a project in which I need to build hardware to collect samples of brain signals for master's studies. Data collection is done through protocols that can last from 15 to 40 minutes. So I'm using serial communication to store the data in matlab. So, 20000 sps for 15 minutes would give at least 1800000 samples.