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 on ESP32-C3 does not work in develop branch #201

Open
flxzt opened this issue Jul 8, 2022 · 1 comment
Open

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

flxzt opened this issue Jul 8, 2022 · 1 comment

Comments

@flxzt
Copy link

flxzt commented Jul 8, 2022

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.

@flxzt flxzt 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 Jul 8, 2022
@jasta
Copy link

jasta commented Mar 9, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants