Page 1 of 1

Disable GPIO

Posted: Wed Mar 15, 2017 4:25 pm
by peter_
Hello,
I run the LED_PWM as an Sound output.
Due the noise I want to disable the Output, if I don't play any sound. How can I disable it?

REG_CLR_BIT(GPIO_PIN_MUX_REG[18], SLP_OE);
or this
gpio_set_direction(LS_IO, GPIO_MODE_INPUT);

doesn't work. I'm still able to play a sound via PWM.
Can anybody help me with this issue?

kind regards

Peter

Re: Disable GPIO

Posted: Thu Mar 16, 2017 6:35 am
by ESP_Sprite
You can probably use the GPIO mux to mux the output pin back to the GPIO, or to a fixed 1 or 0 signal. Use gpio_matrix_out(ii_pin_number, SIG_GPIO_OUT_IDX, false, false); for example.

Re: Disable GPIO

Posted: Thu Mar 16, 2017 12:10 pm
by peter_
Hi,
I have have tried to MUX it to a fix value. Unfortunately there is still noise on the output. (If I don't initialize the PWM there is no noise.)
Is there no way to deinitialize the Pin in a fast way?
Regards
Peter

Re: Disable GPIO

Posted: Thu Mar 16, 2017 1:21 pm
by ESP_Sprite
Can you specify 'noise'? Is the PWM signal still available on the GPIO? Because with the GPIO muxed to something else, that should not happen.

Re: Disable GPIO

Posted: Sat Mar 18, 2017 11:33 am
by peter_
Hello,
thanks for the fast reply. If I change the PIN Mux the PWM disappear, but I still have some random noise on the pin. I try to get a closer look with a oscilloscope on the pin.

Kind regards

Peter