SPI.transfer() mulitple bytes, array?

Hello,

I need to transfer via SPI many bytes at once and without delay between every byte.

If I do:

SPI.transfer(byte1);
SPI.transfer(byte2);
SPI.transfer(byte3);
etc…

I have a delay of 500ns between every bytes…

I have now tried follow, but the data transfered are only the first time according array initialization…why that?

result of below code: 5,6,3 0,0,0 0,0,0 etc…

uint8_t rgb={5,6,3};

for(x=0; x<=76800; x++)
{
SPI.transfer(rgb, sizeof(rgb));
}

On which Ardiuno? The Uno cannot avoid gaps between bytes in my experience, as it doesn't seem to implement a FIFO - you have to wait for the previous byte to send.

You can reduce the gap somewhat by hard coding a loop with asm nops, but that's rather fragile (depends on the compiler optimizations).

result of below code

Some proof of that would certainly be useful.

So would posting ALL of your code. It is silly to use a global variable for a for loop index, especially when you don't show us the type.

I don't understand why you want to send the same 3 values over and over.

I don't understand why you want to send the same 3 values over and over.

is just to show my problem (write pixel-data for example "red" to a tft-controller buffer).

I'm using teensy 3.2