Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4151

SDK • Re: Second core not used after exiting method

$
0
0
It looks like a crash, some overflow or out of memory (or fragmentation).
Care should be taken with calling C library functions from both cores simultaneously as they are generally not designedto be thread safe. You can use the mutex_ API provided by the SDK in the pico_sync library (mutex) from within your own code.
NOTE
That the SDK version of printf is always safe to call from both cores. malloc, calloc and free are additionally wrapped to make it thread safe when you include the pico_multicore as a convenience for C++ programming, where some object allocations may not be obvious.

Statistics: Posted by gmx — Sat Oct 05, 2024 12:19 am



Viewing all articles
Browse latest Browse all 4151

Trending Articles