@@ -37,6 +37,11 @@ Pausing Cores
37
37
38
38
Sometimes an application needs to pause the other core on chip (i.e. it is
39
39
writing to flash or needs to stop processing while some other event occurs).
40
+ In most cases, however, these calls are **SHOULD NOT BE USED **. To synchronize
41
+ cross-core operations use normal multiprocessor methods such as circular buffers,
42
+ global ``volatile `` flags, mutexes, and the like. Stopping a core has massive
43
+ implications and can kill networking and USB communications if done too long or
44
+ too frequently.
40
45
41
46
void rp2040.idleOtherCore()
42
47
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -69,7 +74,12 @@ Communicating Between Cores
69
74
The RP2040 provides a hardware FIFO for communicating between cores, but it
70
75
is used exclusively for the idle/resume calls described above. Instead, please
71
76
use the following functions to access a software-managed, multicore safe
72
- FIFO.
77
+ FIFO. There are two FIFOs, one written to by core 0 and read by core 1, and
78
+ the other written to by core 1 and read by core 0.
79
+
80
+ You can (and probably should) use shared memory (such as ``volatile `` globals)
81
+ or other normal multiprocessor communication algorithms to transfer data or
82
+ work between cores, but for simple tasks these FIFO routines can suffice.
73
83
74
84
void rp2040.fifo.push(uint32_t)
75
85
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -96,4 +106,4 @@ Reads a value from this core's FIFO and places it in dest. Will return
96
106
int rp2040.fifo.available()
97
107
~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
108
99
- Returns the number of values available in this core's FIFO.
109
+ Returns the number of values available to read in this core's FIFO.
0 commit comments