limpens / esp32-8048S043

Demo for the ESP32-8048S043 Sunton kit with esp-idf and lvgl
12 stars 4 forks source link

Can't add Wi-Fi Support #2

Closed D1sconnected closed 8 months ago

D1sconnected commented 8 months ago

Hey there! Thanks for this amazing demo, it's very useful!

Have you ever tried to run this with Wi-Fi together?

I need to be able to connect to AP for OTA updates, but I've been stuck for quite so long trying to run official station exmaple after initialization of LVGL in separate thread.

It crashes without error in the middle of Wi-Fi routine initialization , and USB-UART restarts too. It seems like a popular problem, when you try to use Wi-Fi, LVGL and PSRAM together. I tried a lot of suggestions from different threads - placing code in IRAM, allocating lvgl buffers in internal RAM, reducing Wi-Fi memory consumption, but had no success :(

I also tried both v5.0.5 and v.5.1.2 esp-idf

Also I had a different project with LVGL, Wi-Fi, BLE and SPI LCD, which doesn't use PSRAM, but it's on 4.4.6 esp-idf version and 7.0 LVGL. And I had similar problems with Wi-Fi or BLE, when I've enabled PSRAM, so probably it's not a version problem.

If you have any luck with Wi-Fi on this particular board, please share - any thoughts will be greatly appreciated!

limpens commented 8 months ago

Perhaps you can take a look at this project, which has wifi and is running with the same hardware.

https://github.com/limpens/SolarEdge/tree/main

D1sconnected commented 8 months ago

@limpens many thanks, I compiled your project with 5.0.5 and was able to boot it.

The screen was white all the time, and after Wi-Fi Configuration I received USB port crashes again, but it seems like board was not in reset. Then I realized that my USB cable was plugged with USB HUB. I tried to connect it directly and it helped :D

Went back to my project and it seems to work well.. as always - the problem is somewhere on the surface..

Thanks for reference project and your help! Also, is it okay, that I don't see anything on screen before mqtt and modbus configuration?

image

limpens commented 8 months ago

The solaredge version of the code does some locking when calling the display / lvgl, I think this project lacks that logic.

I think the SolarEdge code should display some empty gauges, even when not configured or connected to mqtt / inverter. Time permitting I will take a look at this project and add the proper logic to lock lvgl (and update to more recent idf version).

Regards.

On Thu, Jan 18, 2024 at 11:25 AM Alexander Zaytsev @.***> wrote:

@limpens https://github.com/limpens many thanks, I compiled your project with 5.0.5 and was able to boot it.

The screen was white all the time, and after Wi-Fi Configuration I received USB port crashes again, but it seems like board was not in reset. Then I realized that my USB cable was plugged with USB HUB. I tried to connect it directly and it helped :D

Went back to my project and it seems to work well.. as always - the problem is somewhere on the surface..

Many thanks for reference and help! Also, is it okay, that I don't see anything on screen before mqtt and modbus configuration?

— Reply to this email directly, view it on GitHub https://github.com/limpens/esp32-8048S043/issues/2#issuecomment-1898202441, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNYC73ACY3RBDPO3YXSDQLYPD2BLAVCNFSM6AAAAABB656ERCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJYGIYDENBUGE . You are receiving this because you were mentioned.Message ID: @.***>

limpens commented 8 months ago

Updated the project to esp-idf 5.1.x. Modified and updated the touch handler