In the TRM's section on peripheral output via the GPIO matrix, there are some details that seem to suggest that signals can be steered from one GPIO pin to another GPIO pin. I've used such a technique with Cypress PSoC's and would love to be able to do it with the ESP32!
The GPIO Matrix table shows output signals 224-228 as sig_in_funcN -- but makes no mention of mapping the input side signal.
Does the steering of IO from input to output work? From looking at the API, it wasn't clear that I can make this mapping through calls and that I might have to experiment with writing to the registers directly?
Thanks,
Joseph
Steer GPIO input to GPIO output?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Steer GPIO input to GPIO output?
If memory serves, you can use the same numbers (224-228) for inputs as well.
Re: Steer GPIO input to GPIO output?
Yes it works.
An example which routes the incoming signal on input pin GPIO_NUM_INPUT (#14) to the output pin corresponding with the on-board LED (#13) of an Huzzah32 dev board:
Code: Select all
// @doc Only the loopback signals 224-228 can be configured to be routed from one input GPIO and directly to another output GPIO.
gpio_matrix_in(GPIO_NUM_INPUT, SIG_IN_FUNC228_IDX, false);
gpio_matrix_out(HUZZAH32_GPIO_NUM_LED, SIG_IN_FUNC228_IDX, false, false);
--
Paul.
Paul.
-
- Posts: 5
- Joined: Thu Jan 31, 2019 6:02 pm
Re: Steer GPIO input to GPIO output?
Terrific. Thank you everyone!
Paul, thank you for posting the code snippet -- I was able to drop that into my ESP32/Arduino code and use it right away, making the ESP32 act as a serial loopback for the FTDI USB/serial interface that is connected to it, and then extending that further to be a cross-point between multiple serial devices. This gives me a great starting place to finish the rest of my design!
Paul, thank you for posting the code snippet -- I was able to drop that into my ESP32/Arduino code and use it right away, making the ESP32 act as a serial loopback for the FTDI USB/serial interface that is connected to it, and then extending that further to be a cross-point between multiple serial devices. This gives me a great starting place to finish the rest of my design!
Who is online
Users browsing this forum: No registered users and 110 guests