Skip to content

Add new board Elecrow CrowPanel 7.0" #59

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

Closed
wants to merge 15 commits into from

Conversation

lboue
Copy link
Contributor

@lboue lboue commented Jun 20, 2024

Add new board Elecrow CrowPanel 7.0".

Feature Value
Main Processor ESP32-S3-WROOM-1-N4R8
FLASH 4MB
PSRAM OPI 8MB
Display Driver EK9716BD3 & EK73002ACGB
Backlight pin GPIO2
Touch Type Capacitive Touch
Touch controller GT911

@Lzw655
Copy link
Collaborator

Lzw655 commented Jun 25, 2024

Hi @lboue,

Thanks for your contribution! Is this PR ready for review?

@lboue
Copy link
Contributor Author

lboue commented Jun 25, 2024

Hi @lboue,

Thanks for your contribution! Is this PR ready for review?

Not yet, I'm running out of time.

@lboue
Copy link
Contributor Author

lboue commented Jun 27, 2024

Right now I'm trying to fix a problem with the touch controller:

Read touch point failed
E (19038) ESP_PanelTouch: readRawData(147): Invalid handle
E (19038) ESP_PanelTouch: readPoints(202): Read raw data failed
Read touch point failed
E (19079) ESP_PanelTouch: readRawData(147): Invalid handle
E (19079) ESP_PanelTouch: readPoints(202): Read raw data failed
Read touch point failed
E (19120) ESP_PanelTouch: readRawData(147): Invalid handle
E (19120) ESP_PanelTouch: readPoints(202): Read raw data failed

@Lzw655
Copy link
Collaborator

Lzw655 commented Jun 28, 2024

Could you please activate the debug log and then share the entire log with me?

@NecroMancer05
Copy link

NecroMancer05 commented Jul 5, 2024

Hi @lboue. Thanks for this awesome contribution!

