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.

spi边沿捕获

EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT
EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT
这两个宏定义什么意思?哪个是第一个边沿,哪个是第二个边沿?

  • 在代码中有如下描述

    //*****************************************************************************
    //
    // The following are values that can be passed to the clockPhase parameter for
    // functions: EUSCI_B_SPI_changeClockPhasePolarity(); the param parameter for
    // functions: EUSCI_B_SPI_initMaster(), and EUSCI_B_SPI_initSlave().
    //
    //*****************************************************************************
    #define EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT            0x00
    #define EUSCI_B_SPI_PHASE_DATA_CAPTURED_ONFIRST_CHANGED_ON_NEXT          UCCKPH

    在用户指南中,如下

    https://www.ti.com.cn/cn/lit/ug/slau208q/slau208q.pdf 

    主要是change和capture的顺序问题