目录
1、初始化
Perform the following procedure for initializing the SPI:
1. Reset the SPI by clearing the RESET bit in the SPI global control register 0 (SPIGCR0) to 0.
2. Take the SPI out of reset by setting SPIGCR0.RESET to 1.
3. Configure the SPI for master mode by configuring the CLKMOD and MASTER bits in the SPI global control register 1 (SPIGCR1).
4. Configure the SPI for 3-pin or 4-pin with chip select mode by configuring the SPI pin control register 0 (SPIPC0).
5. Choose the SPI data format register n (SPIFMTn) to be used by confi