[libmaple] FSMC LCD 16bit

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
stevestrong
Posts: 1821
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Fri Jul 07, 2017 3:27 pm

OK, it looks like everything should work as expected.

I had 3 wires which were not coming from the TFT header:
- reset - I defined a separate reset pin in the 16 bit LCD library, but I tried and it also works when connected directly to the board reset pin (default for the board's TFT header)
- FSMC_A18 - I had it connected to PD13 on the J3 header pin 42, it was the time when I did debug. Now I connected it directly to FSMC_A18 on the TFT header and it still works.
- 5v - my TFT board requires 5 V so I have to connect it to J2 header pin 1.
The rest of pins from the TFT board are wired to the appropriate TFT header pins of the black F407V board.

So, Stephen, I can just recommend to play a bit with those DATAST and ADDSET values as suggested by Pito.
Just to be sure I ask again, have you tried the BIN file I posted?
Last edited by stevestrong on Fri Jul 07, 2017 3:42 pm, edited 3 times in total.

User avatar
Pito
Posts: 1627
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] FSMC LCD 16bit

Post by Pito » Fri Jul 07, 2017 3:40 pm

@steve: I may try with my tft as well, it is SSD1289 16bit one however.. I've got it working with MultiLCD library https://github.com/stanleyhuangyc/MultiLCD on F1 (libmaple, 16bit portB) which is based on utft (data not via FSMC). Here is the 1289 driver with tft init and a few i/o primitives I modded. Maybe easy to port when someone knows how to..
SSD1289.rar
(3.9 KiB) Downloaded 12 times
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1486
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: [libmaple] FSMC LCD 16bit

Post by zmemw16 » Fri Jul 07, 2017 4:16 pm

i'm reminded of work, telephone 'can i speak to chris or steve'
'which one, we've 7 chris's and 6 steve's'

on leaving work at 4:00pm, we'd take a quick'ish 60mls car ride to purchase computer bits in Manchester and they shut at 5:15pm. 90% motorway = 70mph, maybe the speedo read on the low side.
we needed a 'company name' for the sellers billing, S Cubed comprising the 3 steves involved.

got the io & disp connections done now in 6 files xcf via Gimp 5.9M

re: bin
istr trying it as i recall looking for st-flash in the history file.
now be honest, how many zeros after the 0x8 ?
pretty sure it didn't do anything, any colour or any sort of flash i'd remember that :)
i'd be ecstatic if i just got a white screen

stephen

stevestrong
Posts: 1821
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Fri Jul 07, 2017 8:08 pm

I attached a video to my first post in this thread.
https://www.youtube.com/watch?v=cQXc7nye6Vo
(how to attach it online?)


acronis
Posts: 143
Joined: Thu Mar 02, 2017 12:32 pm

Re: [libmaple] FSMC LCD 16bit

Post by acronis » Thu Jul 20, 2017 7:46 am

Hello.
Tell me how to clear the screen to not flicker ?
I need to display the stitching time and if I do a clean fill of the screen (the tft.fillScreen(BLACK)) - can be seen flickering.
Flickering a little , but its noticeable

stevestrong
Posts: 1821
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Thu Jul 20, 2017 9:39 am

acronis wrote:
Thu Jul 20, 2017 7:46 am
I need to display the stitching time
sorry, I don't really understand what you mean, could you please detail it.
If you want to erase only a text portion from the screen then I would actually write the same text using the background color as foreground color. This way you don't need to clear the whole display, but you have to keep track of the text information.
Or overwrite the same line with number of spaces identical with the number of letters in the text.
Last edited by stevestrong on Thu Jul 20, 2017 9:44 am, edited 3 times in total.

acronis
Posts: 143
Joined: Thu Mar 02, 2017 12:32 pm

Re: [libmaple] FSMC LCD 16bit

Post by acronis » Thu Jul 20, 2017 9:41 am

Great !
I don't came to this idea ! I'll try it.
Thanks for Your continued help and tips !

vegfokic
Posts: 8
Joined: Sun Sep 03, 2017 9:00 am

