Then you should be able to write a minimal application to repro the problem: one task which sends data to the stream buffer and other task which receives the data from the stream buffer. If you can do that and share the application, I can give it a try on a different hardware.
My hardware is somewhat new and probably different. Currently it’s WCH CH32V317 MCU with QuingKe4F CPU core. It lacks RISC-V mtime timer and it’s comparator but has SysTick like in ARM Cortex-M cores but 64 bit wide. So the context switching is done though timer interrupt or software interrupt (SWI) depending on the moment the switch is needed.
I can imagine that the problem is in the port itself. Something related to critical sections, task switching or tick timer interrupt control.
Not sure my example will not run on your hardware.
Can you describe the process of task notification to let me investigate my port problem (or RTOS problem if any)?
This tiny test even without hardware initialization and interrupt enabling except the port code exhibits the same behavior: xDebugUART task is in eSuspended state and usNotifyState value is 2 which is taskNOTIFICATION_RECEIVED.
What should I check in my port to debugging that?
I do not know if this still applies to the current state of the problem report, but note that both critical sections and Suspend/ResumeAll are like nuclear war heads shooting at robins and should be avoided. It seems as if your use case cries for muteces. By suspending ALL tasks, you a) risk very subtle deadlocks even between tasks that do not care about the resources you need to protect and b) do not have any control over where all of your tasks are in their control flow.
Thanks for an opinion. Currently I flattened the code to absolute minimum with no critical sections and with no suspending on user part. But the problem persists
you should definitely check for the return values of your calls to xStreamBufferSend() to get an idea of how the buffer fills and whether you run into conditions where the receiver starves out or something the like. Do NOT use debug output for that but in-memory counters or message arrays that you can evaluate posthumously.