Im using the same dev board (CrowPanel 7.0") i just tried your PR and make it work sucessfully.

Touch is not working because you set controller name wrong the board using GT911 not GT1151 i changed it in CROWPANEL_7_0.h and touch works!

@Lzw655 Also software rotation with avoid tearing is not working i solved it with changing width and height values:

   disp_drv.hor_res = LVGL_PORT_DISP_WIDTH;
   disp_drv.ver_res = LVGL_PORT_DISP_HEIGHT;

to:

    disp_drv.ver_res = LVGL_PORT_DISP_WIDTH;
    disp_drv.hor_res = LVGL_PORT_DISP_HEIGHT;

idk why but this fixed the problem.

@lboue
Copy link
Contributor Author

lboue commented Jul 5, 2024

Could you please activate the debug log and then share the entire log with me?

@Lzw655 Here is the debug log: CrowPanel_ESP32-7_0.log

Partial log

------------------------------------------
Board Info:
------------------------------------------
  Arduino Board     : ESP32S3_DEV
  Arduino Variant   : esp32s3
  Arduino FQBN      : esp32:esp32:esp32s3:UploadSpeed=921600,USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=debug,PSRAM=opi,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default
============ Before Setup End ============
Panel test example start
Initialize display panel
E (634) lcd_panel.io.i2c: panel_io_i2c_rx_buffer(135): i2c transaction failed
E (634) GT911: touch_gt911_read_cfg(362): GT911 read error!
E (635) GT911: esp_lcd_touch_new_i2c_gt911(128): GT911 init failed
E (641) GT911: Error (0xffffffff)! Touch controller GT911 initialization failed!
Turn off the backlight
Draw color bar from top to bottom, the order is B - G - R
Turn on the backlight
Panel test example end

@lboue
Copy link
Contributor Author

lboue commented Jul 5, 2024

Hi @Lzw655 . Thanks for this awesome contribution!

Im using the same dev board (CrowPanel 7.0") i just tried your PR and make it work sucessfully.

Touch is not working because you set controller name wrong the board using GT911 not GT1151 i changed it in CROWPANEL_7_0.h and touch works!

@NecroMancer05
I fixed it with commit d8f3b82.
Could you share the binary file because it doosn't work for me?

image

@NecroMancer05
Copy link

Hi @lboue, i just tried it on consumer product application so i cant share it but i will share a demo app in free time asap.

@Lzw655
Copy link
Collaborator

Lzw655 commented Jul 8, 2024

Hi @lboue. Thanks for this awesome contribution!

Im using the same dev board (CrowPanel 7.0") i just tried your PR and make it work sucessfully.

Touch is not working because you set controller name wrong the board using GT911 not GT1151 i changed it in CROWPANEL_7_0.h and touch works!

@Lzw655 Also software rotation with avoid tearing is not working i solved it with changing width and height values:

   disp_drv.hor_res = LVGL_PORT_DISP_WIDTH;
   disp_drv.ver_res = LVGL_PORT_DISP_HEIGHT;

to:

    disp_drv.ver_res = LVGL_PORT_DISP_WIDTH;
    disp_drv.hor_res = LVGL_PORT_DISP_HEIGHT;

idk why but this fixed the problem.

Hi @NecroMancer05,

Thank you for pointing out this issue. I will fix it.

@Lzw655
Copy link
Collaborator

Lzw655 commented Jul 8, 2024

Hi @lboue,

I checked the schematic of Elecrow CrowPanel 7.0" and your configuration file. I found the TP INT pin (IO38_D) is not set. But the I2C address of GT911 is decided by the INT pin, as below.

image

To set the GT911 I2C address to 0x5D (7-bit address, default in the library), we should set the INT pin (IO38_D) to low level before initialize the touch device. You can refer to the code to do it.

@lboue
Copy link
Contributor Author

lboue commented Jul 8, 2024

To set the GT911 I2C address to 0x5D (7-bit address, default in the library), we should set the INT pin (IO38_D) to low level before initialize the touch device. You can refer to the code to do it.

Yes, that's what I found with a scan of the I2c addresses:

Scanning...
I2C device found at address 0x5D  !

lboue added 2 commits July 8, 2024 16:30
Set the backlight pin to GPIO2
ESP_PANEL_TOUCH_IO_INT GPIO38
@lboue
Copy link
Contributor Author

lboue commented Jul 8, 2024

@Lzw655
Do you know why INTE pin is also connected to PCA9557 I/O Expander pin 7?

Pin Touch pin
IO0 TP_RST
IO1 TP_INT

image

@Lzw655
Copy link
Collaborator

Lzw655 commented Jul 9, 2024

Hi @lboue,

Sorry, the schematic I saw doesn't include the PCA9557.

@lboue
Copy link
Contributor Author

lboue commented Jul 9, 2024

Sorry, the schematic I saw doesn't include the PCA9557.

You're right. I didn't use the right one. In the manufacturer's response on the forum, I got the same as you proposed. I have hardware revision V2.1 and not V2.0. I asked them to see if there's a difference.

@lboue
Copy link
Contributor Author

lboue commented Jul 9, 2024

@Lzw655
How can I fix the CICD pre-commit job?

@Lzw655
Copy link
Collaborator

Lzw655 commented Jul 9, 2024

@Lzw655 How can I fix the CICD pre-commit job?

Have you installed 'pre-commit'? You can do this by running the command below:

pip3 install pre-commit && pre-commit install

After that, run the following command to check the rules. If no unexpected changes occur, please add them to Git and commit.

pre-commit run --all-files

@lboue
Copy link
Contributor Author

lboue commented Jul 10, 2024

@Lzw655 It works on my laptop:

user@Matter:~/Documents/ESP32_Display_Panel$ pre-commit run --all-files
astyle formatter.........................................................Passed
Check copyright notices..................................................Passed
flake8...................................................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for merge conflicts................................................Passed
mixed line ending........................................................Passed
Update when configuration files change...................................Passed
Update when versions change..............................................Passed

@lboue lboue marked this pull request as ready for review July 10, 2024 05:40
@lboue
Copy link
Contributor Author

lboue commented Jul 10, 2024

Closure in favor of a new branch and a new PR #71 including the latest modifications to the main branch.

@lboue lboue closed this Jul 10, 2024
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

Successfully merging this pull request may close these issues.

3 participants