2024-03-29 05:31 AM - last edited on 2024-03-29 08:33 AM by SofLit
Hi ,
I am trying to implement FreeRtos in my application with TrustZone enabled.
I want to blink LED1 in task1 and LED2 in task2.
Neither of the task are running.
When I did the debugging in function xTaskCreate it's going into Infinite loop.
My configuration:
FreeRtos-Nonsecure
Stack-128
Heap4
LED1-Nonsecure
LED2-NonSecure
I have attached my configuration and piece of code w.r.t task.
I request anyone to help me resolve this issue .
void MX_FREERTOS_Init(void) {
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* creation of Task1blink */
Task1blinkHandle = osThreadNew(LEDBlink1, NULL, &Task1blink_attributes);
/* creation of Task02 */
Task02Handle = osThreadNew(blinkled02, NULL, &Task02_attributes);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* USER CODE BEGIN RTOS_EVENTS */
/* add events, ... */
/* USER CODE END RTOS_EVENTS */
}
/* USER CODE BEGIN Header_LEDBlink1 */
/**
* @brief Function implementing the Task1blink thread.
* @PAram argument: Not used
* @retval None
*/
/* USER CODE END Header_LEDBlink1 */
void LEDBlink1(void *argument)
{
/* USER CODE BEGIN Task1blink */
/* Infinite loop */
for(;;)
{
Toggle_Pin2();
osDelay(100);
}
/* USER CODE END Task1blink */
}
2024-03-29 08:30 AM - edited 2024-03-29 08:34 AM
Hello,
FreeRtos-Nonsecure
LED1-Nonsecure
LED2-NonSecure
I'm not Security feature expert by why you are enabling TrustZone while your application is non-secure?
And if you disable TrustZone are you facing the same issue?
PS: next time please use </> button to insert your code.
Thanks.
2024-03-31 09:01 PM
Hi,
Thank you for replying to my post.
I am not facing this issue when trustZone is disabled.I am able to run FreeRtos without trustZone.
I am enabling TrustZone in non-secure because I want my product to be UL certified.I want two partition one for critical and non-critical ,Since trustzone enabling gives me two Independent hex files I am trying to run freeRtos in Non-secure region.