Page 1 of 1

Sending a task notification from core0 to core1 question

Posted: Mon Dec 01, 2025 12:03 pm
by vvb333007
Hello,

Recently I found that if I send task notifications from one core to another (1 task is running on core 1 and second is on core0) it doesn't work.
When both task are on the same core (doesn't matter 0 or 1) they can send notifications and wait for them. But when these task are on different cores - it stops working.

Tasks are pinned to cores.

Is this expected behaviour or I did something wrong?

Re: Sending a task notification from core0 to core1 question

Posted: Tue Dec 02, 2025 2:52 am
by Sprite
No, that's not expected behaviour. If you have example code that reliably reproduces this, you can file an issue and we'll take a look at it. If you're not sure, feel free to post your code here as well.

Re: Sending a task notification from core0 to core1 question

Posted: Tue Dec 02, 2025 9:20 am
by MicroController
Make sure the sending task uses the correct task handle value to notify. Storing/reading it to/from a global variable for example can cause a race condition where the sending task does not see the most recent value.

Re: Sending a task notification from core0 to core1 question

Posted: Tue Dec 02, 2025 5:49 pm
by vvb333007
Oh I found the issue.

Notification are received but when I tried to printf() that printf() just disappeared.
Deeper search showed that output from core#0 in case of USB-CDC can be lost.
It is a known bug: if you initialize USB-CDC on Core#1, don't expect that your printfs on Core#0 will work.