setup1(), loop1() and rp2040: running code on both RP2040 cores. More...
Classes | |
| class | RP2040FifoClass |
| Passes 32-bit values between the two cores: rp2040.fifo. More... | |
| class | RP2040Class |
| The second core and the chip: rp2040. More... | |
Functions | |
| void | setup1 (void) __attribute__((weak)) |
| Written by the sketch (optional): runs once on core 1, at the same time as setup() on core 0. | |
| void | loop1 (void) __attribute__((weak)) |
| Written by the sketch (optional): runs over and over on core 1 after setup1(). | |
Variables | |
| RP2040Class | rp2040 |
setup1(), loop1() and rp2040: running code on both RP2040 cores.
The RP2040 has two cores. setup() and loop() run on core 0. If the sketch also defines setup1() and loop1(), core 1 runs them at the same time:
The names are those of the arduino-pico core, so multicore sketches written for it build here too (ADR 009).
| Tools > Operating System: None | FreeRTOS (SMP), or with CMSIS-RTOS2 | |
|---|---|---|
| setup()/loop() | core 0, 4 KB stack | task pinned to core 0, 8 KB stack, priority 1 (CMSIS-RTOS2: osPriorityNormal) |
| setup1()/loop1() | core 1, 4 KB stack, started just before setup() | task pinned to core 1, 8 KB stack, priority 1 (CMSIS-RTOS2: osPriorityNormal) |
| delay() | waits, calling yield() | blocks the task: other tasks run |
Both cores share the pins, peripherals and memory:
| void setup1 | ( | void | ) |
Written by the sketch (optional): runs once on core 1, at the same time as setup() on core 0.
Defining setup1() or loop1() starts core 1. Core 1 has its own 4 KB stack (8 KB task stack with FreeRTOS).
|
extern |
The second core, inter-core FIFO and chip information (arduino-pico compatible).