帮助文件中针对TIMOD的解释:
The TIMOD field is used to specify the action that initiates transfers to/from the receive/transmit buffers. When set to 00, a SPI port transaction is begun when the receive buffer is read. Data from the first read will need to be discarded since the read is needed to initiate the first SPI port transaction. When set to 01, the transaction is initiated when the transmit buffer is written. A value of 10 selects DMA Receive mode and the first transaction is initiated by enabling the SPI for DMA Receive mode. Subsequent individual transactions are initiated by a DMA read of the SPI_RDBR. A value of 11 selects DMA Transmit mode and the transaction is initiated by a DMA write of the SPI_TDBR.
你在00模式,直接读取SPI-RDBR中的数据看看数据是否有变化。
SIZE位为16bit和8bit选择,设置后每次操作的数据为16bit, 所以变为0xffff