Other Parts Discussed in Thread: DRV8711,
Tool/software: TI-RTOS
simplelink_cc2640r2_sdk_2_30_00_28, in this sdk, the SPI driver function SPICC26XXDMA_initIO, input pins need PIN_PULLUP, so that the electrical leve of the input pins are pulled up from the cc2640r2 soc side and be adapted to the required level for the soc cc2640r2. the following is the patch for SPICC26XXDMA.c. there's same problem in SPICC26X2DMA.c, both files are found in ~/ti/simplelink_cc2640r2_sdk_2_30_00_28/source/ti/drivers/spi . for better flexibility, all the SPI pins should be controled by the function SPICC26XXDMA_control, with more command like SPICC26XXDMA_CMD_SET_MISO_PIN, SPICC26XXDMA_CMD_SET_MOSI_PIN, SPICC26XXDMA_CMD_SET_CLK_PIN
--- SPICC26XXDMA.c.orig 2018-12-15 14:16:13.473854253 +0800 +++ SPICC26XXDMA.c 2018-12-15 14:20:48.781926275 +0800 @@ -1104,15 +1104,15 @@ /* Build local list of pins, allocate through PIN driver and map HW ports */ if (object->mode == SPI_SLAVE) { /* Configure IOs for slave mode */ - spiPinTable[i++] = hwAttrs->mosiPin | PIN_INPUT_EN; + spiPinTable[i++] = hwAttrs->mosiPin | PIN_INPUT_EN | PIN_PULLUP; spiPinTable[i++] = hwAttrs->misoPin | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_INPUT_DIS | PIN_DRVSTR_MED; - spiPinTable[i++] = hwAttrs->clkPin | PIN_INPUT_EN; + spiPinTable[i++] = hwAttrs->clkPin | PIN_INPUT_EN | PIN_PULLUP; spiPinTable[i++] = object->csnPin | PIN_INPUT_EN | PIN_PULLUP; } else { /* Configure IOs for master mode */ spiPinTable[i++] = hwAttrs->mosiPin | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_INPUT_DIS | PIN_DRVSTR_MED; - spiPinTable[i++] = hwAttrs->misoPin | PIN_INPUT_EN | PIN_PULLDOWN; + spiPinTable[i++] = hwAttrs->misoPin | PIN_INPUT_EN | PIN_PULLUP; /* Output low signal on SCLK until SPI module drives signal if clock polarity is configured to '0' */ /* Output high signal on SCLK until SPI module drives signal if clock polarity is configured to '1' */