Hello again!
Thank you very much for your advice. That helped a lot. What i have done in the main task is:
1) Allocate several Memory-Areas with a Start Pointers. For example
Code: Select all
char *Buf = pvPortMallocCaps(DATA_BUFFER_SIZE, MALLOC_CAP_8BIT);
2) Defined a Struct Type Containing these Pointers.
Code: Select all
typedef struct {
char *BufStartAdress;
...
}paramSet;
3) create a paramSet with that struct type and initialized it with the Memory-Pointers:
Code: Select all
paramSet *ParamPTR = pvPortMallocCaps(8, MALLOC_CAP_32BIT);
ParamPTR->BufStartAdress = Buf;
4) Started one task for each CPU and give them the ParamSet as single Parameter
Code: Select all
xReturned1 = xTaskCreatePinnedToCore(&UartAndOther, "UartAndOther", 2048, ParamPTR, 1, NULL, 0);
xReturned2= xTaskCreatePinnedToCore(&RealTimeThread, "RealTimeThread", 2048, ParamPTR, 25, NULL, 1);
After that the original maintask terminates. I know its possible, to keep all the Uart stuff running from this task, and i dont have to start a new one. Everything works fine, but...unfortunately...i have Problems with the Tick-Event from RTOS. There is a gap of about 5usecs every 1msec (1000HZ) in my test signal which is generated als simple while loop on CPU 1. This is not acceptable in my application. Ive tried a lot without success. So i have to ask if there is one of the following things possible:
a) Starting Programm-Code on CPU1 without RTOS. There is an Option in Menuconfig to rum Rtos on CPU0 only, but then i cant start the task on CPU1. How else can i put code on that RTOS-Disabled CPU1?
b) Disabling RTOS on CPU1 inside the task because there is only this single "task" running.
c) Disabling the Tick-Timer (global interrupt?). The vTaskSuspendAll() function still keeps the ticks.
What i whould like to have is an RTOS controlled Environment on CPU0 with a lot of threads, and a NON-RTOS Enviroment on CPU1 for time crittical GPIO Stuff. I dont intend to use timers or Interrupts on this CPU at all. Its a pure while loop brutforcing incoming and outgoing data on an interface, which is connected to GPIO Pins. The Thread gets controlled over the shared memory given as pointer over via paramset.
It would be creat if you can help me...
Thank you very much
Kind regards
P.S: There are some threads with similar issues in this forum. Maybe this post can be linked to them.
http://esp32.com/viewtopic.php?f=13&t=8 ... rtos#p3373