Route input GPIO to output GPIO via IO Mux or GPIO Matrix?

meowsqueak
Posts: 151
Joined: Thu Jun 15, 2017 4:54 am
Location: New Zealand

Route input GPIO to output GPIO via IO Mux or GPIO Matrix?

Postby meowsqueak » Thu Jan 18, 2018 3:02 am

Somewhat of an academic question: is it possible to use the GPIO Matrix or IO Mux to somehow send an incoming level on an input GPIO to an output GPIO?

I know this is a bit strange - why not just electrically connect the circuit on the output GPIO to the input signal, you may ask - what I'm considering here is directing an incoming signal level (on, say, GPIO 5) to the onboard LED (which is GPIO 2 in my case), so that there is a visual indicator of the signal. I'm using PCNT to count the input signal, and I don't think there's a pass-through output that I can route to GPIO 2. The signal may be fast (up to kHz) so I can't really drive GPIO 2 in software. I could (and do) use an external LED, however the onboard LED is just sitting there so I was wondering if I could drive it in this manner.

Part of this is just my curiosity around the IO Mux & GPIO Matrix and knowing whether this is possible will help my understanding of these subsystems.


meowsqueak
Posts: 151
Joined: Thu Jun 15, 2017 4:54 am
Location: New Zealand

Re: Route input GPIO to output GPIO via IO Mux or GPIO Matrix?

Postby meowsqueak » Mon Jan 22, 2018 9:56 pm

Thanks for that link, it's exactly what I needed to see.

Code: Select all

    // route incoming frequency signal to onboard LED
    gpio_matrix_in(GPIO_FREQ_SIGNAL, SIG_IN_FUNC228_IDX, false);
    gpio_matrix_out(GPIO_LED, SIG_IN_FUNC228_IDX, false, false);
Works perfectly.

User avatar
rudi ;-)
Posts: 1698
Joined: Fri Nov 13, 2015 3:25 pm

Re: Route input GPIO to output GPIO via IO Mux or GPIO Matrix?

Postby rudi ;-) » Thu Feb 08, 2018 4:11 am

+1
same here - exactly option what i did searched :)
txs @WiFive for your reminder at this theme.

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: HamGuy, OSCPUDEV and 97 guests