ESP32-S3 LCD and I2S FULL documentation

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Thu Mar 10, 2022 9:40 pm

@ESP_Sprite,

The LCD_CAM in "FIFO MODE" it's kinda buggy.

I should be able to send up to 8192 bytes, lcd_dout_cyclelen : R/W; bitpos: [12:0] The output data cycles minus 1 of LCD module, uint32_t lcd_dout_cyclelen: 13, but:

ESP_Sprite: "Note that the FIFO data register is 9-bit, with bit 8 the EOF bit, so I think you should be able to set the 9th bit of the last byte you push and you'd not have to send any dummy bits."

If i send 0x0155 in the outfifo_wdata register, ie: set bit 8 the EOF bit, the maximum bytes i can send is 35 bytes.
I am sending only data, not command.
https://youtu.be/VG3-5WsuCXE

If i send 0x0155 in the outfifo_wdata register, ie: set bit 8 the EOF bit and only multiples of 8 bytes(8,16,24....), the maximum bytes i can send is 32 bytes.
I am sending only data, not command.
https://youtu.be/bXST7Qc5BwU

If i send 0x0055 in the outfifo_wdata register, ie: NOT set bit 8 the EOF bit and only multiples of 8 bytes(8,16,24....), the maximum bytes i can send is 112 bytes.
I am sending only data, not command.
https://youtu.be/y2WWADsgrH4

From now, i will try to use dma("DMA_MODE").

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Tue Mar 15, 2022 7:03 pm

@ESP_Sprite,

How can i control cs(chip select) pin using LCD_CAM module ?
Without using direct gpio manipulation !!!

In Technical Reference Manual v0.4 page 530, Table 24-1. Signal Description, show LCD Master Tx Mode,
LCD_CS Output Chip select (CS) signal in I8080/MOTO6800 format

Thank's.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Tue Mar 15, 2022 11:44 pm

@ESP_Sprite,

What is the frequency of the GDMA clock ?

I don't think i can configure this frequency, but it doesn't hurt to ask.

Thank's.

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

Re: ESP32-S3 LCD and I2S FULL documentation

Postby ESP_Sprite » Wed Mar 16, 2022 12:43 am

I don't think you can, not directly at least. GDMA transfers generally go at the speed of the APB clock (=80MHz in most cases)

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Wed Mar 16, 2022 1:58 am

Regarding chip select ?

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Thu Mar 17, 2022 7:48 pm

Baldhead wrote:
Tue Mar 15, 2022 7:03 pm
@ESP_Sprite,

How can i control cs(chip select) pin using LCD_CAM module ?
Without using direct gpio manipulation !!!

In Technical Reference Manual v0.4 page 530, Table 24-1. Signal Description, show LCD Master Tx Mode,
LCD_CS Output Chip select (CS) signal in I8080/MOTO6800 format

Thank's.
@ESP_Sprite,

Forget about it, i fixed it.

I had not connected the io cs pin to the LCD_CAM module.

I relied on the example "esp_lcd_panel_io_i80.c", and that example not connect chip select pin, only clock, dc, and data.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Wed Mar 23, 2022 1:04 am

@ESP_Sprite,

I am trying to use spiram with LCD_CAM and GDMA.

Apparently it's working (I haven't tested it on the lcd yet), with 20 Mhz lcd i8080 clock, 8 bit bus.

Three Questions:

1) What is the frequency limit in this configuration ?
OBS: above of 20Mhz(external lcd clock) is not working(apparently the LCD_CAM or GDMA module is crashing).
In esp32-s3 thecnical reference manual v0.4 only describes with internal memory(static memory), 80 Mhz. Page 541.

2) Do i need to release some permission to access spiram ?
OBS: External RAM Access Permissions.
In esp32-s3 thecnical reference manual v0.4, 2.4.10 External RAM Access Permissions, page 82.

3) Do i need to enable EDMA ?
OBS: SYSTEM_EDMA_CTRL_REG.
In esp32-s3 thecnical reference manual v0.4, 13.3.5 Peripheral Clock Gating and Reset Registers, page 326.

Hardware:
Current hardware: ESP32-S3-DevKitC-1 with ESP32-S3-WROOM-1-N8R8.
Future hardware: i will test with ESP32-S3-DevKitC-1 with ESP32-S3-WROOM-2-N32R8V.

OBS: "External" spiram stay inside esp32-s3 chip in N8R8 and N32R8V.

Thank's.

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

Re: ESP32-S3 LCD and I2S FULL documentation

Postby ESP_Sprite » Wed Mar 23, 2022 3:48 am

1. I'm not sure. You should be able to get the frequency limits from the TRM, but there is also a bandwidth limit if you want to access PSRAM using the CPU as well, and I'm looking for docs with those calculations. If you use internal memory as a buffer, you can probably use any frequency the hardware allows as the bandwidth to that is way bigger.
2. I don't think so, it should be open by default.
3. If you need to feed the LCD from PSRAM, then yes, you need EDMA to be enabled.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Wed Mar 23, 2022 6:41 pm

@ESP_Sprite,

Can you get the information from item 1 with the digital team ?

I need to know if the limit is 20 Mhz or if my program has a bug in this configuration.

If i want to use big buffers, the spiram are the only option to go.

I will test the lcd refresh speed with static ram and with spiram later.

Baldhead
Posts: 468
Joined: Sun Mar 31, 2019 5:16 am

Re: ESP32-S3 LCD and I2S FULL documentation

Postby Baldhead » Wed Mar 23, 2022 9:33 pm

ESP_Sprite wrote:
Wed Mar 23, 2022 3:48 am
1. I'm not sure. You should be able to get the frequency limits from the TRM, but there is also a bandwidth limit if you want to access PSRAM using the CPU as well, and I'm looking for docs with those calculations. If you use internal memory as a buffer, you can probably use any frequency the hardware allows as the bandwidth to that is way bigger.
2. I don't think so, it should be open by default.
3. If you need to feed the LCD from PSRAM, then yes, you need EDMA to be enabled.
@ESP_Sprite,

Item 3:
I think EDMA is enable by default(power on reset), but if i want to set this bits, how should i proceed ?

I tried like this, but get error: undefined reference to `SYSTEM'

Code: Select all


#include "soc/system_struct.h"

#if using_spi_ram 
    SYSTEM.edma_ctrl.edma_reset = 1;   // System EDMA reset.
    SYSTEM.edma_ctrl.edma_reset = 0;

    SYSTEM.edma_ctrl.edma_clk_on = 1;  // Edma clock on.

    // spiram permissions ???
#endif

Who is online

Users browsing this forum: No registered users and 63 guests