|
@@ -106,17 +106,18 @@ SRAM_HandleTypeDef hsram3;
|
|
|
SRAM_HandleTypeDef hsram4;
|
|
SRAM_HandleTypeDef hsram4;
|
|
|
|
|
|
|
|
/* Definitions for taskEPS */
|
|
/* Definitions for taskEPS */
|
|
|
-osThreadId_t taskEPSHandle;
|
|
|
|
|
-uint32_t taskEPSBuffer[ imcSTACK_SIZE ];
|
|
|
|
|
-osStaticThreadDef_t taskEPSControlBlock;
|
|
|
|
|
-const osThreadAttr_t taskEPS_attributes = {
|
|
|
|
|
- .name = "taskEPS",
|
|
|
|
|
- .stack_mem = &taskEPSBuffer[0],
|
|
|
|
|
- .stack_size = sizeof(taskEPSBuffer),
|
|
|
|
|
- .cb_mem = &taskEPSControlBlock,
|
|
|
|
|
- .cb_size = sizeof(taskEPSControlBlock),
|
|
|
|
|
- .priority = (osPriority_t) osPriorityRealtime,
|
|
|
|
|
-};
|
|
|
|
|
|
|
+// osThreadId_t taskEPSHandle;
|
|
|
|
|
+// uint32_t taskEPSBuffer[ imcSTACK_SIZE ];
|
|
|
|
|
+// osStaticThreadDef_t taskEPSControlBlock;
|
|
|
|
|
+// const osThreadAttr_t taskEPS_attributes = {
|
|
|
|
|
+// .name = "taskEPS",
|
|
|
|
|
+// .stack_mem = &taskEPSBuffer[0],
|
|
|
|
|
+// .stack_size = sizeof(taskEPSBuffer),
|
|
|
|
|
+// .cb_mem = &taskEPSControlBlock,
|
|
|
|
|
+// .cb_size = sizeof(taskEPSControlBlock),
|
|
|
|
|
+// .priority = (osPriority_t) osPriorityRealtime,
|
|
|
|
|
+// };
|
|
|
|
|
+
|
|
|
/* Definitions for taskSnap */
|
|
/* Definitions for taskSnap */
|
|
|
osThreadId_t taskSnapHandle;
|
|
osThreadId_t taskSnapHandle;
|
|
|
uint32_t taskSnapBuffer[ imcSTACK_SIZE ];
|
|
uint32_t taskSnapBuffer[ imcSTACK_SIZE ];
|
|
@@ -129,18 +130,45 @@ const osThreadAttr_t taskSnap_attributes = {
|
|
|
.cb_size = sizeof(taskSnapControlBlock),
|
|
.cb_size = sizeof(taskSnapControlBlock),
|
|
|
.priority = (osPriority_t) osPriorityRealtime,
|
|
.priority = (osPriority_t) osPriorityRealtime,
|
|
|
};
|
|
};
|
|
|
-/* Definitions for taskAI */
|
|
|
|
|
-osThreadId_t taskAIHandle;
|
|
|
|
|
-uint32_t taskAIBuffer[ 37968 ];
|
|
|
|
|
-osStaticThreadDef_t taskAIControlBlock;
|
|
|
|
|
-const osThreadAttr_t taskAI_attributes = {
|
|
|
|
|
- .name = "taskAI",
|
|
|
|
|
- .stack_mem = &taskAIBuffer[0],
|
|
|
|
|
- .stack_size = sizeof(taskAIBuffer),
|
|
|
|
|
- .cb_mem = &taskAIControlBlock,
|
|
|
|
|
- .cb_size = sizeof(taskAIControlBlock),
|
|
|
|
|
- .priority = (osPriority_t) osPriorityNormal,
|
|
|
|
|
|
|
+
|
|
|
|
|
+/* Definitions for taskTest1 */
|
|
|
|
|
+osThreadId_t taskTest1Handle;
|
|
|
|
|
+uint32_t taskTest1Buffer[ imcSTACK_SIZE ];
|
|
|
|
|
+osStaticThreadDef_t taskTest1ControlBlock;
|
|
|
|
|
+const osThreadAttr_t taskTest1_attributes = {
|
|
|
|
|
+ .name = "taskTest1",
|
|
|
|
|
+ .stack_mem = &taskTest1Buffer[0],
|
|
|
|
|
+ .stack_size = sizeof(taskTest1Buffer),
|
|
|
|
|
+ .cb_mem = &taskTest1ControlBlock,
|
|
|
|
|
+ .cb_size = sizeof(taskTest1ControlBlock),
|
|
|
|
|
+ .priority = (osPriority_t) osPriorityRealtime,
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+/* Definitions for taskTest2 */
|
|
|
|
|
+osThreadId_t taskTest2Handle;
|
|
|
|
|
+uint32_t taskTest2Buffer[ imcSTACK_SIZE ];
|
|
|
|
|
+osStaticThreadDef_t taskTest2ControlBlock;
|
|
|
|
|
+const osThreadAttr_t taskTest2_attributes = {
|
|
|
|
|
+ .name = "taskTest2",
|
|
|
|
|
+ .stack_mem = &taskTest2Buffer[0],
|
|
|
|
|
+ .stack_size = sizeof(taskTest2Buffer),
|
|
|
|
|
+ .cb_mem = &taskTest2ControlBlock,
|
|
|
|
|
+ .cb_size = sizeof(taskTest2ControlBlock),
|
|
|
|
|
+ .priority = (osPriority_t) osPriorityRealtime,
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/* Definitions for taskAI */
|
|
|
|
|
+// osThreadId_t taskAIHandle;
|
|
|
|
|
+// uint32_t taskAIBuffer[ 37968 ];
|
|
|
|
|
+// osStaticThreadDef_t taskAIControlBlock;
|
|
|
|
|
+// const osThreadAttr_t taskAI_attributes = {
|
|
|
|
|
+// .name = "taskAI",
|
|
|
|
|
+// .stack_mem = &taskAIBuffer[0],
|
|
|
|
|
+// .stack_size = sizeof(taskAIBuffer),
|
|
|
|
|
+// .cb_mem = &taskAIControlBlock,
|
|
|
|
|
+// .cb_size = sizeof(taskAIControlBlock),
|
|
|
|
|
+// .priority = (osPriority_t) osPriorityNormal,
|
|
|
|
|
+// };
|
|
|
/* USER CODE BEGIN PV */
|
|
/* USER CODE BEGIN PV */
|
|
|
|
|
|
|
|
/* USER CODE END PV */
|
|
/* USER CODE END PV */
|
|
@@ -299,9 +327,9 @@ int main(void)
|
|
|
|
|
|
|
|
/* creation of taskSnap */
|
|
/* creation of taskSnap */
|
|
|
#if (imcUSE_IMC_KERNEL == 1)
|
|
#if (imcUSE_IMC_KERNEL == 1)
|
|
|
- // taskSnapHandle = imcOsThreadNew(taskSnapRunner, NULL, &taskSnap_attributes);
|
|
|
|
|
- taskSnapHandle = imcOsThreadNew(taskImcTest, NULL, &taskSnap_attributes);
|
|
|
|
|
- taskEPSHandle = imcOsThreadNew(taskImcTest_2, NULL, &taskEPS_attributes);
|
|
|
|
|
|
|
+ taskSnapHandle = imcOsThreadNew(taskSnapRunner, NULL, &taskSnap_attributes);
|
|
|
|
|
+ taskTest1Handle = imcOsThreadNew(taskImcTest, NULL, &taskTest1_attributes);
|
|
|
|
|
+ taskTest2Handle = imcOsThreadNew(taskImcTest_2, NULL, &taskTest2_attributes);
|
|
|
#else
|
|
#else
|
|
|
// taskSnapHandle = osThreadNew(taskSnapRunner, NULL, &taskSnap_attributes);
|
|
// taskSnapHandle = osThreadNew(taskSnapRunner, NULL, &taskSnap_attributes);
|
|
|
#endif
|
|
#endif
|
|
@@ -1411,12 +1439,12 @@ void taskEPSRunner(void *argument)
|
|
|
* @param argument: Not used
|
|
* @param argument: Not used
|
|
|
* @retval None
|
|
* @retval None
|
|
|
*/
|
|
*/
|
|
|
-uint32_t trial = 1;
|
|
|
|
|
extern uint16_t ilen;
|
|
extern uint16_t ilen;
|
|
|
/* USER CODE END Header_taskSnapRunner */
|
|
/* USER CODE END Header_taskSnapRunner */
|
|
|
void taskSnapRunner(void *argument)
|
|
void taskSnapRunner(void *argument)
|
|
|
{
|
|
{
|
|
|
/* USER CODE BEGIN taskSnapRunner */
|
|
/* USER CODE BEGIN taskSnapRunner */
|
|
|
|
|
+ uint32_t trial = 1;
|
|
|
sc03mpd_ifx_t ifx = {
|
|
sc03mpd_ifx_t ifx = {
|
|
|
.context = (void*)&UART_HANDLER_CAM,
|
|
.context = (void*)&UART_HANDLER_CAM,
|
|
|
.sendif = hal_uart_ifx_send,
|
|
.sendif = hal_uart_ifx_send,
|
|
@@ -1481,6 +1509,8 @@ void taskSnapRunner(void *argument)
|
|
|
*/
|
|
*/
|
|
|
imc_cam_power_off();
|
|
imc_cam_power_off();
|
|
|
|
|
|
|
|
|
|
+ imcREQUEST_CHECKPOINT();
|
|
|
|
|
+
|
|
|
// error_count reset
|
|
// error_count reset
|
|
|
error_count = 0;
|
|
error_count = 0;
|
|
|
|
|
|
|
@@ -1568,6 +1598,7 @@ void taskImcTest_2(void *argument)
|
|
|
{
|
|
{
|
|
|
osDelay(2000);
|
|
osDelay(2000);
|
|
|
printf("\tj=%d\r\n", i++);
|
|
printf("\tj=%d\r\n", i++);
|
|
|
|
|
+ // imcREQUEST_CHECKPOINT();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|