GPIO 4 and 10 voltage lower than 3.3V


I noticed that the voltage on GPIO 4 and GPIO 10 are lower than the expected 3.3 when they are driven high.

I measure 2.2V on GPIO 10, and 1.6V on GPIO 4.

Is this within spec? I looked at the documentations but didn’t see any voltage ranges mentioned. If this is expected, is there a way to correct it to 3.3?

Hi @schoi21c It looks like the IOF mode might be enabled and selected as IOF0 (i.e., for a QSPI Flash device). Are pins GPIO4 and GPIO10 in the GPIO mode or the IOF (I/O Function) mode? See Table 51 of the GPIO section of the FE310-G002 Manual. In the IOF0 mode, GPIO4 is SPI1_DQ1; and GPIO10 is SPI1_CS3.

You can enable and disable the IOF mode of a pin by using, respectively,

GPIO_IOF_EN |= (1 << pin)
GPIO_IOF_EN &= ~(1 << pin)

where pin is 0-31, and the GPIO_IOF_EN register is memory mapped at (0x10012000 + 0x38). The GPIO_IOF_SEL register, at offset 0x3C, is also relevant.

Otherwise, another thought is if you have enabled a pin as an output while, at the same time, enabled it’s input mode PUE setting? The block diagram in Figure 10 of the Manual might give some clue about possible signal contention and explain these funny voltage levels.

Hi @pds Thank you for the reply. I had done the experiment with IOF_EN. While they were already set to 0’s at the start up, I cleared the bit 4 and 10 anyway and see if it made any difference, but it didn’t. I also setting DS bits, which did increase the voltage a bit (around 0.2-0.3) but still short of the spec.

I just confirmed that none of the PUE bits were set, as they seem to be all initialized to zeros at the start up.

1 Like

@schoi21c good checking. These two lines are connected to and used by U2A (the WiFi chip) an ESP32-SOLO-1 on the HiFive1 board. The WiFi chip might be active and driving those lines, thus giving you the strange voltage levels.

GPIO4 is the SPI_MISO signal. It is connected through R15 (22 Ohms) to U2A-14, which is an output. GPIO4 is also available on connector pin J3-5.
GPIO10 is the WF_INT signal. It is connected through SJ2 (a Solder Jump) to U2A-24, which is an output. GPIO10 is available on connector pin J4-3.

Can you use other GPIO pins for your experiment? Or, (temporarily) unsolder or cut the connection at SJ2 to confirm, at least for GPIO10, that the GPIO output voltage levels are as you expect?

You can see the connections on the HiFive1 Rev.B Schematic.

Thank you @pds I tried using other GPIO pins, and it works fine. Also, using GPIO4 as a generic SPI bus seems to work as well, so I am not really concerned any more.

I tried to figure out ESP32 itself to the extent why it may be causing the signals, and this led me to a big rabbit hole I am not ready for just yet.