Skip to main content
Silas Valera
Senior
May 2, 2017
Question

STM32L4 + ILI9341 16 bit + STemWin

  • May 2, 2017
  • 2 replies
  • 3898 views
Posted on May 02, 2017 at 03:36

Hello,

I had this previous set up of STM32F4 + ILI9341 8 bit interface + STemWin - but that did not work for me after trying out for sometime (ref : 

https://community.st.com/0D50X00009XkY1ISAV

 ) 

Since actually I want my final project on L4 due to its low power feature, I thought let me use that and make that set up work with STemWin. So now I have Nucleo-L476RG + TFT LCD display with ILI9341. I am actually using GPIOB port as 16bit parallel port to write to display and other port pins for controls (WR, RD, CS, RST, RS). This set up works perfectly fine - I can fill the screen with colors.

Now to use STemWin - I moved these base functions to LCDConf.c - I have attached copy with this. Along with other files included into my project and with CRC enabled, after building and running the project, nothing shows up on the screen. Single stepping in debug mode, I found that when calling GUI_Init() it goes through functions LCD_X_Config(), LCD_X_DisplayDriver() and also does LCDInit(), but then it gets lost..  Anyone facing similar issue? I really need to get this setup working - any suggestion or pointer will be very much appreciated. 

Thanks in advance..

Silas

#16-bit-parallel-mode #stml4 #ili9341 #stemwin
This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
May 2, 2017
Posted on May 02, 2017 at 05:50

static void LcdWriteDataMultiple(U16 * pData, int NumItems) {

while (NumItems--) { // need to decrement otherwise will be stuck in loop forever

// ... TBD by user

LcdWriteData((uint16_t)*pData++) ;

}

}
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Silas Valera
Senior
May 2, 2017
Posted on May 02, 2017 at 17:42

Thank you so much Clive One  

I updated the code and tried running on the board, now at least the program execution runs fine - I have an LED blinky code on timer interrupt, the LED does blink at the timer interval. But it seems that the following STemWin code lines have no effect on the screen. 

GUI_Init();

GUI_Clear();

GUI_SetBkColor(Red);

I am looking further using the oscilloscope and will try figure out.. 

Silas

Alptigin SAKI
Associate
May 3, 2017
Posted on May 03, 2017 at 12:21

Hi Silas,

I have

Nucleo-L476RG and

 am trying to use ILI9341 8 or 16 bit and STemWin library. I could not getting any progress. Can you help me for that? Maybe you can share with me a code or STM32CubeMX file?

Thanks...

A.SAKI

Silas Valera
Senior
May 7, 2017
Posted on May 07, 2017 at 09:16

HI 

Here is the update: 

With my set up of using the port as 16bit bus read/write, I was having some issue on reading the port - by using simply GPIOB-->IDR, and I know the reason - need to configure port as 'input' when reading, and as 'output' when writing, and since these instructions are not 'atomic' when using the GPIO lib functions, it was kind of slow. 

So I again went back to using FSMC. But the 

board Nucleo F412ZG would not allow me to use 16bit FSMC since on the port pins PD9 and PD8 STLK_TX STLK_RX are assigned, I unsoldered the bridges on the board to disconnect PD9 and PD8 so that these would be available for 16bit FSMC. Then I configured the project to use CRC, FSMC, TIM6, other control pins like LCD_RST and LCD_BKLT, and then tested the LCDInit, LCDWriteReg, LCDWriteData, LCDReadData functions and tested the set up was working fine with filling screen with colors. And then finally integrate the STemWin lib into the project. 

At this point I can see that the GUI_Init() gives me black / dark screen - then when using the following lines, I see the red color characters 'Hello World'  

GUI_Init();

GUI_Clear();

GUI_SetFont(&GUI_Font20_1);

GUI_SetColor(GUI_RED);

GUI_DispString('Hello world!');

Now to the next step: I need to get all GUI screen with widgets 

thanks all for the help 

Silas

Silas Valera
Senior
May 10, 2017
Posted on May 10, 2017 at 00:56

Hi 

I have the basic GUI screen integrated into the project and looks good:)  I have attached the pic with this. 

The screens load like a flash! And this is running @24Mhz clock! And the current at that clock speed is 7mA !!!! And this is STM32F4 - this can still be better if I shut-down the peripharals that are not in use. 

Further, I plan to use STM32L4 for which I expect the current to be even lower to about 4mA !! 

Anyone has any experience on how to put the STM32L4 to lowest power consumption in RUN mode? 

Thanks all for your help

Silas

0690X00000603pQQAQ.jpg
Marco Cattapan
Visitor II
July 13, 2017
Posted on July 13, 2017 at 23:08

Hi Silas, how are you? I should use a 2.8' tft with ili9341 8-bit parallel controller with STemWIN toolchain. I'm seeing that you found a way to use this kind of controller, could you give me advices about? I have a STM32F4 Discovery with a STM32F407VG, what are the electrical connection in your case? Could you give me a small piece of code to move my first steps?

Thank you

Marco