SPI3/SE5 interface from MCU to MPU available?

Hi, I would like to contribute to library developments. I saw on the schematics and datasheet that there’s a SPI interface between the two units. Is this SPI available for user or is it being used by Arduino’s software?

Thanks.

Hi @mstackoverflow,

Thanks for your interest in contributing to the project. Unfortunately, that SPI interface is currently not functional.

You may be interested in adding features to the mechanism that allow the MPU to communicate with the MCU. In that case, it is currently implemented via a MsgPackRPC-based architecture covered in the following repos. I would start from there.

Sketch side

App Lab side

Linux side

the link doesn't work

Hi, @manchuino, thanks for the response.

Yes, I would like to see the RPC lib works with SPI, like the portenta x8 seems to be able to do (or maybe the works is already in progress by the arduino team?)

When you say “that SPI interface is currently not functional.” , is that because it’s not yet included in the device tree?

It seems https://github.com/arduino/arduino-router returns 404, maybe a permission configuration?

1 Like

hi, @mstackoverflow . I found this:

  • The Bridge object is pre-defined on Serial1 and automatically initialized inside the main setup()

this is the url : (GitHub - arduino-libraries/Arduino_RouterBridge: A wrapper of Arduino_RPClite, specific for the Arduino UNO Q. It provides a better UX and API for sketches.)

The reason is that the repository is currently private. The developers want to make to make sure the codebase and documentation is in a state where it will be friendly for use and contributions by the community before publishing. They plan to make it public soon.

We'll make sure to post a notification here once that is done.

2 Likes

Sorry, friends,

The arduino-router repo will be public soon. Stay tuned.

2 Likes

Thanks! I guess we’ll have to wait for the SPI to be available in a new image.

I recommend sticking to the UART and to the Arduino official Bridge interface.

@mstackoverflow the SPI is fully functional (hardware-wise), we are just postponing the firmware support a little bit since it also needs some userspace linux plumbing to be operational (spidev and its abstractions). Of course we’ll communicate in the usual channels as soon as we have something that can be tested :wink:

3 Likes

Alright! Keep up the good work guys, it's a nice product. I played with it a little bit and I quite like how unique the stack is. It really feels like an Arduino product.

3 Likes

:tada: The source code repository of arduino-router has now been published:

3 Likes

Incredible!

You guys are awesome!

1 Like

Hi @facchinm

Has there been any progress on this?

Thanks

Andy

1 Like

Looks like there has been some progress on this. Seems like they added support into the core:

unoq: enable spi peripheral interface by facchinm · Pull Request #383 · arduino/ArduinoCore-zephyr

I tried to implement it on the 4gb by rebuilding the core but haven't had much luck. But some of it may be unfamilarity with linux etc. See: unoq: enable spi peripheral interface by facchinm · Pull Request #383 · arduino/ArduinoCore-zephyr · GitHub

or copied below:

@facchinm - @pillo79 - @KurtE

Just added this to the Q build I am working with and having issues with getting spidev installed.

Tried your method but it only works when venv is configured. I I try to do it outside the venv I will get an error when trying to install spidev

pip install spidev
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.13/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

So if I then do a sudo apt install python3-spidev and try your sample script (note it loads 3.6 not 3.8)

arduino@arduinoQ4:~/Arduino/hardware/arduino/zephyr$ python3
Python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import spidev
>>> spi = spidev.SpiDev()
>>> spi.open_path("/dev/spidev0.0")
Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    spi.open_path("/dev/spidev0.0")
    ^^^^^^^^^^^^^
AttributeError: 'SpiDev' object has no attribute 'open_path'
>>> exit

In addition if I try this from ArduinoApp:

Using CPython 3.13.9 interpreter at: /usr/local/bin/python
Creating virtual environment at: .cache/.venv
Activating python virtual environment
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Using Python 3.13.9 environment at: .cache/.venv
Resolved 1 package in 231ms
Building spidev==3.8
× Failed to build `spidev==3.8`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-313
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
-Wall -fPIC -I/app/.cache/uv/builds-v0/.tmpnlaM2M/include
-I/usr/local/include/python3.13 -c spidev_module.c -o
build/temp.linux-aarch64-cpython-313/spidev_module.o
[stderr]
/app/.cache/uv/builds-v0/.tmpnlaM2M/lib/python3.13/site-packages/setuptools/dist.py:765:
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

********************************************************************************
Please consider removing the following classifiers in favor of a
SPDX license expression:
License :: OSI Approved :: MIT License
See
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
for details.

********************************************************************************
!!
self._finalize_license_expression()
error: command 'gcc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build
environment.
Clearing cache at: .cache/uv
Removed 467 files (4.1MiB)
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Using CPython 3.13.9 interpreter at: /usr/local/bin/python
Creating virtual environment at: .cache/.venv
Activating python virtual environment
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Using Python 3.13.9 environment at: .cache/.venv
Resolved 1 package in 180ms
Building spidev==3.8
× Failed to build `spidev==3.8`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-313
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
-Wall -fPIC -I/app/.cache/uv/builds-v0/.tmp6vUJmF/include
-I/usr/local/include/python3.13 -c spidev_module.c -o
build/temp.linux-aarch64-cpython-313/spidev_module.o
[stderr]
/app/.cache/uv/builds-v0/.tmp6vUJmF/lib/python3.13/site-packages/setuptools/dist.py:765:
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

