问答

汇集网友智慧,解决技术难题

win1234568899

TA的家园币:22  

  • GD32F103VC替换ST32F103VC后,SPI读出的数全是0xff

    用ST芯片,SPI读取正常。换成GD芯片后,按照官方提供的GD和ST差异表,修改了程序,u8SPI_FLASH_SendByte(u8byte)返回值全是0xff,有人遇到过这种情况吗?u8SPI_FLASH_SendByte(u8byte)//{/*LoopwhileDRregisterinnotemplty*/while((SPI1->SR&SPI_I2S_FLAG_TXE)==0);/*SendbytethroughtheSPI1peripheral*/SPI1->DR=byte;/*Waittoreceiveabyte*/while((SPI1->SR&SPI_I2S_FLAG_RXNE)==0);/*ReturnthebytereadfromtheSPIbus*/returnSPI1->DR;}

    spi ST gd32F103 TE While se

    2021-06-03 1