Skip to content

SPI on ESP32-C3 does not work in develop branch #201

Open
@flxzt

Description

@flxzt

I am trying to get a simple program (based on this ) for the GC9A01 display to work with an ESP32-C3 and vgl v8. I am using the develop branch for it.

this commit seems to have hardcoded the DMA channel to 1, which is not the case in the master branch. I believe the C3 needs SPI_DMA_CH_AUTO.

The device then fails to initialize and outputs:

[0;32mI (341) lvgl_helpers: Max transfer size: 25600 (bytes)
[0;32mI (341) lvgl_helpers: Initializing SPI bus...
[0;31mE (361) spi: spi_bus_initialize(762): invalid dma channel, chip only support spi dma channel auto-alloc

When this is changed to SPI_DMA_CH_AUTO, the initialization seems to be successful, but as soon as the driver sends something over SPI in the mainloop I am then getting

spi_master: check_trans_valid(689): txdata transfer > host maximum

Not sure how to fix this one. I tried setting max_transfer_size here to a low value but it did not have an effect.

Activity

changed the title [-]SPI with ESP32-C3 does not work with lvgl v8 in develop branch[/-] [+]SPI on ESP32-C3 does not work in develop branch[/+] on Jul 8, 2022
jasta

jasta commented on Mar 9, 2023

@jasta

I'm also struggling with this. Seemingly no matter how I change the example it will not work on ESP32-C3. I've tried disabling DMA entirely and modifying things to use regular transfers and that didn't even work although user error is highly probable on that hack job :)

I also noticed that TFT_eSPI, a popular Arduino library supporting ESP32C3, does work however they disable DMA support for ESP32-C3 and claim it does not work. I similarly tried to use it and got a blank screen just like I see in the lv_port_esp32. Pretty suspicious here that it's actually been tested and shown to work on even an officially supported DevKit module with the ESP32-C3 chip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      SPI on ESP32-C3 does not work in develop branch · Issue #201 · lvgl/lvgl_esp32_drivers