[freeRTOS] Second Task creation issue and control stuck everytime in port.c file only

Hi Support Team,

Project Name: freeRTOS integration with the WiFi module’s code using the STM32H743ZI

I am trying to integrate the freeRTOS library with one of the WiFi modules by using the host MCU STM32H743ZI. I am using the STM32cube IDE.

I generated the freeRTOS middleware and integrated the code successfully. I have created the 2 tasks like Application task and the Driver task. I gave a higher priority to the Driver task as compared to the Wireless task.

This is the configuration that I am using:
#define RSI_APPLICATION_TASK_PRIORITY 1 // Wlan task priority
#define RSI_DRIVER_TASK_PRIORITY 2 // Wireless driver task priority

#define RSI_APPLICATION_TASK_STACK_SIZE (512 * 2) // Wlan task stack size
#define RSI_DRIVER_TASK_STACK_SIZE (512 * 2) // Wireless driver task stack size

I am able to create the first task (RSI_APPLICATION_TASK_PRIORITY) and after that, I called the OS Task scheduler. later I am trying to create the second task (RSI_DRIVER_TASK_PRIORITY), and there my control goes into an infinite loop. After suspending the debug mode I saw my control always goes into the below (if condition) part which is available in the port.c file:
if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )

For reference, I have attached here the port.c file and freeRTOS .ioc file images.

Please help me to resolve this issue.

Thanks in advance.

Regards,
Kaniaya Sharma

Probably the HW interrupt priority set in NVIC is incorrect.
Have a look at this related documentation:

and this very good forum posts:

Hi Hartmut,

Thanks for your reply.
I did the mistake in the API (HAL_NVIC_SetPriority(EXTI3_IRQn, GPIO_PIN_3, 0);), I configured the interrupt pin wrongly. Now it’s working for me.

Regards,
Kanaiya Sharma