Multiple tasks with single core (STM32F750N8H6)

In my project working with the STM32F750N8H6 controller and its single core, i want to run multiple tasks.

1.task1 ADC1
2.task2 ADC2
3.task3 relays operation with user time input
4.task4 RTC
5.task5 UART
6.task6 Nextion Display.
so as off now i ran task1,task2 & task4 simultaneously, and it’s working fine but when I add task4 for relays operation with user time input it blocks everything and nothing was run.
it gives configASSERT error but in freeRTOSconfig.h it’s declared. so if anybody have an idea on this please help me te resolve this.
thank you.

Please post the callstack when the assert fails.

this is the call stack image,

The image you shared says running - please break in the debugger (by pressing the pause button) and then share the callstack.

This is not the callstack of a failed assert. Would you please share the callstack when assert fails? How did you determine that an assert failed?

Actually, one thing Gaurav, I tried the first two tasks with ultasknotify with sensor code it’s not running but when led the tasks it’s working.
i think first i need to debug it.

this is the call stack for first two tasks with ultasknotify

This is not the callstack as it just says that the CPU is running. You get callstack when you break the code in the debugger.

Yes, please do and let us know whatever you find.

Yes, i just put a breakpoint in both tasks while running and in a call back also but the control was not entering into any tasks, and any call back it’s just running.
this is was what made me crazy.

this is call stack when config assert happen

What is the assert that is failing (at line 4963 in tasks.c)?

When the control enter to vTaskNotifyGiveFromISR() for ADC1 reading the control was here as shown in the image and it paused, again when I run it showed running continuously.

The assert means that xTaskNotify is NULL - mostly likely because the interrupt is firing way before the task is created. Can you disable interrupts right at the beginning of main?

Sorry, where should i disable the interrupts.??

Or don’t enable them too early. Have a look at your own call stack posted.
MX_GPIO_Init enables the GPIO interrupts.
Can you move the task creation and your other FreeRTOS resource allocations BEFORE MX_GPIO_Init and other HAL peripheral init functions, which seemingly enable the corresponding peripheral interrupts ?

Thank you. When i kept GPIO_init() after osKernelInitialize(); now it’s working.

But when i add one more task it puts task1 and task2 in a ready state and task3 is running.
In task 3 i am receiving a user input delay and as per that operating relays so when i pressed the button, in task3 relays going to switch based on the user input delay here my ADC1 and ADC2 data reading not happening. but this is what i actually need.
while operating relays i need each and every data of task1 and task2.
so is this possible or not please let me know your suggestions.
thank you.

Your problem is not clear from the text above. Please post minimal code samples and the behavior you expect.




so I need 3 tasks that should run without any switching or interruption.
is this possible with the single-core controller.??

3 tasks should run without switching → if you want to run more than one task on a single core hardware, switching needs to happen. How do you imagine 3 tasks running without any task switch on a single core?

Or do you want to say that the Task 3 should not be switched out when it is controlling relays? If you can describe your problem, we may try to suggest a solution.