Dual Core Synchronization

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Dual Core Synchronization

Postby PeterR » Sat May 02, 2020 12:37 am

Hi,
Not checked the detail but:
1) Sure an ardunio library may not be thread safe let alone core safe (a lot are decidedly dubious IMHO).
2) No, volatile's is not needed. Volatile means that the write/read must take place not that the operation is atomic. As I understand it any core can take a thread and so its resource (unless you lock the thread to a core) https://docs.espressif.com/projects/esp ... -smp.html. You need a semaphore/lock to control access to shared resources.

If you don't know that the library is thread safe then lock & see. A good library will come with test cases. No multitask test? well you're guess is as good as mine. Used to call code without tests/comments a scribble....
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: snutw_ and 78 guests