Hiya!
GPIO's are allocated per core in blocks of 4. A block cannot be split across cores. This is roughly described in the documentation. We will update the documentation to provide greater clarity on this point.
You might find this VS Code extension, written by UCL, helpful for peripheral allocation in an application manifest.
In your specific example, GPIO8 and GPIO9 belong to the same GPIO block and therefore cannot be shared between cores.
Again GPIO blocks contain 4 GPIO. Blocks 0, 1, and 2 also double as PWM0, PWM1, PWM2. If PWM0, PWM1, PWM2 are allocated to core, the pins belonging to the respective block should be considered allocated. GPIO blocks are allocated as follows and a block cannot be split across cores.
GPIO Block | GPIOs |
---|---|
0 | GPIO0, GPIO1, GPIO2, GPIO3 |
1 | GPIO4, GPIO5, GPIO6, GPIO7 |
2 | GPIO8, GPIO9, GPIO10, GPIO11 |
3 | GPIO12, GPIO13, GPIO14, GPIO15 |
4 | GPIO16, GPIO17, GPIO18, GPIO19 |
5 | GPIO20, GPI21, GPIO22, GPIO23 |
ISU GPIO are allocated in blocks of 5 and a block cannot be split across cores:
ISU | GPIOs |
---|---|
0 | GPIO26, GPIO27, GPIO28, GPIO29, GPIO30 |
1 | GPIO31, GPIO32, GPIO33, GPIO34, GPIO35 |
2 | GPIO36, GPIO37, GPIO38, GPIO39, GPIO40 |
3 | GPIO66, GPIO67, GPIO68, GPIO69, GPIO70 |
4 | GPIO71, GPIO72, GPIO73, GPIO74, GPIO75 |
I2S GPIO are also allocated in blocks of 5 and a block cannot be split across cores:
I2S | GPIOs |
---|---|
0 | GPIO56, GPIO57, GPIO58, GPIO59, GPIO60 |
1 | GPIO61, GPIO62, GPIO63, GPIO64, GPIO65 |
ADC GPIO are allocated as a single block of 8. The 8 pins can only be used by one core:
ADC | GPIOs |
---|---|
0 | GPIO41, GPIO42, GPIO43, GPIO44, GPIO45, GPIO46, GPIO47, GPIO48 |