Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPI Handshake GPIO error #539

Open
3 tasks done
hmaiedEtic opened this issue Nov 13, 2024 · 0 comments
Open
3 tasks done

SPI Handshake GPIO error #539

hmaiedEtic opened this issue Nov 13, 2024 · 0 comments

Comments

@hmaiedEtic
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

Hello,

I compiled the esp_hosted driver for the AM62X-SK platform with Linux 6.4.16. I changed the HANDSHAKE_PIN and DATA_READY_PIN in the esp_spi.h file.


#define HANDSHAKE_PIN           38
#define SPI_IRQ                 gpio_to_irq(HANDSHAKE_PIN)
#define SPI_DATA_READY_PIN      39

However, when I attempt to load esp32_spi , I encounter the following error in the log:


[   52.341964] esp32_spi: spi_dev_init: ESP32 peripheral is registered to SPI bus [0], chip select [1], SPI Clock [10]
[   52.352383] esp32_spi: spi_dev_init: Failed to obtain GPIO for Handshake pin, err:-517

It seems like there is an issue with the GPIO handshake pin setup. The error code -517 is returned when the system attempts to initialize the SPI device, indicating a failure to obtain the GPIO for the handshake pin.

Here is the part of the device tree I edited to configure the GPIO pins.

       mygpio0_pins_default: mygpio0-default-pins {
               pinctrl-single,pins = <
                       AM62X_IOPAD(0x009c, PIN_INPUT, 7) /* (V25) GPMC0_WAIT1.GPIO0_38 */
                       AM62X_IOPAD(0x00a0, PIN_INPUT, 7) /* (K25) GPMC0_WPn.GPIO0_39 */
               >;
        };

&main_gpio0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mygpio0_pins_default>;
};

Has anyone encountered a similar issue or can suggest potential solutions to resolve this error? Any guidance would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant