This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 702e45155a165da3c254948ea4978796691b7fab
Author: Jiri Vlasak <[email protected]>
AuthorDate: Tue Dec 2 10:06:55 2025 +0100

    lcd/ili9341: Improve initialization
    
    - Re-select LCD after soft reset during init. It looks that (soft) reset
      affects SPI communication.
    
    - Clear display during the initialization.
    
    Signed-off-by: Jiri Vlasak <[email protected]>
---
 drivers/lcd/ili9341.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/lcd/ili9341.c b/drivers/lcd/ili9341.c
index 16fd97e1902..820d23f690f 100644
--- a/drivers/lcd/ili9341.c
+++ b/drivers/lcd/ili9341.c
@@ -728,6 +728,9 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s 
*dev)
   lcd->sendcmd(lcd, ILI9341_SOFTWARE_RESET);
   up_mdelay(5);
 
+  lcd->deselect(lcd);
+  lcd->select(lcd);
+
   lcdinfo("ili9341 LCD driver: set Memory Access Control: %04x\n",
           dev->orient);
   lcd->sendcmd(lcd, ILI9341_MEMORY_ACCESS_CONTROL);
@@ -1041,6 +1044,10 @@ FAR struct lcd_dev_s *
 
           ret = ili9341_hwinitialize(priv);
 
+          /* Clear the display after initialization. */
+
+          ili9341_clear(dev, 0x0000);
+
           if (ret == OK)
             {
               return &priv->dev;

Reply via email to