This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VE-Q1: I want set WAKEUP-GPIO-4 and 5 , set as output and pullup by default

Part Number: TDA4VE-Q1

Hi All:

I want set WAKEUP-GPIO-4 and 5 , set as output and pullup by default

I try set gpio on uboot command line

input and output can be write

result as follow

=> gpio toggle 4
gpio: pin 4 (gpio 4) value is 1
Warning: value of pin is still 0
=> gpio toggle 5
gpio: pin 5 (gpio 5) value is 1
Warning: value of pin is still 0

What can I do next?

Ming Lu

  • Hi Ming,

    You have not set the pinmux most likely. Can you check if that is done?

    - Keerthy

  • Hi Keerthy:

    I checked the uboot gpio driver .

    This issue is driver's bug.

    _gpio_get_value
    always return in_data, event when we get output gpio data  also return in_data.
    That why when we set output 1 , always get 0 , set failed.
     need check bank->dir is in or out , then return in_data or out_data status....
    Ming Lu
  • Hi Ming.

    This issue is driver's bug.

    Your analysis is not correct.

    always return in_data

    That is the right thing to do as the in_data always represents the physical state of the pin.

    return in_data or out_data status....

    Wrong. out_data will just show what you wrote. You can measure the GPIO state by connecting to oscilloscope. It will still be 0 hence the in_data reads 0 while out_data reads 1.

    You need to set the corresponding pin Mux registers to 0x40007 (bit0:3 - 0x7 --> GPIO Mode & bit18 --> RXActive bit set).
    Try this and you will see that in_data will also be set to 1 & the physically GPIO will go high.

    - Keerthy