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.

CC2652P: NPI change UART to SPI in Host test

Part Number: CC2652P

Hello,

SDK: SimpleLink CC13x2 26x2 SDK - 5.20.00.52

I am trying to change the NPI in Host_test from default UART to SPI. I did not made any changes to the .syscfg Device Configuration. 

But i tried to change the defines in ble5_host_test_cc13x2p2lp_appFlashROM_Release.opt

i edited:

-DNPI_USE_SPI
-DxNPI_USE_UART
-DNPI_FLOW_CTRL
-DPOWER_SAVING

But after that I got some errors.

the npi_config.h

So my question is. Are these the right defines to get SPI working? And do I need to define FLOW_CTRL and POWER_SAVING to use the MRDY and SRDY for SPI, or are they automatically activated with NPI_USE_SPI?

best regards,

Samuel

  • Hi Samuel,

    When I build an out-of-box project on SDK 5.20 with those settings in the Release.opt file I do not get the same error as you. Is it possible you've #included the NPI files or #defined those symbols twice mistakenly?

    Judging by npi_config.h, it seems that you just need NPI_FLOW_CTRL and NPI_USE_SPI to define the MRDY and SRDY pins, so I think that should be enough. Is there a reason you think the other defines are necessary?

    Best,

    Nate

  • Hi Nate,

    thank you! Yes indeed I #included a NPI file twice, my bad. Now it works fine.

    I once read something about the POWER_SAVING and I wasn´t sure if it is mandatory for SPI. but after taking a closer look at npi_config.h, like you did, I wasn't sure whether what I had read was correct. Thats why I asked about it.

    regards,

    Samuel

  • Hi Nate,

    would it be possible that you could provide a SPI logic capture of a valid communication between NPI slave and master (Host MCU sends HCI command and Host-test sends event) for me?

    Since the ti-wiki page is down i couldn't find an example.

    EDIT:

    I made some screenshots from my spi frame which I sent to host test. With my understanding the format is conform with NPI. But when i send a command, nothing happens on the host_test side (LAUNCHXL-CC1352P-2). No response.

    Here MOSI, MISO and CLK with the data packet (HCI_EXT_ResetSystemCmd 0xFC1D)

    The handshaking seems to work.

    regards, 

    Samuel

  • Hi Samuel,

    I'm not able to mimic your setup at this time, but would you be able to step through the code to find if/where the host_test controller wakes up? I also know that for the host_test example to work I typically have to sent an HCIExt_Reset_SystemCmd first (screenshot from BTool and host_test running with the OOB software). Can you send that over SPI and see if you get different results?

    Best,

    Nate