Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back. Shamelessly copied from (BSD-3-Clause license): https://github.com/raspberrypi/pico-examples/tree/master/multicore/multicore_runner.
More...
Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back. Shamelessly copied from (BSD-3-Clause license): https://github.com/raspberrypi/pico-examples/tree/master/multicore/multicore_runner.
◆ BAUD_RATE
◆ core1_entry()
Main function for core 1 (secondary core).
- Returns
- Irrelevant (but can be inspected by the debugger).
◆ factorial()
int32_t factorial |
( |
int32_t | n | ) |
|
Compute factorial.
- Parameters
-
[in] | n | Compute factorial of n. |
- Returns
- Factorial of n.
◆ fibonacci()
int32_t fibonacci |
( |
int32_t | n | ) |
|
Compute n-th Fibonacci number.
- Parameters
-
[in] | n | Compute factorial of n. |
- Returns
- n-th Fibonacci number.
◆ main()
Set up the second core to accept, and run, any function pointer pushed into its ICC FIFO. Push in a few pieces of code and get answers back.
- Warning
- This program requires the dual-core configuration, the CLINT and UART0.
- Note
- This program was "inspired" by https://github.com/raspberrypi/pico-examples/tree/master. BSD-3-Clause license.
- Returns
- Irrelevant (but can be inspected by the debugger).
◆ core1_stack
volatile uint8_t core1_stack[2048] |