Hello, I am trying to use the JTAG header pins as GPIO pins on a Lyra-T board.
I have switched the DIP switches as per the Hardware Ref to enable JTAG (DIP switches 3 to 7 ON).
I want to run two rotary encoders using the four available pins (earth being provided on a power rail). I am using the ESP-IDF, my code works fine on an ESP32 board. Obviously I have changed the pin numbers to suit the Lyra-T.
The encoder connected to JTAG pins 3 and 4 (WTDI, GPIO 12 and WTMS, GPIO14) works, the encoder connected to JTAG pins 1 and 2 (WTDO, GPIO 15 and WTCK, GPIO15) doesn't. Swapping them over gives the same result so it is not a faulty encoder.
Any ideas why this would be, and how to fix it?
(I'm assuming that the JTAG header is the best option to use - I will have a display connected to the I2C header, and the other headers seem to have multiple uses).
Thanks!
Using GPIO pins on a Lyra-T board
Re: Using GPIO pins on a Lyra-T board
I check the schemaitc, IO13 is also used in Touch, IO15 is also used in SD card, are you sure in your code these two peripherals not work simultaneously?
Re: Using GPIO pins on a Lyra-T board
Thanks for the reply.
I think the SD card is disabled with the DIP switches in that configuration, so Pin 15 should be okay?
Yes, the 'Allocation of ESP32 pins' section of the Hardware Reference doc says that Pin 13 is also used for the Vol- touch pad. Presumably this is the issue.
Is there any way around this? Another way to get the other two pins?
I am basically looking to use two rotary encoders - one to change the radio station, the other to change the volume. I have to use physical parts rather than a web interface.
Thanks!
(Typo/correction - in my original post that should have been '...the encoder connected to JTAG pins 1 and 2 (WTDO, GPIO 15 and WTCK, GPIO13) doesn't...'. The pins are correct in my code!)
I think the SD card is disabled with the DIP switches in that configuration, so Pin 15 should be okay?
Yes, the 'Allocation of ESP32 pins' section of the Hardware Reference doc says that Pin 13 is also used for the Vol- touch pad. Presumably this is the issue.
Is there any way around this? Another way to get the other two pins?
I am basically looking to use two rotary encoders - one to change the radio station, the other to change the volume. I have to use physical parts rather than a web interface.
Thanks!
(Typo/correction - in my original post that should have been '...the encoder connected to JTAG pins 1 and 2 (WTDO, GPIO 15 and WTCK, GPIO13) doesn't...'. The pins are correct in my code!)
Re: Using GPIO pins on a Lyra-T board
I don't understand this, as the hardware reference says that (after JTAG is enabled)
Is anyone here from Espressif who could explain this?
Thanks, Peter
So surely Pin 13 should be available for me to use too?Vol- touch button is not available for use with the API
Is anyone here from Espressif who could explain this?
Thanks, Peter
Re: Using GPIO pins on a Lyra-T board
I am not good at software, so it is just an idea, could you make sure if JTAG function is disabled in code? Another is maybe a pull-down at GPIO13 will affect I2C signals?
Re: Using GPIO pins on a Lyra-T board
Thanks for the reply. I'm not much good with software either (or hardware! )
I think I'm going to try I2C rotary encoder boards. They should only need one (interrupt) pin each, which hopefully will work with the JTAG pins that are functioning.
I've had an OLED display running on the I2C header so I know that it works okay.
I'll report back (for anyone finding this is the future).
Cheers,
Peter
I think I'm going to try I2C rotary encoder boards. They should only need one (interrupt) pin each, which hopefully will work with the JTAG pins that are functioning.
I've had an OLED display running on the I2C header so I know that it works okay.
I'll report back (for anyone finding this is the future).
Cheers,
Peter
Who is online
Users browsing this forum: No registered users and 59 guests