本帖最后由 Jackson_lv 于 2017-3-3 18:10 编辑
我现在想用STM32F205 去控制VS1053 播放音频。用逻辑分析仪看到 DQ引脚一直是高。不知道是不是设置VS1053 的CLOCKF 寄存器设置得不对? 我的205用了26Mhz 外部晶振,120Mhz内部时钟。应该给CLOCKF写什么值?
SPI设置:
[mw_shl_code=c,true] SPI_InitTypeDef SPI_InitStructure;
SPI_GPIO_Configuration();
SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_256;
SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_InitStructure.SPI_CRCPolynomial = 7;
SPI_Init(SPI1, &SPI_InitStructure);
SPI_Cmd(SPI1, ENABLE);
[/mw_shl_code]
一周热门 更多>