Need sample code for ILI9488 LCD on SPI Interface

JanJansen47
Posts: 27
Joined: Sun Jan 01, 2017 9:21 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby JanJansen47 » Thu Jun 15, 2017 11:10 am

Hello Loboris,

Before implementing your demo in Eclipse I followed your steps in the readme.
During make I get following errors:

/home/jan/ESPtest/ESP32_TFT_library-master/components/spidriver/./spi_master_lobo.c: In function 'spi_lobo_bus_initialize':
/home/jan/ESPtest/ESP32_TFT_library-master/components/spidriver/./spi_master_lobo.c:423:3: error: implicit declaration of function 'DPORT_SET_PERI_REG_BITS' [-Werror=implicit-function-declaration]
DPORT_SET_PERI_REG_BITS(DPORT_SPI_DMA_CHAN_SEL_REG, 3, init, (host * 2));
^
I assume the definitions are in: #include "soc/dport_reg.h". It looks like it's included but I cannot find the file in the components?

Any idea what's going wrong?
Jan Jansen
Amsterdam
The Netherlands

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Thu Jun 15, 2017 11:39 am

JanJansen47 wrote:Hello Loboris,

Before implementing your demo in Eclipse I followed your steps in the readme.
During make I get following errors:

/home/jan/ESPtest/ESP32_TFT_library-master/components/spidriver/./spi_master_lobo.c: In function 'spi_lobo_bus_initialize':
/home/jan/ESPtest/ESP32_TFT_library-master/components/spidriver/./spi_master_lobo.c:423:3: error: implicit declaration of function 'DPORT_SET_PERI_REG_BITS' [-Werror=implicit-function-declaration]
DPORT_SET_PERI_REG_BITS(DPORT_SPI_DMA_CHAN_SEL_REG, 3, init, (host * 2));
^
I assume the definitions are in: #include "soc/dport_reg.h". It looks like it's included but I cannot find the file in the components?

Any idea what's going wrong?
Hi,

Yes. Correct. We have also faced this type of issue while compiling his latest TFT Library GIT Repository. Actually, We were using his older Repository and just updated as per required changes.

I have also checked DPORT_SET_PERI_REG_BITS into his application code as well as into ESP32-IDF but not found it yet.


Hi Loboris,

Please provide us changes which are required to solve this type of compilation issue at our end as I am using ESP32-IDF 2.0 Official Release SDK for our development purpose.

Let me know if you need any more informations for our side.
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby loboris » Thu Jun 15, 2017 3:14 pm

You are probably building with an old esp-idf version.

Just update your esp-idf to the latest master commits, in esp-idf directory run:

Code: Select all

git pull
git submodule update --init
Then in the demo directory:

Code: Select all

make menu_config
make clean
make all
make flash

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Thu Jun 15, 2017 4:15 pm

loboris wrote:You are probably building with an old esp-idf version.

Just update your esp-idf to the latest master commits, in esp-idf directory run:

Code: Select all

git pull
git submodule update --init
Then in the demo directory:

Code: Select all

make menu_config
make clean
make all
make flash
Ok, I will check with latest master ESP32 IDF RTOS SDK and will let you know the result after that.
Regards,
Ritesh Prajapati

JanJansen47
Posts: 27
Joined: Sun Jan 01, 2017 9:21 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby JanJansen47 » Thu Jun 15, 2017 4:42 pm

Thanks Loboris,

Compilation is okay :lol:
Jan Jansen
Amsterdam
The Netherlands

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Mon Jul 03, 2017 12:39 pm

Hi Loboris,

We are facing one issue while using your SPI LCD based Repository. We have used it till now and it was working fine without any issue.

But, We have some below requirements like 6 GPIO based Interrupts, one debug UART as UART0 + one extra UART UART1 to connect with another controller and SPI LCD for Display purpose.

So, Initially we have used 4 GPIO based interrupts + UART0 + UART1 + SPI LCD which was working fine without any issue. After that I have incremented it to 6 GPIO Interrupts and at that time not able to send/receive data over UART0 even though UART configured successfully and installed properly in my system.

After that, I have spent almost 2 hour to debug this issue by disabling some of SPI, UART and GPIO Interrupt related portions and found that after initializing SPI LCD components, it creates problem while communicating with UART1 module. I have also checked on ESP32 development board and result remains same.

So, AT the end, We found exact line on which we are getting problem into SPI Init sequence which is below line which is inside spi_nodma_bus_initialize in spi_master_nodma.c file.

Code: Select all

esp_intr_alloc(io_signal[host].irq, ESP_INTR_FLAG_INTRDISABLED, spi_intr, (void*)spihost[host], &spihost[host]->intr);
We have also checked with all possible test-cases like changing GPIO Numbers, UART TX/RX Pin GPIOs but no any luck after that.

So, After commenting that line, The issue has been resolved and system is working fine without any issue but don't know impact of above line change.

So, Can you please look into above configurations and let me know if you get any clue for that issue?

Please have a look it and let me know if you find anything or any clue for that.
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby loboris » Mon Jul 03, 2017 8:11 pm

@Ritesh

spi_master_nodma was updated more than a month ago, the new name is spi_master_lobo.

Please check viewtopic.php?f=17&t=1937
GitHub: https://github.com/loboris/ESP32_TFT_library

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Tue Jul 04, 2017 6:55 am

loboris wrote:@Ritesh

spi_master_nodma was updated more than a month ago, the new name is spi_master_lobo.

Please check viewtopic.php?f=17&t=1937
GitHub: https://github.com/loboris/ESP32_TFT_library
Hi Loboris,

I have checked your updated repository and it seems like you have completely changed your update repository as compare with older repository.

I will check with our custom changes into your updated repository and will inform you after testing that update repository.
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby Ritesh » Sat Aug 12, 2017 1:21 pm

Hi Loboris,

We have already posted one issue regarding ESP32 SPIFFS Flash File System in which we are facing some issue when we run some files related codes into overnight test.

viewtopic.php?f=13&t=2498

So, Would you please check that issue and provide your comment as we are using SPIFFS component which has been provided by you?

Let me know if you need any further information or issue details from my side.
Regards,
Ritesh Prajapati

sukeshak
Posts: 49
Joined: Sat Aug 19, 2017 10:20 am

Re: Need sample code for ILI9488 LCD on SPI Interface

Postby sukeshak » Sat Sep 02, 2017 9:01 pm

Trying to get Adafruit HUZZAH32 and Adafruit TFT FeatherWing work with this library.

Updated tftspi.h with the following
#define PIN_NUM_MISO 19 // SPI MISO
#define PIN_NUM_MOSI 18 // SPI MOSI
#define PIN_NUM_CLK 5 // SPI CLOCK pin
#define PIN_NUM_CS 15 // Display CS pin
#define PIN_NUM_DC 33 // Display command/data pin
#define PIN_NUM_TCS 32 // Touch screen CS pin
#define PIN_NUM_RST 16 // GPIO used for RESET control
But still not working... compiles and deployed... nothing show up on the display

I also found this setting... not sure if its correct or needs a change
// Define which spi bus to use VSPI_HOST or HSPI_HOST
#define SPI_BUS VSPI_HOST

Any help to get this library working is highly appreciated.

Who is online

Users browsing this forum: No registered users and 130 guests