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.

LCDK questions for SPI

Other Parts Discussed in Thread: OMAPL138, CC1200

I have received customer inquiry with following questions. 

  1. Is spi_c674x_c6748_lcdk6748 project (in C:\ti\pdk_C6748_2_0_0_0\C6748_StarterWare_1_20_03_03\examples\lcdkC6748\spi) a good starting point ?
      1. here is another spi based sample project in the folder  pdk_OMAPL138_1_01_00_02\packages\ti\csl\exampleProjects\spi_exampleProject.  This seems to use a very different SPI api as compared to the one present in the lcdk folder. Please advise whether this is a better starting point as compared to the one present in StarterWare_1_20_03_03\examples\lcdkC6748\spi.
  2. Where can we get documentation of the SPI APIs (Eg SPIModeConfigure, SPIClkConfigure, SPIPinControl) and Macros (Eg SPI_DATA_FORMAT0) that are used in the sample code ?
  3. Is there some sample code available with which we can initialize the registers of CC1200 from LCDK ? If this is not available, can somebody advise us on how to go about initializing the spi so that we can do basic read/write of cc1200 registers.
  4. Currently our remaining software is running on the C6748. Can we run our spi drivers on it as well and maybe later move them to ARM (if needed) ?

  1. Is spi_c674x_c6748_lcdk6748 project (in C:\ti\pdk_C6748_2_0_0_0\C6748_StarterWare_1_20_03_03\examples\lcdkC6748\spi) a good starting point ?
  2. Where can we get documentation of the SPI APIs (Eg SPIModeConfigure, SPIClkConfigure, SPIPinControl) and Macros (Eg SPI_DATA_FORMAT0) that are used in the sample code ?
  3. Is there some sample code available with which we can initialize the registers of CC1200 from LCDK ? If this is not available, can somebody advise us on how to go about initializing the spi so that we can do basic read/write of cc1200 registers.
  4. Currently our remaining software is running on the C6748. Can we run our spi drivers on it as well and maybe later move them to ARM (if needed) ?
  • Dear Sanjay,
    A1. Yes, starterware package would be good starting point.
    A2. Please refer to the below TI wiki page.
    processors.wiki.ti.com/.../StarterWare_SPI
    A3. We don't have example code to access the CC1200 but you can communicate to this device with CC1200 SPI registers.

    C:\ti\OMAPL138_StarterWare_1_10_04_01\examples\lcdkOMAPL138\spi

    Like you can send the register address which you want to read/write use "tx_data" array in the following example code and you would get the response in "rx_data" array and check the "StatusResponseMessage" array .

    Ex:
    for(i=0;i<16;i++)
    {
    StatusResponseMessage[i] = rx_data[i+7];
    }

    A4. We have the same SPI example code for both ARM and DSP cores.

    ARM CCS project.
    C:\ti\OMAPL138_StarterWare_1_10_04_01\build\armv5\cgt_ccs\omapl138\lcdkOMAPL138\spi

    DSP CCS project:
    C:\ti\OMAPL138_StarterWare_1_10_04_01\build\c674x\cgt_ccs\omapl138\lcdkOMAPL138\spi

    Both ARM & DSP projects using the same source code with conditional compilation.

    Use the above locations to import the projects into CCS IDE.

    Ex:
    #ifdef _TMS320C6X
    //Titus : DSP code
    IntEventClear(SYS_INT_SPI1_INT);
    #else
    //Titus : ARM code
    IntSystemStatusClear(56);
    #endif

    Please let me know if any additional queries.
  • Hello Sanjay,

    Posting the hardware integration questions that we discussed offline.

    Hardware Integration:

    1. We plan to use SPI1 to connect L138 to CC1200 and use the signals present on J16 connector. Since the fingerprint sensor is not populated on the board, please confirm whether this is a good approach.

    2. An alternative to this is is to use SPI0 via J15. Please keep in mind that the CC1200 can be clocked up to 10 MHz - so that particular SPI should support this frequency and preferably there should not be any other peripheral connected to it (to ease debugging).

    3. We plan to connect the following SPI lines from J15/J16 connector to CC1200.

    1. Power, Gnd

    2. MISO, MOSI

    3. CSN (Which one to use ?)

    4. Is that sufficient ? Any pull-ups etc needed ?

    1. Yes, you can use the SPI1 interface available at the connector J16 to connect to the CC1200.

    2. The SPI0 interface is multiplexed with the EMAC signals. If you are not going to use the EMAC peripheral, then you will have to mount the resistors R214 to R219 (refer page 11 in LCDK schematics) to enable the SPI0 interface to the J15 connector. Also depopulate the resistors on the EMAC signals which are multiplexed with SPI0 signals. Yes, SPI interface on LCDK should support 10 MHz operation. Please refer table 6.70 and 6.78 in OMAPL138 data manual for SPI clock timing specifications for various core voltages.

    3. SPI CLK also need to be connected. You can use any of the chip select signal except for booting with SPI devices, you have to use CS[0]. No pull-up resistor is required.

    Regards,

    Senthil