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.

CC2640R2F: SDKv5.30: Simple Peripheral Off-Chip OAD does not finish if set CC2640R2_LAUNCHXL_SPI0_CSN IOID_11

Part Number: CC2640R2F

Hi,

Using Simple Peripheral Off-Chip OAD example program as base from SDKv5.30, If I set the CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOD_11 the OAD fails using SimpleLink Starter App.

-kel

  • Hi kel,

    What are you seeking to do?  CC2640R2_LAUNCHXL_SPI_FLASH_CS/IOID_20 is already used for external flash CS and setting the csnPin of spiCC26XXDMAHWAttrs from PIN_UNASSIGNED to a valid IOID most likely changes the SPI TI Driver behavior in a manner not expected for the operation of the simple_peripheral_oad_offchip example, causing communication with the external flash memory to fail.  Also note that the same configuration is expected for the bsp_spi.c/h files from the bim_oad_offchip project.

    Regards,
    Ryan

  • Hi Ryan,

    I am working on a CC2640R2F + NXP NTM88 TPMS project. The CC2640R2F communicates with NXP NTM88 using SPI interface. When the device is not connected every 2 seconds reads sensor data from NXP NTM88 and advertises the sensor data. When it is connected to smart phone disables the task that reads the sensor data. The device while connected is used for OAD only. Here is connection diagram.

    I reviewed the code SPI external flash for OAD and SPI NTM88 can work together. Maybe not all.

    -kel

  • Thanks for sharing.  You can manually drive CC2640R2_LAUNCHXL_SPI_FLASH_CS low when not using the OAD feature with external flash, and likewise control NXP NTM88 CS functionality through software to control when it is enabled/disabled.

    Regards,
    Ryan

  • Hi Ryan,

    Why using the original Simple Peripheral Off Chip OAD example program if I set the CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOD_11 the OAD fails using SimpleLink Starter App?

    My communication with SPI NTM88 already works and I can see the set SPI CS IOD_11 automatically goes low during SPI communication. I am not sure I can replicate the same way manually.

    -kel

  • Is the NXP NTM88 connected when you evaluate the Simple Peripheral Off Chip OAD example program?  Otherwise, assigning a csnPin changes the operation of the SSI hardware module from three-wire to four-wire.  This could affect the timing or handline of the CLK/MISO/MOSI lines which could in turn corrupt the external flash communication.  Are you able to compare communication of the two configurations using a logic analyzer or oscilloscope?

    Regards,
    Ryan

  • Is the NXP NTM88 connected when you evaluate the Simple Peripheral Off Chip OAD example program?

    No. I have isolated the root cause of the OAD failure to be changing CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOD_11. That is the only code change.

    I have only captured SPI communication of CC2640R2F and NXP NTM88 using logic analyzer.

    -kel

  • Hey Kel,

    I've tried to reproduce this issue but am unable to using a launchpad. I believe Ryan voiced my main concern in his initial reply. Are you able to verify that you can write to external flash while also connected to the NXP chip? The OAD will not succeed if it is unable to write to the ext flash.

  • Hi Ammar N,

    root cause of the OAD failure to be changing CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOD_11. That is the only code change.

    Using only the CC2640R2F Launchpad and original Simple Peripheral Off-Chip OAD example program. This is not right I set  CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOID_11 causes OAD failure. This is something that happens internally, which I have no idea. As Ryan mentioned could change SSI hardware module from 3 wire to 4 wire, but CC2640R2_LAUNCHXL_SPI0_CSN from PIN_UNASSIGNED to IOID_11 is not even executable code that I wrote.

    Anyway, I will find alternative ways to solve my problem. I will mark this post as answered.

    -kel

  • Just want to update both of you, the NTM88 communication works in 4 wire SPI configuration. But, if I configure it to 3 wire SPI configuration and manually turn the NTM88 SPI CS low and high, I am not able to read the NTM88 sensor data. So, this is now an impossible task.

    Do you know the property of SPI CS pin at 4 wire SPI configuration. Is it push/pull or pull ony?

    -kel

  • Hey Kel,

    I apologize for the delay here, I missed this reply before being out of the office for some time.

    The default example uses a 3-wire SPI config with the 4th wire controlled by the application. The fourth wire in the example (CC2640R2_LAUNCHXL_SPI_FLASH_CS), is configured as push/pull.

    CC2640R2_LAUNCHXL_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN,  /* External flash chip select */