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.

GPIO外设配置问题



当把GPIO外设配置成SPI时,为什么需要将采样窗的限定改为不同步及采样窗限定。也就是为什么GPxQSEL1/2 = 3;在我们实际使用过程中,我们把GPBQSEL2.Bit.GPIO54-57均设置成0,与SYSCLKOUT同步时,采用SPI时钟CLOCK POLARITY:0 CLOCK PHASE:1。根据手册,SPI应该在上升沿前半个周期发送数据,上升沿接收数据,通过示波器看到的结果为,SPI在上升沿时发送数据,导致接收端有数据错误,当把GPBQSEL2.Bit.GPIO54-57均设置成3.就不会出现这样的情况。为什么将GPIO配置成外设时,需要将GPxQSEL1/2寄存器设置为3