ESP32-S3 LCD and I2S FULL documentation

Tobi82m
Posts: 23
Joined: Wed Feb 16, 2022 9:10 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Tobi82m » Fri Jul 15, 2022 1:10 pm

Yes, i think thats the easyest way. But the i2s in ESP32S3 hat no LCD mode (for parallel output) anymore.
Its crazy...the ESP32 support 24bit parallel out, but have not enough pins, the ESP32S3 dont support 24bit parallel out, with enough pins.
Actually i have no solution...any ideas?

Tobi82m
Posts: 23
Joined: Wed Feb 16, 2022 9:10 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Tobi82m » Mon Jul 25, 2022 12:55 pm

Now it works...16 Bit parallel data out with the LCD Module. But why i cant have 24-bit or 32-bit?
Or why i2s (there is 24 and 32 bit) has not the LCD (parallel) Mode anymore?

Baldhead
Posts: 481
Joined: Sun Mar 31, 2019 5:16 am
Location: Brazil

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Mon Jul 25, 2022 6:00 pm

Hi @Tobi82m,

I think that for 24-bit or 32-bit is better to switch to another more powerfull chip.

Tobi82m
Posts: 23
Joined: Wed Feb 16, 2022 9:10 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Tobi82m » Mon Jul 25, 2022 7:27 pm

No. With the ESP32 it works without any problems. The only problem, there are not enough pins

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: ESP32-S3 LCD and I2S FULL documentation

Postby fasani » Sat Sep 02, 2023 6:13 pm

Quick question here:
Anyone knows how is possible to set the arduino using a ESP32S3 board with 16 MB octal SPI, switch the Data cache line size to: 64 bytes

It's easy to do in IDF: → Component config → ESP System Settings → Cache config

But still didn't managed to do it in Arduino IDE.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Baldhead
Posts: 481
Joined: Sun Mar 31, 2019 5:16 am
Location: Brazil

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Fri Dec 20, 2024 11:00 pm

Hi @Espressif team,

When i change only this bit in my LCD drive, the lcd stops working.

LCD_CAM.lcd_user.lcd_8bits_order = 0;
to
LCD_CAM.lcd_user.lcd_8bits_order = 1;

/** lcd_8bits_order : R/W; bitpos: [19]; default: 0;
* 1: Swap every two data bytes, valid in 8-bit mode. 0: Do not swap.
*/

I am using "External SPIRAM" (stay internal to the esp32-s3 chip package).

I believe that this bit only inverts the bytes in the data phase and not in the command phase, right ?

Some suggestion ?

Thank's.

Baldhead
Posts: 481
Joined: Sun Mar 31, 2019 5:16 am
Location: Brazil

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Thu Jan 09, 2025 10:51 pm

@ESP_Sprite,

Some suggestion ?

ESP_Sprite
Posts: 9905
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby ESP_Sprite » Fri Jan 10, 2025 3:43 am

Not really, sorry. Do you have (ideally a whittled-down version of your) source code that you can share that shows the issue?

Baldhead
Posts: 481
Joined: Sun Mar 31, 2019 5:16 am
Location: Brazil

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Sun Feb 09, 2025 1:37 am

ESP_Sprite wrote:
Fri Jan 10, 2025 3:43 am
Not really, sorry. Do you have (ideally a whittled-down version of your) source code that you can share that shows the issue?
Hi @ESP_Sprite,

I was on vacation and I was also working on other activities.

Today I installed version 5.4 of esp-idf and got this warning when compiling my code:

Code: Select all

warning: 'gdma_new_channel' is deprecated: please use gdma_new_ahb_channel or gdma_new_axi_channel respectively [-Wdeprecated-declarations]
I didn't find any documentation(https://docs.espressif.com/projects/esp ... ea=default#) about these functions and I don't know which one to use and whether to just replace the old function with the new function.

EDIT:
From what I researched and understood, the esp32s3 does not have the axi bus, only the ahb bus, so I think it's just a case of replacing the function "esp_err_t gdma_new_channel(const gdma_channel_alloc_config_t *config, gdma_channel_handle_t *ret_chan)" with function "esp_err_t gdma_new_ahb_channel(const gdma_channel_alloc_config_t *config, gdma_channel_handle_t *ret_chan)".

Regarding my issue:
With i80 16 bits bus:
internal memory: not working
spiram memory: not working

With i80 8 bits bus: ( LCD_CAM.lcd_user.lcd_8bits_order = 0 )
internal memory: not working
spiram memory: working

With i80 8 bits bus: ( LCD_CAM.lcd_user.lcd_8bits_order = 1 )
internal memory: not working
spiram memory: not working

I saw that in the esp idf 5.4 version they added a support function for aligning the LCD frame buffer, maybe it's a GDMA alignment issue, I don't know.

Baldhead
Posts: 481
Joined: Sun Mar 31, 2019 5:16 am
Location: Brazil

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Mon Feb 10, 2025 7:38 pm

Hi @ESP_Sprite,

What alignment setting for transfer in gdma should I use in psram ?

I use it this way, I don't use the MALLOC_CAP_DMA flag because it caused compilation problems in the past, which has now apparently been fixed:

Code: Select all

    p_buffer_a = (lv_color16_t*) heap_caps_aligned_alloc( 1, pixels_size * sizeof(lv_color16_t), MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
    p_buffer_b = (lv_color16_t*) heap_caps_aligned_alloc( 1, pixels_size * sizeof(lv_color16_t), MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM );
I'm thinking about using it this way, but at the moment I don't have the hardware to test:

Code: Select all

    //buf = heap_caps_aligned_calloc(bus->ext_mem_align, 1, size, MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA);

    p_buffer_a = (lv_color16_t*) heap_caps_aligned_alloc( 4, pixels_size * sizeof(lv_color16_t), MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA );
    p_buffer_b = (lv_color16_t*) heap_caps_aligned_alloc( 4, pixels_size * sizeof(lv_color16_t), MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA );
Another thing, I must use the function

Code: Select all

Cache_WriteBack_Addr( (uint32_t)p_buffer_a, length );
or the function

Code: Select all

esp_cache_msync( (void*)p_buffer_a, length, ESP_CACHE_MSYNC_FLAG_DIR_C2M | ESP_CACHE_MSYNC_FLAG_TYPE_DATA | ESP_CACHE_MSYNC_FLAG_UNALIGNED );
Thank`s.

Who is online

Users browsing this forum: No registered users and 6 guests