This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.


Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Hello everyone.
I am working on the interconnection of a RFID module through the four-wire SPI interface (CLK,MOSI,MISO,SS). A CC1310 as master.
The datasheet of my slave device specifies that the bit order of each data byte is LSB-First for writing.
I have checked the cc1310 datasheet and it is mentioned that the SPI write is MSB-first, could someone please guide me how can I make the change according to my slave device specification?

  • Hi,

    This is the specification of the SPI peripheral itself, so the MSB first/LSB first data frame conversion cannot happen at the driver level. 

    Technical reference manual:

    You could try to implement the conversion in the application level and provide inverted data to the SPI driver. 


  • unsigned char *invertir_8bit_bytes(unsigned char *x)
    	int largoTrama = sizeof(x);
    	for(int i =0;i<largoTrama;i++){
        x[i] = ((x[i] & 0x55) << 1) | ((x[i] & 0xAA) >> 1);
        x[i]= ((x[i] & 0x33) << 2) | ((x[i] & 0xCC) >> 2);
        return x;

    Hi Sid.

    Thank you very much for the help, I am implementing the bit inversion from the application.

    Attached is a bit-reversal function for a byte string.