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.

CC3220SF开发板的SPI问题:SPI默认的应该是工作模式0,如果想更改为其他的工作模式,是只要修改SPI.c里的SPI_POL0_PHA0修改为SPI_POL1_PHA1就可以了吗,如果不是需要修改哪里呢?



  • 修改相位/极性的就是改这个

    typedef enum {
        SPI_POL0_PHA0 = 0,    /*!< SPI mode Polarity 0 Phase 0 */
        SPI_POL0_PHA1 = 1,    /*!< SPI mode Polarity 0 Phase 1 */
        SPI_POL1_PHA0 = 2,    /*!< SPI mode Polarity 1 Phase 0 */
        SPI_POL1_PHA1 = 3,    /*!< SPI mode Polarity 1 Phase 1 */
        SPI_TI        = 4,    /*!< TI mode (not supported on all
                                   implementations) */
        SPI_MW        = 5     /*!< Micro-wire mode (not supported on all
                                   implementations) */
    } SPI_FrameFormat;