espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.24k stars 7.19k forks source link

Example code ledc_basic, there is a strange problem. Maybe it's a bug. (IDFGH-7059) #8676

Open SuhaylZhao opened 2 years ago

SuhaylZhao commented 2 years ago

Hello everyone,

I need help,I ran this example, and it's very normal. https://github.com/espressif/esp-idf/tree/master/examples/peripherals/ledc/ledc_basic image

But when I changed gpio5 to gpio33, a strange problem occurred. The low level of PWM output is not 0V, but 1.65v, which is about 50% of VCC. Ask for help. Do I need any settings?

image

songruo commented 2 years ago

Hi @SuhaylZhao,

Please provide more details about the module/chip you are using, and the Kit version (for WroverKit/PicoKit/DevKitC).

SuhaylZhao commented 2 years ago

Hi @songruo ,

The Module is Wrover-E.

Chip is ESP32-D0WD-V3 (revision 3) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 44:17:93:e3:77:70

Thanks!

In addition, I found that this may be a hardware problem. I use another esp32 board and burn the same code. Gpio33 pin can also output normal PWM waveform.

But I still feel confused. Why is there such a problem? In one of my products, I connected gpio33 to a buzzer, so I urgently want to know the answer to the problem.

songruo commented 2 years ago

@SuhaylZhao Are you using an ESP32 WROVER KIT? Is there an external 32kHz crystal on the board? GPIO32 and 33 are the pins being used to connect to this external crystal.

SuhaylZhao commented 2 years ago

Hi @songruo ,

I use esp32-wrover-e module, like this: image

There is only one 40MHz crystal oscillator inside. This is circuit diagram. It seems that gpio32 and 33 pins are not connected https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_cn.pdf

songruo commented 2 years ago

@SuhaylZhao Yes, I understand this is the module you are using. But what about the development kit (the one has the module attached on)? If there is a 32kHz crystal, it will be on the development kit board (like this one). Or are you developing your own board for the module?

SuhaylZhao commented 2 years ago

Hi @songruo ,

I use freenove's esp32-wrover-dev, and there is no crystal oscillator outside.

image IMG_2440

songruo commented 2 years ago

@SuhaylZhao I tried but failed to find freenove esp32_wrover_dev board circuit diagram. But as you said, this should be a hardware problem with the development board. If you want to figure out the reason, you probably need to ask freenove for the schematic.

SuhaylZhao commented 2 years ago

Hi @songruo ,

The circuit diagram can be found here: https://github.com/Freenove/Freenove_ESP32_WROVER_Board/blob/main/Datasheet/ESP32_Schematic.pdf