Disable GPIO

peter_
Posts: 13
Joined: Tue Jan 31, 2017 9:57 am

Disable GPIO

Postby peter_ » Wed Mar 15, 2017 4:25 pm

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

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: Disable GPIO

Postby ESP_Sprite » Thu Mar 16, 2017 6:35 am

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.

peter_
Posts: 13
Joined: Tue Jan 31, 2017 9:57 am

Re: Disable GPIO

Postby peter_ » Thu Mar 16, 2017 12:10 pm

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

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: Disable GPIO

Postby ESP_Sprite » Thu Mar 16, 2017 1:21 pm

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.

peter_
Posts: 13
Joined: Tue Jan 31, 2017 9:57 am

Re: Disable GPIO

Postby peter_ » Sat Mar 18, 2017 11:33 am

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

Who is online

Users browsing this forum: Baidu [Spider] and 261 guests