Hi
I have test the the data rate of the FRAM+CC3000 that is MSP430FR5739 and CC3000, Microcontroller's speed default is 24MHZ ,the code as follows,
//
// Init the device with 24 MHz DCOCLCK.
// SMCLCK which will source also SPI will be sourced also by DCO
//
CSCTL0_H = 0xA5;
CSCTL1 |= DCORSEL + DCOFSEL0 + DCOFSEL1; // Set max. DCO setting
CSCTL2 = SELA_1 + SELS_3 + SELM_3; // set ACLK - VLO, the rest = MCLK = DCO
CSCTL3 = DIVA_0 + DIVS_0 + DIVM_0; // set all dividers to 0
and the SPI clock source is the SMCLK,this code as follows,
int init_spi(void)
{
// Select the SPI lines: MISO/MOSI on P1.6,7 CLK on P2.2 第二功能
//MISO MOSI
P1SEL1 |= (BIT6 + BIT7);
P1SEL0 &= (~(BIT6 + BIT7));
//SPI_CLK
P2SEL1 |= (BIT2);
P2SEL0 &= ~BIT2;
UCB0CTLW0 |= UCSWRST; // **Put state machine in reset**
UCB0CTLW0 |= (UCMST+UCSYNC+UCMSB); // 3-pin, 8-bit SPI master,MSB first
// Clock polarity high, MSB
UCB0CTLW0 |= UCSSEL_2; // SMCLK
UCB0BR0 = 0x02; // /2 change to /1 不分频 直接SMCLK
UCB0BR1 = 0; //
UCB0CTLW0 &= ~UCSWRST; // **Initialize USCI state machine**
return(ESUCCESS);
}
that is the SPI clock is 24MHZ
But when I send some data continuously ,then calculate them . I find that the speed only is about 2MHZ Why?
I use udp protocol send one data "unsigned char liyang[2] = "1"; " throught 30 seconds,I receive 38464bytes, We know that there are 42 bytes of the header of the udp protocol ,then plus one data previously, that is 43 bytes, a byte is 8 bit . OK,therefore
38464*43*8/30 = 441053 bit/s = 0.441053 Mbit/s,
But the Tiwi_SL_Datasheet display that "UDP Tx Open(no key) 6.86Mbps"
Note I use the Basic WIFI Application . udp communication
"