Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/CC3200-LAUNCHXL: SPI Master(TMS570LS0432) - Slave(CC3200-LAUNCHXL) Communication

$
0
0

Part Number:CC3200-LAUNCHXL

Tool/software: Code Composer Studio

Hello, 

I am using TMS570LS0432 board to get the data from sensors using UART, and want to upload data on AWS IOT using CC3200

To get the data from TMS570LS0432  to CC3200  I'm using SPI communication.

I'm able to communicate between two TMS570LS0432  boards using SPI.

I am using  spi_demo example code for CC3200 but unable to succeed

Pin Connections:

Mater(SPI1-TMS570LS0432)                              Slave(CC3200)

J1.7 --> SPI1CLK                     P1.7 --> SPICLK
J10.16 --> SPI1nCS[0]             P2.3 --> SPICS
J2.6 --> SPI1SIMO                   P2.6 --> SPISIMO
J2.7 --> SPI1SOMI                   P2.7 --> SPISOMI

J10.4 --> GND                          P2.1 --> GND

Master transmitting 16 bit data, Baudrate 1000KHz I'm attaching Master signal transmitting signal.

In the spi_demo CC3200 example Code I changed the baud rate to 1000K Hz from 100K and in  MAP_SPIConfigSetExpClk() function SPI_WL_8 with SPI_WL_16

void SlaveMain()
{
    // Initialize the message
    memcpy(g_ucTxBuff,SLAVE_MSG,sizeof(SLAVE_MSG));

    // Set Tx buffer index
    ucTxBuffNdx = 0;
    ucRxBuffNdx = 0;

    // Reset SPI
    MAP_SPIReset(GSPI_BASE);

    // Configure SPI interface
    MAP_SPIConfigSetExpClk(GSPI_BASE,MAP_PRCMPeripheralClockGet(PRCM_GSPI),
                     SPI_IF_BIT_RATE,SPI_MODE_SLAVE,SPI_SUB_MODE_0,
                     (SPI_HW_CTRL_CS |
                     SPI_4PIN_MODE |
                     SPI_TURBO_OFF |
                     SPI_CS_ACTIVEHIGH |
                     SPI_WL_16));

    // Register Interrupt Handler
    MAP_SPIIntRegister(GSPI_BASE,SlaveIntHandler);

    // Enable Interrupts
    MAP_SPIIntEnable(GSPI_BASE,SPI_INT_RX_FULL|SPI_INT_TX_EMPTY);

    // Enable SPI for communication
    MAP_SPIEnable(GSPI_BASE);

    // Print mode on uart
    Message("Enabled SPI Interface in Slave Mode\n\rReceived : ");
}

Could any one please help on this.

Thanks & regards,

Jeet

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>