Search found 11 matches
- Sat Nov 22, 2025 11:31 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Re: Switching between OUTPUT and INPUT_PULLUP using registers
It turns out that Arduino pinMode(pin, OUTPUT) puts the GPIO pin in GPIO_INPUT_OUTPUT mode, that is, in driven rather than open drain mode. If you read the pin configuraton with gpio_config_t then both input and output are turned on, but the 'od' and is not. Switching from input to input_output ...
- Thu Nov 13, 2025 6:31 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Re: Switching between OUTPUT and INPUT_PULLUP using registers
a) There's basically no reason to ever disable the input functionality of a pin. Enable input on any pins you may want to read input from at some point, and that's it.
b) There's no reason to disable the pull-ups in your case. Just keep them enabled.
c) Unless you need a strong 'high' output, you ...
- Thu Nov 13, 2025 12:02 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Re: Switching between OUTPUT and INPUT_PULLUP using registers
I appreciate the feedback, but sorry, but that makes absolutely no sense to me at all.
You'll get there eventually ;-)
Thank you!
Btw.:
Are you sure you actually need to activate/de-activate output on the pins? It sounds like the other end is using open-drain outputs, in which case the ...
- Tue Nov 11, 2025 10:13 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Re: Switching between OUTPUT and INPUT_PULLUP using registers
Every pin has its own IO_MUX_... register, see "6.12.2 IO MUX Register Summary" and "6.13.2 IO MUX Registers" in the TRM v5.5.
Will check those sections out.
Notice that you can just set FUN_IE once (e.g. via gpio_input_enable() ) and then forget about it while still being able to ...
- Tue Nov 11, 2025 5:16 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Re: Switching between OUTPUT and INPUT_PULLUP using registers
You never seem to enable input for any of the pins.
However, it is necessary to enable the input in the IO MUX by setting the FUN_IE bit in the IO_MUX_x_REG register corresponding to pin X
Funnily enough, I did wonder whether I had to set the GPIO function somewhere. Having had a look at ...
- Tue Nov 11, 2025 2:56 pm
- Forum: General Discussion
- Topic: Switching between OUTPUT and INPUT_PULLUP using registers
- Replies: 10
- Views: 3070
Switching between OUTPUT and INPUT_PULLUP using registers
I have written a couple of functions to set pull-ups and switch between GPIO pins between input and although they work on Wokwi, they don't work on a real ESP32. I am curious as to what I may be missing?
The genGpioMask() function is creating the pin mask correctly, setting the appropriate bits ...
The genGpioMask() function is creating the pin mask correctly, setting the appropriate bits ...
- Sat Jun 14, 2025 2:54 pm
- Forum: Hardware
- Topic: ESP32C2 - understanding the CDC port
- Replies: 1
- Views: 103
Re: ESP32C2 - understanding the CDC port
I have been able to replicate the problem with a simple sketch in the Arduino IDE:
This, using the well known Arduino method works (some of the time):
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello");
delay(1000);
}
This, using the USB CDC library doesn't give ...
This, using the well known Arduino method works (some of the time):
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello");
delay(1000);
}
This, using the USB CDC library doesn't give ...
- Sat Jun 14, 2025 12:03 pm
- Forum: Hardware
- Topic: ESP32C2 - understanding the CDC port
- Replies: 1
- Views: 103
ESP32C2 - understanding the CDC port
I am trying to understand the workings of the CDC port on an ESP32. I am working on a project where the ESP is connected via USB directly to the PC. There is no UART.
The port is set up in the program as follows:
mySerial =(Stream*) &(UsbCdcSerial);
UsbCdcSerial.begin();
USB.begin();
In ...
The port is set up in the program as follows:
mySerial =(Stream*) &(UsbCdcSerial);
UsbCdcSerial.begin();
USB.begin();
In ...
- Tue Aug 23, 2022 11:21 am
- Forum: General Discussion
- Topic: ESP32 WiFiClientSecure unreliable
- Replies: 0
- Views: 949
ESP32 WiFiClientSecure unreliable
Is WiFiClientSecure/WiFiClient on the ESP32 known to be unreliable? I ask because it seems to fail more often than not when making a connection to a server and several re-tries are usually required. My Code has 3 re-tries, but it still quite frequently fails to make a connection.
Can I aslo ask ...
Can I aslo ask ...
- Thu Aug 18, 2022 7:50 am
- Forum: ESP-IDF
- Topic: Arduino component
- Replies: 2
- Views: 1280
Re: Arduino component
Thank you for the reply.
So how do I get 4.x.x?
I followed the download instructions here and automatically got 5.x.x.:
https://docs.espressif.com/projects/esp ... setup.html
So how do I get 4.x.x?
I followed the download instructions here and automatically got 5.x.x.:
https://docs.espressif.com/projects/esp ... setup.html