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.

Using the RemoTI stack as NP, via SPI, connected to external non-TI-RTOS host (no host RTOS at all)

Other Parts Discussed in Thread: REMOTI, CC2650, CCSTUDIO

I am using a Microchip PIC as the host processor, running no RTOS at all. This PIC is intended to commuicate via SPI with the CC2650 running the RemoTI stack (rnp_app + rnp_stack)

I am using a custom hardware platform, consisting of the above mentioned PIC and a CC2650 module. When compiling the rnp_app, I have the following Predefined Symbol for the project: POWER_SAVING, NPI_USE_SPI, NPI_LOW_CTRL, while undefined: NPI_MASTER, EATURE_RCN_API

My challenges are:

1. configuring either SPI0 or SPI1 for communication on any of the IOIDx pins

2. Monitoring the SPI traffic from IOIDx pin up into the higher layers within the RemoTI stack (part of it is provided as binary only, no source code to put breakpoints and trace the SPI traffic)

Could you suggest a step a step method that actually the RemoTI stack and SPI? I know there is an SPI example for the SmartRF06 dev board, driving a LCD via SPI, however that code structure is not the same as adding the SPI driver to the RemoTI stack.

  • Ronald,

    Ronald Chu said:
    1. configuring either SPI0 or SPI1 for communication on any of the IOIDx pins

    I'd suggest to use RemoTI 2.0.1. I've used SPI1 on a CC2650 Launchpad with that release. In RemoTI 2.0.1, there's an rnp app for the luanchpad which has an explicit SPI build configuration in IAR and CCS that you can reference.

    The pin assignments for SPI are handled in cc2650lp_board.c (or cc2650em_board.c if using the em).

    /* SPI configuration structure, describing which pins are to be used */
    const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_LAUNCHXL_SPICOUNT] = {
        { //SPI0
            .baseAddr           = SSI0_BASE,
            .intNum             = INT_SSI0_COMB,
            .intPriority        = ~0,
            .swiPriority        = 0,
            .powerMngrId        = PowerCC26XX_PERIPH_SSI0,
            .defaultTxBufValue  = 0,
            .rxChannelBitMask   = 1<<UDMA_CHAN_SSI0_RX,
            .txChannelBitMask   = 1<<UDMA_CHAN_SSI0_TX,
            .mosiPin            = Board_SPI0_MOSI,
            .misoPin            = Board_SPI0_MISO,
            .clkPin             = Board_SPI0_CLK,
            .csnPin             = Board_SPI0_CSN
        },
        { //SPI1
            .baseAddr           = SSI1_BASE,
            .intNum             = INT_SSI1_COMB,
            .intPriority        = ~0,
            .swiPriority        = 0,
            .powerMngrId        = PowerCC26XX_PERIPH_SSI1,
            .defaultTxBufValue  = 0,
            .rxChannelBitMask   = 1<<UDMA_CHAN_SSI1_RX,
            .txChannelBitMask   = 1<<UDMA_CHAN_SSI1_TX,
            .mosiPin            = Board_SPI1_MOSI,
            .misoPin            = Board_SPI1_MISO,
            .clkPin             = Board_SPI1_CLK,
            .csnPin             = Board_SPI1_CSN
        }
    };

    Ronald Chu said:
    2. Monitoring the SPI traffic from IOIDx pin up into the higher layers within the RemoTI stack (part of it is provided as binary only, no source code to put breakpoints and trace the SPI traffic)

    The SPI controller and its pins are owned by the application, not by the stack. The RNP application routes NPI frames to the corresponding NPI subsystem. If you look at RTI_processRxMsg (From Host to stack) and RTI_processTxMsg (From stack to host), you can see how the NPI task routes RTI subsystem frames to and from the rnp_stack image.

    Ronald Chu said:
    Could you suggest a step a step method that actually the RemoTI stack and SPI? I know there is an SPI example for the SmartRF06 dev board, driving a LCD via SPI, however that code structure is not the same as adding the SPI driver to the RemoTI stack.

    I'm not sure I understand. If you are just looking for just an example that uses SPI driver in an rnp configuration, see the launchpad project. The npi_task uses the SPI driver provided by TI-RTOS. See NPITask_open().

  • Hello Tom,

    Thanks for this update on the CC2650 Launchpad running RemoTI 2.0.1. I have ordered the CC2650 Launchpad. Please expound on your statement "there's an rnp app for the luanchpad which has an explicit SPI build configuration in IAR and CCS that you can reference." Where can I find the CCStudio files? I can't find anything else besides the Bluetooth-related material on the CC2650 Launchpad Tools/Software webpage: www.ti.com/.../launchxl-cc2650
    Neither does CCS App Center take me where I can download any CC2650 LaunchPad specific RemoTI project.

    Regards,
    Manuel
  • I'll take a note to have this information updated.

    Support for the launchpad is essentially embedded in the RemoTI 2.0.1 SDK. Within it, you will find an "rnp" example for the launchpad. This exmaple can be imported straight into CCS.
    This example by default uses UART as its transport, but it does have a build configuration that sets up the proper predefined symbols for SPI.