Page 1 of 1

What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Fri Mar 02, 2018 9:44 pm
by clarkster
I continue to try (unsuccessfully) to connect an rmt output to a gpio AND to a pcnt input. I am still confused by Chapter 4 of the TRM even though some have tried to explain it to me.

It would help if I could find the c code for gpio_matrix_in and gpio_matrix_out. I have searched the esp/components folder and cannot find the source code for these functions. They are not in gpio.c. Where is that code?

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Fri Mar 02, 2018 10:50 pm
by WiFive
They are in rom, no source code. But the problem you are having may be related to certain gpio utility functions disabling input when configuring output and vice versa.

https://github.com/DavidAntliff/esp32-o ... #L413-L423

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Sun Mar 04, 2018 3:43 am
by clarkster
Thanks for your help. I have inspected the GPIO configuration code in rmt.c and in pcnt.c and I think I see how this can happen. I also looked at the newest TRM and you guys have done a good job revising Chapter 4. I think with a little more work I will figure this out.

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Thu Mar 15, 2018 8:19 am
by prout_boudin
Hello,

I'm currently looking for gpio_matrix_in() documentation... I cannot find anything regarding the doc on that... could you help ?

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Fri Mar 16, 2018 2:20 am
by clarkster
Well, as WiFive stated above, the source code is not available, but you can still find information on gpio_matrix_in in multiple places.

The first is gpio.h. It is located in - [Your ESP-IDF Folder] / components / esp32 / include / rom / gpio.h.

Next if you look in your ESP-IDF examples folder you will find several examples that use this instruction: i2c.c, i2s.c, pcnt.c, mcpwn.c, rmt.c, uart.c - and others.

Lastly, Kolban's Book on the ESP32 discusses this instruction. https://leanpub.com/kolban-ESP32

Hope this helps...

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Sun Jan 07, 2024 3:37 am
by SparkyNZ
Whereabouts is the API documentation for gpio_matrix_in() ? I have some third-party code that's using it that won't compile.

Re: What does gpio_matrix_in and gpio_matrix_out do? Where is the code?

Posted: Sun Jan 07, 2024 9:12 pm
by MicroController