********************************************************************************
Please consider removing the following classifiers in favor of a
SPDX license expression:
License :: OSI Approved :: MIT License
See
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
for details.

********************************************************************************
!!
self._finalize_license_expression()
error: command 'gcc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build
environment.
Clearing cache at: .cache/uv
Removed 467 files (4.1MiB)
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Requirements already installed.
Using Python 3.13.9 environment at: .cache/.venv
Resolved 1 package in 157ms
Building spidev==3.8
× Failed to build `spidev==3.8`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-313
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
-Wall -fPIC -I/app/.cache/uv/builds-v0/.tmprP2Tz3/include
-I/usr/local/include/python3.13 -c spidev_module.c -o
build/temp.linux-aarch64-cpython-313/spidev_module.o
[stderr]
/app/.cache/uv/builds-v0/.tmprP2Tz3/lib/python3.13/site-packages/setuptools/dist.py:765:
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

********************************************************************************
Please consider removing the following classifiers in favor of a
SPDX license expression:
License :: OSI Approved :: MIT License
See
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
for details.

********************************************************************************
!!
self._finalize_license_expression()
error: command 'gcc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build
environment.
Clearing cache at: .cache/uv
Removed 466 files (4.1MiB)
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Requirements already installed.
Using Python 3.13.9 environment at: .cache/.venv
Resolved 1 package in 238ms
Building spidev==3.8
× Failed to build `spidev==3.8`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-313
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
-Wall -fPIC -I/app/.cache/uv/builds-v0/.tmpq1TnX8/include
-I/usr/local/include/python3.13 -c spidev_module.c -o
build/temp.linux-aarch64-cpython-313/spidev_module.o
[stderr]
/app/.cache/uv/builds-v0/.tmpq1TnX8/lib/python3.13/site-packages/setuptools/dist.py:765:
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

********************************************************************************
Please consider removing the following classifiers in favor of a
SPDX license expression:
License :: OSI Approved :: MIT License
See
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
for details.

********************************************************************************
!!
self._finalize_license_expression()
error: command 'gcc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build
environment.
Clearing cache at: .cache/uv
Removed 466 files (4.1MiB)
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
No cache found at: .cache/uv
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
Activating python virtual environment
Requirements already installed.
No cache found at: .cache/uv
Traceback (most recent call last):
File "/app/python/main.py", line 2, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
exited with code 1


Any suggestions.....

More plumbing needed?

1 Like

Probably, but maybe beyond my pay grade :laughing:

1 Like

Just use this. It will not break anything. I'm using it constantly, don't know why Debian perverted everything

And remove that Debian package ofc

Thanks - gave it a try but still doesnt work - spidev seems to have issues with applab

@Merlin513 @mstackoverflow @ptillisch - Wondering if we should either mark this
thread as not solved, or move some of this to a new thread.

Merlin... I am trying out your stuff. I created a quick and dirty requirements.txt file in
the python sketch, cleared out the buffers, and cache and tried running and python
errored with:

Using CPython 3.13.9 interpreter at: /usr/local/bin/python
Creating virtual environment at: .cache/.venv
Activating python virtual environment
Using Python 3.13.9 environment at: .cache/.venv
Resolved 1 package in 399ms
Building spidev==3.8
× Failed to build `spidev==3.8`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-313
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3
-Wall -fPIC -I/app/.cache/uv/builds-v0/.tmpfvcfz7/include
-I/usr/local/include/python3.13 -c spidev_module.c -o
build/temp.linux-aarch64-cpython-313/spidev_module.o
[stderr]
/app/.cache/uv/builds-v0/.tmpfvcfz7/lib/python3.13/site-packages/setuptools/dist.py:765:
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

********************************************************************************
Please consider removing the following classifiers in favor of a
SPDX license expression:
License :: OSI Approved :: MIT License
See
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
for details.

********************************************************************************
!!
self._finalize_license_expression()
error: command 'gcc' failed: No such file or directory
hint: This usually indicates a problem with the package or the build
environment.
Clearing cache at: .cache/uv
Removed 467 files (4.1MiB)
Traceback (most recent call last):
File "/app/python/main.py", line 4, in <module>
import spidev
ModuleNotFoundError: No module named 'spidev'
exited with code 1

Note: I also earlier in a command prompt installed: sudo apt install python3-spidev

Get:1 http://deb.debian.org/debian trixie/main arm64 python3-spidev arm64 3.6-1+b6 [14.4 kB]
Fetched 14.4 kB in 0s (100 kB/s)
Selecting previously unselected package python3-spidev.
(Reading database ... 78092 files and directories currently installed.)
Preparing to unpack .../python3-spidev_3.6-1+b6_arm64.deb ...
Unpacking python3-spidev (3.6-1+b6) ...
Setting up python3-spidev (3.6-1+b6) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

So first I am going to try to set the spidev==3.6 and see if it works.

Else wondering about the message: error: command 'gcc' failed: No such file or directory

Edit I tried with 3.6 version as well and it errored the same way (other than the version number)

Building spidev==3.6
× Failed to build `spidev==3.6

You are pretty much going the same things I tried with no luck.

As for the gcc error think its related to spidev_module.c not being found? Just a guess but not sure why.

1 Like