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.

MSP432E401Y: Ble Plugin : Using SPI between MSP432E401Y and CC2640R2F

Part Number: MSP432E401Y

SDK setup: 

1. simplelink_sdk_ble_plugin_3_20_00_24 for MSP432E401Y
2. simplelink_cc2640r2_sdk_3_20_00_21


I am planning to use MSP432E401Y as the Application processor and CC2640R2 as the Network processor. 
I want to use SPI as the serial link between both the processors.

Question:
1. By including "NPI_USE_SPI" symbol in the "simple application processor" example will I be able to use the MSP432 with SPI as the serial link?

2. What are the changes required in the "simple application processor" example to use it with SPI serial link?

3. As "npi_tl_spi.c" is not part of the "/source/ti/npi" folder. Do we have to implement the "npi_tl_spi.c"? After writing this Do we need to rebuild the SDK? If SDK rebuild is required what is the method to rebuild the SDK?  

I will be using the "cc2460r2lp_simple_np_spi_pm_sbl.hex" for the CC2640R2 processor when using SPI as the serial link.

4. What are the changes required in the "simple_np_cc2640r2lp_app"  project to use it as SPI based serial link?

I didn't find documentaion related to the porting of both the projects to SPI based serial link. It would be helpful if I get any resource which describes the procedure to use SPI as the serial link in a ble_plugin project.

Thank You.

  • Hi Tejas,

    We will look into this and get back to you by the end of the week.

    Thanks,

    Alexis

  • Hi Alexis,

    Any update on this post?
    Please reply at the earliest as our development is getting delayed.

    Thank you

  • Hi Tejas,

    Currently, the BLE Plugin does not implement SPI with NPI. To do this, as you said you will need to implement "npi_tl_spi.c"  in the bleplugin_dir/source/ti/npi. For reference, you can view the CC2640R2 SDK BLE Stack User's Guide page on NPI, as well as view "npi_tl_spi.c" in the cc2640r2sdk_dir/source/ti/blestack/npi/src. 

    To build the NPI library, you will have to make changes to source/ti/npi/package.bld in the BLE Plugin. I've attached an example package.bld file to show you how to create new libraries. Note the following changes to the file:

    1) Line 55, added "npi_tl_spi.h". When you create this, keep this header file name as-is because npi_tl_simplelink.c will try to include "npi_tl_spi.h" if you have NPI_USE_SPI defined.

    2) Line 51, added "npi_tl_spi.c" to the list of source files. This will be whatever source code file(s) you create to implement NPI with SPI.

    3) Lines 75 - 81, added a library tilted "/npi_spi_pm_" that will create the NPI SPI libraries with power savings enabled via the "POWER_SAVING" macro - you will have to enable power savings in your SPI implementation for this library if you want to use the "cc2460r2lp_simple_np_spi_pm_sbl.hex" as you previously mentioned.

    4) Lines 83-89, added the default NPI SPI library without power savings.

    5) Lines 80 and 88, note the define "-DNPI_USE_SPI" is used instead of "-DNPI_USE_UART". 

    Next, you will have to make similar changes to source/ti/sap/package.bld -- add the new libraries for "/sap_spi_pm_" and "/sap_spi_". You shouldn't have to add new header or source files to this package.bld.

    Then go to bleplugin_dir/source/ti, and to clean the libraries (this will clean NPI and SAP) run:
    C:\ti\xdctools_3_60_00_24_core\gmake.exe clean (or whatever XDC tools you have installed)

    Then to build the libraries, run:
    C:\ti\xdctools_3_60_00_24_core\gmake.exe

    In your example, make sure to link to your new SPI NPI and SAP libraries.

    Then you should be able to flash your CC2640R2 with 'cc2640r2lp_simple_np_spi_pm_sbl.hex'.

    Let me know if you have any additional questions.

    Best,

    Kristen

  • Hi Kristen,

    Thank you for your reply.

    I am trying to implement the changes suggested by you.The "package.bld" file attachment is not present in your above reply. Please add the "package.bld" file.

    Thank You,

    Tejas SJ

  • Hi Tejas,

    Sorry for the delay. Attached is the package.bld file. 0508.package.bld

    Best,
    Kristen

**Attention** This is a public forum