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.
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
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.
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?
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 ?
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.
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.