Re: [libmaple] FSMC LCD 16bit

Post by vegfokic » Thu Sep 28, 2017 4:42 pm

I have stm32f407vet6 board
http://www.ebay.com/itm/STM32F407VET6-S ... No-Battery

And 3.2" lcd module.
http://www.ebay.com/itm/3-2-IPS-TFT-LCD ... o-Mega2560

My Arduino IDE 1.8.3

LCD libray:
https://github.com/ZinggJM/GxTFT

Hardware library:
https://github.com/greiman/Arduino_STM32

Using of these libraries choised ILI9481 or HX8357 driver and "stm32f4 boards/generic stm32f407v series" board working fine. I manage to run the graphicstest.

If I use other tft library from steve I manage to upload the code but there is no works. What I noticed that the screen is fully white, and after uploading the code there is a screen for a short time ~ 100ms show some register data or someting, and the screen is again just fully white. In the serial monitor I can see the result times of lines, rectangles..

https://github.com/stevstrong/Adafruit_ ... 6bit_STM32

I noticed the previous statement If I use GXTFT lib with other hardvare lib from danieleff also with working serial monitor, coised stm32generic for stm32 boards/ black f407ve/ze/zg boards

https://github.com/danieleff/STM32GENERIC

Any idea to solve this problem?

stevestrong
Posts: 1821
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Thu Sep 28, 2017 7:43 pm

I am wondering how the LCD lib with FSMC for F1 (pointed by your link) is supposed to work on the F4 board...

Anyway, if you use my 16 bit parallel library for the F4 board, you have to take my Arduino_STM32 repository, because the Roger's repository does not contain (nor Greiman's) my latest commits for F4 (PRs ongoing).

I just rebuilt the 16 bit lib for my generic black F4 board using FSMC, and it works.

For your specific display module you could adapt these values here: https://github.com/stevstrong/Arduino_S ... fsmc.c#L79 to those from here:
+#define ADDSET 7 // 100ns (ADDSET+1)*12.5ns = CS to RW
+#define DATAST 3 // 50ns (DATAST+1)*12.5ns = RW length

vegfokic
Posts: 8
Joined: Sun Sep 03, 2017 9:00 am

Re: [libmaple] FSMC LCD 16bit

Post by vegfokic » Sat Sep 30, 2017 10:12 am

I fully delete my old repo and TFT lib. Copy your freshly downloaded repo and TFT lib. Upload the sketch but no working.
I changed in the FSMC.C to FSMC_BTR_DATAST_(3), FSMC_BTR_ADDSET_(7) but still no work after upload.
I changed in the sketch the lcd ID to a fix value 8357 because my lcd dont has RD pin, no work after upload.
I fully clean your TFT lib just use one lcd driver 8357 and write the hx8357.h and c files, no work after upload.
I tied with roger repo with values of FSMC_BTR_DATAST_(3), FSMC_BTR_ADDSET_(7) and FSMC_BTR_DATAST_(6), FSMC_BTR_ADDSET_(2) , no work.
I upload directly your test.ino.bin file to the board but also no work.

I copy again roger repo and use GxTFT lib, working again with both values of FSMC_BTR_DATAST_(3), FSMC_BTR_ADDSET_(7) and FSMC_BTR_DATAST_(6), FSMC_BTR_ADDSET_(2)

Code: Select all

Benchmark                Time (microseconds)
Screen fill              54965
Text                     23824
Lines                    245359
Horiz/Vert Lines         12452
Rectangles (outline)     4334
Rectangles (filled)      134326
Circles (filled)         143890
Circles (outline)        229991
Triangles (outline)      48260
Triangles (filled)       153115
Rounded rects (outline)  67433
Rounded rects (filled)   241204
Gx TFT lib not work with your repo error: 'struct gpio_reg_map' has no member named 'BSRRL'..........in several lines

If GxTFT lib works with a roger repo and I use the same setting in the tft lib just set the board type and use the generic repo what is the difference?

Post Reply