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 SPI传输模式

Other Parts Discussed in Thread: CC2640R2F

最近在按照官方的SPI历程跟OLED通信,发现有几个参数不是很明白:

typedef struct {
    SPI_TransferMode transferMode;       /*!< Blocking or Callback mode */
    uint32_t         transferTimeout;    /*!< Transfer timeout in system
                                              ticks */
    SPI_CallbackFxn  transferCallbackFxn;/*!< Callback function pointer */
    SPI_Mode         mode;               /*!< Master or Slave mode */
    /*! @brief SPI bit rate in Hz
     *
     *  Maximum bit rates supported by hardware:
     *  Device Family | Slave Max (MHz)    | Master Max (MHz) |
     *  ------------- | ------------------ | ---------------- |
     *  MSP432P4      | 16 MHz             | 24 MHz           |
     *  MSP432E4      | 10 MHz             | 60 MHz           |
     *  CC13XX/CC26XX | 4  MHz             | 12 MHz           |
     *  CC32XX        | 20 MHz             | 20 MHz           |
     *
     *  Please note that depending on the specific use case, the driver may not
     *  support the hardware's maximum bit rate.
     */
    uint32_t         bitRate;
    uint32_t         dataSize;           /*!< SPI data frame size in bits */
    SPI_FrameFormat  frameFormat;        /*!< SPI frame format */
    void            *custom;             /*!< Custom argument used by driver
                                              implementation */
} SPI_Params;
在Params中:transferMode中包含了阻塞模式和回调模式,这两个模式有什么区别?阻塞模式会在我发送完数据以后阻塞我的主进程代码的运行吗?回调模式又是如何来理解呢?

还有bitRate我可以理解为传输速度吗?传输速度对从机设备有要求吗?这个传输速度在SPI的时序图上该如何来理解呢?