测试MCU型号:AT32F403ACGT6引脚兼容SXX32F103C系列,软件则直接使用SXX32F103的3.5标准库.液晶屏尺寸2.8英寸,分辨率320x240.驱动方式SPI+DMA.
在LVGL8.3.8自带BENCHMARK演示程序中,72M主频运行获得FPS为49,240M主频运行获得FPS为157.
使用3.5标准库打开240M主频的设置:
1. 在system_sxx32f103.c文件中SetSysClockTo72(void)将原来72倍频RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMULL9);替换成
#define RCC_PLL_MUL30 ((uint32_t)0x20340000) /*!< PLL input clock*30 */
RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_PLL_MUL30 | (1<<31));
2. 在sxx32f103rcc.c中RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)原
if ((RCC->CFGR & CFGR_PLLXTPRE_Mask) != (uint32_t)RESET)
{/* HSE oscillator clock divided by 2 */
RCC_Clocks->SYSCLK_Frequency = (HSE_VALUE >> 1) * pllmull;
}
else
{
RCC_Clocks->SYSCLK_Frequency = HSE_VALUE * pllmull;
}
添加 if( RCC->CFGR & ( 1<<31) )
{
RCC_Clocks->SYSCLK_Frequency = RCC_Clocks->SYSCLK_Frequency <<1;
}
if ((RCC->CFGR & CFGR_PLLXTPRE_Mask) != (uint32_t)RESET)
{/* HSE oscillator clock divided by 2 */
RCC_Clocks->SYSCLK_Frequency = (HSE_VALUE >> 1) * pllmull;
}
else
{
RCC_Clocks->SYSCLK_Frequency = HSE_VALUE * pllmull;
if( RCC->CFGR & ( 1<<31) )
{
RCC_Clocks->SYSCLK_Frequency = RCC_Clocks->SYSCLK_Frequency <<1;
}
}
72M主频测试实拍
240M主频测试实拍
雅特力AT32F403ACGT6实拍
测试板实拍
|