I'm working on an application CC110L.
The goal is to send 5 bytes (16-bit crc). But the waiting time for packet transmission is completed, is approximately 30 ms.
Here is the bytes to send (with data rate 2.4kBaud):
buffer[0]=0x05;
buffer[1]=CHIP_ID_1;
buffer[2]=0xb8;
buffer[3]=0x20;
buffer[4]=0x27;
Here is the function to send the bytes (i´m using msp430g2553 with spi at 8 MHz):
void TX_PACK(void){
int a=5, z=0;
P3OUT &= ~BIT1; // /CS enable
while(P1IN&BIT1); //SO pin
while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
UCA0TXBUF = 0x7F; // Send address
while (!(IFG2&UCA0TXIFG)); // Wait for TXBUF ready
while(a>0){
UCA0TXBUF = buffer[z]; // Send data
while (UCA0STAT & UCBUSY); // Wait for TX complete
z++;
a--;
}
P3OUT |= BIT1; // /CS disable
TI_CC_SPIStrobe(0x35);
P3OUT |= BIT6; //led ON
ENT_LPM_TESTE(); //30ms
P3OUT &= ~BIT6; //led OFF
}
The Time to send this package correctly is too high.
Is there any possibility of reducing this time?