Gabriel Wang před 1 rokem
rodič
revize
7b45ec10b8

+ 2 - 2
projects/arm2d/vision_board_mipi_2.0inch_arm2d/project.uvoptx

@@ -607,7 +607,7 @@
 
   <Group>
     <GroupName>Finsh</GroupName>
-    <tvExp>0</tvExp>
+    <tvExp>1</tvExp>
     <tvExpOptDlg>0</tvExpOptDlg>
     <cbSel>0</cbSel>
     <RteFlg>0</RteFlg>
@@ -855,7 +855,7 @@
       <GroupNumber>8</GroupNumber>
       <FileNumber>51</FileNumber>
       <FileType>1</FileType>
-      <tvExp>1</tvExp>
+      <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>.\arm_2d_scene_bubble_charging.c</PathWithFileName>

+ 9 - 2
projects/arm2d/vision_board_mipi_2.0inch_arm2d/src/hal_entry.c

@@ -22,6 +22,8 @@
 #   include "RTE_Components.h"
 #endif
 
+#include <rtthread.h>
+
 #include <stdio.h>
 #ifdef RTE_Acceleration_Arm_2D
 #include "arm_2d_helper.h"
@@ -261,8 +263,13 @@ void hal_entry(void)
 #ifdef RTE_Acceleration_Arm_2D_Extra_Benchmark
         disp_adapter0_task();
 #else
-        /* lock framerate */
-        disp_adapter0_task(LCD_TARGET_FPS);
+        rt_tick_t tTick = rt_tick_get();
+        
+        while(arm_fsm_rt_cpl != disp_adapter0_task(LCD_TARGET_FPS)) __NOP();
+        
+        rt_thread_delay_until(  
+                        &tTick, 
+                        rt_tick_from_millisecond( (1000 / LCD_TARGET_FPS)));
 #endif
     }
 #endif  /* RTE_Acceleration_Arm_2D */