初级会员
- 积分
- 116
- 金钱
- 116
- 注册时间
- 2017-11-14
- 在线时间
- 25 小时
|
1金钱
各位:
使用STM32F767开发板+10.1寸屏幕,用ucos+emwin开发,开机,尤其是刚刚下完程序,仿真运行的时候,闪得很厉害,过一会儿,或者独立运行的时候会好很多,但是屏幕四周还是还会有闪的情况,求指点。
下边是部分程序,都是在例程基础上修改,没做什么改动,因为用UTF8格式,所以注释都乱掉了
开机初始化部分:
Write_Through(); //Cahceǿ׆͸д
MPU_Memory_Protection(); //ѣۤРژզԢȸԲ
Cache_Enable(); //ղߪL1-Cache
Stm32_Clock_Init(432,25,2,9); //ʨ׃ʱד,216Mhz
HAL_Init(); //ԵʼۯHALࠢ
delay_init(216); //ғʱԵʼۯ
uart_init(115200); //ԮࠚԵʼۯ
KEY_Init(); //дݼԵʼۯ
PCF8574_Init(); //ԵʼۯCF8574
LED_Init(); //ԵʼۯLED
SDRAM_Init(); //SDRAMԵʼۯ
TFTLCD_Init(); //ԵʼۯLCD
TP_Init(); //ԥľ∥Եʼۯ
my_mem_init(SRAMIN); //ԵʼۯŚҿŚզԘ
my_mem_init(SRAMEX); //Եʼۯ΢ҿŚզԘ
my_mem_init(SRAMDTCM); //ԵʼۯDTCMŚզԘ
exfuns_init(); //ΪfatfsРژҤʪȫŚզ
f_mount(fs[0],"0:",1); //ڒ՘SDߨ
f_mount(fs[1],"1:",1); //ڒ՘FLASH.
f_mount(fs[2],"2:",1); //ڒ՘NAND FLASH.
while(font_init()) //Եʼۯؖࠢ
{
LCD_ShowString(30,70,200,16,16,"Font Error!");
while(SD_Init()) //ݬӢSDߨ
{
LCD_ShowString(30,90,200,16,16,"SD Card Failed!");
delay_ms(200);
LCD_Fill(30,90,200+30,70+16,WHITE);
delay_ms(200);
}
update_font(30,90,16,"0:"); //ɧڻؖࠢһզ՚ߍټтؖࠢ
delay_ms(2000);
LCD_Clear(WHITE); //ȥ∥
break;
}Write_Through(); //Cahceǿ׆͸д
MPU_Memory_Protection(); //ѣۤРژզԢȸԲ
Cache_Enable(); //ղߪL1-Cache
Stm32_Clock_Init(432,25,2,9); //ʨ׃ʱד,216Mhz
HAL_Init(); //ԵʼۯHALࠢ
delay_init(216); //ғʱԵʼۯ
uart_init(115200); //ԮࠚԵʼۯ
KEY_Init(); //дݼԵʼۯ
PCF8574_Init(); //ԵʼۯCF8574
LED_Init(); //ԵʼۯLED
SDRAM_Init(); //SDRAMԵʼۯ
TFTLCD_Init(); //ԵʼۯLCD
TP_Init(); //ԥľ∥Եʼۯ
my_mem_init(SRAMIN); //ԵʼۯŚҿŚզԘ
my_mem_init(SRAMEX); //Եʼۯ΢ҿŚզԘ
my_mem_init(SRAMDTCM); //ԵʼۯDTCMŚզԘ
exfuns_init(); //ΪfatfsРژҤʪȫŚզ
f_mount(fs[0],"0:",1); //ڒ՘SDߨ
f_mount(fs[1],"1:",1); //ڒ՘FLASH.
f_mount(fs[2],"2:",1); //ڒ՘NAND FLASH.
while(font_init()) //Եʼۯؖࠢ
{
LCD_ShowString(30,70,200,16,16,"Font Error!");
while(SD_Init()) //ݬӢSDߨ
{
LCD_ShowString(30,90,200,16,16,"SD Card Failed!");
delay_ms(200);
LCD_Fill(30,90,200+30,70+16,WHITE);
delay_ms(200);
}
update_font(30,90,16,"0:"); //ɧڻؖࠢһզ՚ߍټтؖࠢ
delay_ms(2000);
LCD_Clear(WHITE); //ȥ∥
break;
}
主任务初始化部分
BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX); //Јʨ׃ԉĬɏЧڻ
CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
MENU_SetDefaultSkin(MENU_SKIN_FLEX);
MULTIPAGE_SetDefaultSkin(MULTIPAGE_SKIN_FLEX);
PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
SPINBOX_SetDefaultSkin(SPINBOX_SKIN_FLEX);
//ДʾںؖРژ zxwtest
Create_XBF12("0:/SYSTEM/EMWINFONT/XBF/XBF12.xbf");
Create_XBF16("0:/SYSTEM/EMWINFONT/XBF/XBF16.xbf");
Create_XBF24("0:/SYSTEM/EMWINFONT/XBF/XBF24.xbf");
Create_XBF36("0:/SYSTEM/EMWINFONT/XBF/XBF36.xbf");
GUI_UC_SetEncodeUTF8();//הӦCτݾҘѫӔUTF-8ٱʽҠܭ
WM_SetCreateFlags(WM_CF_MEMDEV);//Եʼۯǰַԃìرղܡʁ˸ì
GUI_CURSOR_Show();
|
|