Matrix voice GPIO

Hi everyone,

Sorry if I create a duplicate but I was not able to find what I search for maybe I don’t used the right keywords.

I use a matrix voice without the wifi module and with a raspberry pis 3 model b

So here’s my question, I want to add sensors and button on my raspberry pi to manage the audio like play pause volume. But I’m not able to get it work using python And wirringpi module.

I look the technical sheet on the matrix website but I do not understand the gpio schema to get the right port.

So I wonder if someone has the same issue ?

For instance, I add a push button I try multiple gpio physically and programmatically but no one seems to work.

Thank you

if you want you could use my python matrixio hal. but it is not working for the voice, but the creator had a similar bug, when i first tried to use the gpio pins, or maybe they can not be accessed through SPI. The ESP32 Pins (GPIO16-19) are working and can be used in the esp firmware.

@kevindpatino can you verify that gpio is working on the voice with the current cpp hal drivers (maybe the voice is using the old spi address) and the pinout description seems to be wrong for the 3.3v and 5.0v it is on the opposide on my board.

1 Like

I also would like to know the answer to this. If someone could respond, it would be helpful. Your pinout is confusing. In this post, it says the DF### is equivalent to GPIO##

but in your pinout, it says, for example, that on the rpi pinout, GPIO5 is connected to FPGA P7, however on the external connector it says DF5 is connected to FPGA J3??


  • Are DF## the same as GPIO##?
  • and why do the rpi pins differ from the external GPIO pins?
  • Do I have to worry about the FPGA? can I mess it up by plugging in signals to the GPIO?

I just want to read a high/low from a signal. I see your HAL source code, but I don’t understand where I am supposed to connect my signal physically on the board. Is it safe to just put it in e.g. DF5? and then I read pin 5 from the hal and expect to see my signal?

also are the GPIO pins at 5v or 3.3?

In both boards, MATRIX Creator and Voice, the GPIO 3.3v.

Good question :slight_smile:

Thanks @yoelrc88.
Any comment on my previous question above?

1 Like

I have the same doubt about the connection of the external GPIO’s of the matrix voice and pinout of the raspberry pi, i need to use the SPI protocol to interact with an RFID system, but i’m struggling with the hardware. Could someone assist me ? @yoelrc88 @loom

hmm have a look at the

do you have the esp version? if not maybe you can wireup the voice without using the esp pins to get an alternative chip select pin on the pi. or if you have the esp version maybe you can run the spi stuff on the esp using the 4 external esp gpios on the expansion gpio and program the esp32 to do you RFID stuff.

on my last tests with the voice the esp pinouts worked but not the other ones mapped to the fpga (DF0-DF15). the creator fpga firmware maps these expansion gpios to the pi as extra gpios, but the voice firmware didn’t do this, maybe this got fixed and you can use them for a software spi implementation.

you can check if the matrixio-gpio kernel module exports an extra gpiochip like the gpiochip2 on a creator setup:

in the above example you can address the gpios on the expansion gpios with the ids from 496 to 511 (creator) maybe this is also working on the voice and you get extra gpios from the voice expansion gpio.

Hi @Monstruo,

Welcome to the community!

More About the MATRIX Voice GPIOs:
The expansion GPIOs, DF0 to DF15, on the MATRIX Voice are not currently connected to any Raspberry Pi GPIOs. They have their own GPIO pin infrastructure coded in the FPGA, and can be programmed through our software libraries. For example, in MATRIX Lite JS, these are the function references.

SPI, and I2C are not currently features of these expansion GPIOs. There are four ESP32 GPIOs that are also exposed in that expansion, as you will find in the link @loom posted above.

Some of the Raspberry Pi’s GPIOs are used by the MATRIX Voice such as SPI0, and UART pins. Many of the Raspberry Pi’s GPIOs are connected to the FPGA in the PCB, but are currently not performing any function. This allows flexibility with leveraging those Pi GPIOs through FPGA programming.

How you could leverage SPI:
In addition to what loom mentioned, it might also be possible to expose the Raspberry Pi’s SPI1 buses to some of the MATRIX Voice expansion GPIOs for use in your RFID example. In this case, you would have to use existing Raspberry Pi SPI libraries to program it.

I posted this FPGA bit file for another community member who needed Raspberry Pi’s I2S exposed. Interestingly enough, it seems the same pins can be used for SPI1 as shown here. You can enable SPI1 on the Pi by modifying the contents of /boot/config.txt as shown here.

I haven’t yet tried this myself, but I can let you know if it works for me after some testing.


This is cool, but the public FPGA-Code is still missing the mic DSP sources, so for the most people out there building an own version with missing mic DSP is no option. But i’m not very deep into the FPGA sources and it’s still useful without the mic DSP stuff. :slight_smile:

1 Like


You are correct, having the DSP IP closed is definitely a limitation. Hopefully, we will open this up in the future, but that discussion is ongoing.

For now, we are looking into maybe isolating the mic DSP, so that users are free to program the rest of the FPGA without overwriting the DSP. I am not knowledgeable enough about FPGAs to know if/how this would work, but we are open to ideas if anyone has them!


Hi @loom,

I remember you mentioned you were not very deep into FPGA programming, but it has now been fully open sourced for if you do want to look into it in the future!


Hi @Samreen,

nice! Now it’s time to search for the old vhdl book and my ise dev license. :slight_smile:

Thank you for releasing it as open source!