Adds support for running code on, and interacting with the second processor core (core 1). More...
Modules | |
fifo | |
Functions for the inter-core FIFOs. | |
doorbell | |
Functions related to doorbells which a core can use to raise IRQs on itself or the other core. | |
lockout | |
Functions to enable one core to force the other core to pause execution in a known state. | |
Macros | |
#define | SIO_FIFO_IRQ_NUM(core) |
Returns the irq_num_t for the FIFO IRQ on the given core. More... | |
Functions | |
void | multicore_reset_core1 (void) |
Reset core 1. More... | |
void | multicore_launch_core1 (void(*entry)(void)) |
Run code on core 1. More... | |
void | multicore_launch_core1_with_stack (void(*entry)(void), uint32_t *stack_bottom, size_t stack_size_bytes) |
Launch code on core 1 with stack. More... | |
void | multicore_launch_core1_raw (void(*entry)(void), uint32_t *sp, uint32_t vector_table) |
Launch code on core 1 with no stack protection. More... | |
Adds support for running code on, and interacting with the second processor core (core 1).
#define SIO_FIFO_IRQ_NUM | ( | core | ) |
Returns the irq_num_t for the FIFO IRQ on the given core.
On RP2040 each core has a different IRQ number: SIO_IRQ_PROC0
and SIO_IRQ_PROC1
. On RP2350 both cores share the same irq number (SIO_IRQ_PROC
) just with a different SIO interrupt output routed to that IRQ input on each core.
Note this macro is intended to resolve at compile time, and does no parameter checking
void multicore_launch_core1 | ( | void(*)(void) | entry | ) |
Run code on core 1.
Wake up (a previously reset) core 1 and enter the given function on core 1 using the default core 1 stack (below core 0 stack).
core 1 must previously have been reset either as a result of a system reset or by calling multicore_reset_core1
core 1 will use the same vector table as core 0
entry | Function entry point |
void multicore_launch_core1_raw | ( | void(*)(void) | entry, |
uint32_t * | sp, | ||
uint32_t | vector_table | ||
) |
Launch code on core 1 with no stack protection.
Wake up (a previously reset) core 1 and start it executing with a specific entry point, stack pointer and vector table.
This is a low level function that does not provide a stack guard even if USE_STACK_GUARDS is defined
core 1 must previously have been reset either as a result of a system reset or by calling multicore_reset_core1
entry | Function entry point |
sp | Pointer to the top of the core 1 stack |
vector_table | address of the vector table to use for core 1 |
void multicore_launch_core1_with_stack | ( | void(*)(void) | entry, |
uint32_t * | stack_bottom, | ||
size_t | stack_size_bytes | ||
) |
Launch code on core 1 with stack.
Wake up (a previously reset) core 1 and enter the given function on core 1 using the passed stack for core 1
core 1 must previously have been reset either as a result of a system reset or by calling multicore_reset_core1
core 1 will use the same vector table as core 0
entry | Function entry point |
stack_bottom | The bottom (lowest address) of the stack |
stack_size_bytes | The size of the stack in bytes (must be a multiple of 4) |
void multicore_reset_core1 | ( | void | ) |
Reset core 1.
This function can be used to reset core 1 into its initial state (ready for launching code against via multicore_launch_core1 and similar methods)