[libmaple] FSMC LCD 16bit

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] FSMC LCD 16bit

Post by Pito » Thu Jul 06, 2017 4:59 pm

I refer below these two generic Black F407VET6/ZET6 boards:

http://wiki.stm32duino.com/index.php?title=STM32F407

you may get them here:
https://www.aliexpress.com/item/Free-sh ... 22721.html
https://www.aliexpress.com/item/Free-sh ... .64.4hrwhV
.
BLack407VE_TFT_FSMC.JPG
BLack407VE_TFT_FSMC.JPG (50.5 KiB) Viewed 195 times
BLack407ZE_TFT_FSMC.JPG
BLack407ZE_TFT_FSMC.JPG (47.19 KiB) Viewed 195 times
.
There are 2 differences:

Code: Select all

TFT funct --- VET -------- ZET 
================================
CS         FSMC_NE1     FSMC_NE4      
RS         FSMC_A18     FSMC_A6
.
Acelex TFT-32C for BlackF407VE_ZE.JPG
Acelex TFT-32C for BlackF407VE_ZE.JPG (17.86 KiB) Viewed 184 times
.
.

@stephen: you have to adjust the CS and RS signals in your driver for your particular board..
Mind the NE1 or NE4 chipselect signals are set via the FSMC configuration (in case you are using FSMC).

A Chipselect with NE1 means the FSMC device address space (with A18 inside) starts at 0x60000000:

Code: Select all

RS = 0 ... you wr/rd at 0x60000000
RS = 1 ... you wr/rd at 0x60040000
A Chipselect with NE4 means the FSMC device address space (with A6 inside) starts at 0x6C000000:

Code: Select all

RS = 0 ... you wr/rd at 0x6C000000
RS = 1 ... you wr/rd at 0x6C000040
FYI: A Chipselect with NE3 means the FSMC device address space starts at 0x68000000 - this is the external SRAM's chip space on the ZET board (the pads on the pcb's bottom side)..

In order to get the FSMC configuration, for example in CubeMX, select ChipSelect=NE1, Type=LCD, RegisterSelect=A18, DataWidth=16 and it should generate the FSMC setup for you such it enables only the FSMC address pinXY related to RS=A18, thus you may use the other FSMC related address pins for your own purpose..
Last edited by Pito on Fri Jul 07, 2017 11:32 am, edited 6 times in total.
Pukao Hats Cleaning Services Ltd.

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

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Thu Jul 06, 2017 7:23 pm

There is one more thing which you can do: play arround with these values: https://github.com/stevstrong/Arduino_S ... fsmc.c#L79
Increasing them means slower but more reliable access.
These values work for me, but since i dont know your board, it may have other requirements.

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

Re: [libmaple] FSMC LCD 16bit

Post by Pito » Thu Jul 06, 2017 7:32 pm

FSMC_BTR_DATAST_(6) | FSMC_BTR_ADDHLD_(0) | FSMC_BTR_ADDSET_(2));
I would start with e.g.
DATAST 50 (1..255)
ADDSET 15 (0..15)
as the TFT displays could be slow..
Pukao Hats Cleaning Services Ltd.

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

Re: [libmaple] FSMC LCD 16bit

Post by zmemw16 » Thu Jul 06, 2017 8:07 pm

i think i mentioned a18/a6 and said something else changed as well.
that's why i said Steves TFT 16bit library would need attention.
i suppose a #define setting a V|Z flag in the sketch for the library, not the best way i think
i know something like __STMF4__ is set, but is there one distinguishing between V and Z ?
stephen

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

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Thu Jul 06, 2017 8:25 pm

Stephen, what you say refers to the v/z difference between the boards.
I think as long as you use the black vet6 board (and it seems that you do, see first post), my software should run on it without any change.
Exept maybe some fine tuning for fsmc, but not more essential.

But now i realize that not all my wires come from the onboard tft socket, i have to check it again.
Last edited by stevestrong on Fri Jul 07, 2017 5:50 am, edited 1 time in total.

zmemw16
Posts: 1369
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 12:31 am

[e3]@Pito your connector for the ZE is wrong[/e3] NOTE TO SELF it's the ZG that has a 34w socket

i wonder if the Black F4 boards need a wiki page all of their own :?:
i have schematics for all 3, VE, ZE & ZG.
i now have pictures of all 3 front & rear
i will have pictures of each display connections silk screen.

any chance of a picture of your setup :?:
i would be very interested in those 'extra' connections :) i don't understand how you have extras though. :?
the displays that i have connect only via the tft header, there are no other connectors available on the display.

i tried the links from my order, it needed a login, so the store is
Numon Electronic Cyberport Store
https://www.aliexpress.com/store/2274002

these links are to the relevant image location.
these i think are for the ZE & ZG, should be 34w and a header on the display
https://ae01.alicdn.com/kf/UT8z8FjX2hXX ... 2b40d25fe8
up to date product
http://ae01.alicdn.com/kf/HTB1JH9SRFXXX ... a5d49c2a2c

for the VE, should be 32w and a socket on the display
https://ae01.alicdn.com/kf/UT8z8FjX2hXX ... 2b40d25fe8

up to date product
http://ae01.alicdn.com/kf/HTB1JH9SRFXXX ... a5d49c2a2c

just confirmed that the pin labelling on some '3.2 LCD MODULES' i got yonks ago is an exact match for the ZE/ZG boards.
[e1]
https://ae01.alicdn.com/kf/HTB1U3PcKXXX ... XFXXXe.jpg
[/e1]
£8.48 & £8.88
KELI Electronics Technology Co., Ltd
i'm a repeat customer of theirs, nothing excessive in price though
https://www.aliexpress.com/store/623118 ... .27.Vqw0Ec
China Electrical Industry Store
maybe, not sure
https://www.aliexpress.com/store/216604 ... 0.0.I1aIWb

stephen

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

Re: [libmaple] FSMC LCD 16bit

Post by Pito » Fri Jul 07, 2017 8:55 am

I've updated my above "headers - TFT connectors" post with links as it seems we starting to introduce a bit of chaos in what we understand as generic Black F407VET/ZET :)
Last edited by Pito on Fri Jul 07, 2017 9:16 am, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

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

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Fri Jul 07, 2017 9:09 am

I was always referring to this (generic) black F407VET6 board (wiki link).
The ZET6 variant on the bottom of the page should be actually detailed, please, one of you who owns that, feel free to add more information.
Last edited by stevestrong on Fri Jul 07, 2017 11:51 am, edited 1 time in total.

zmemw16
Posts: 1369
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 10:54 am

the Numon Electronic Cyberport Store has only the ZGT in stock, but it's dropped a bit in price.

i put up the original pictures of the VE & ZE on the wiki, someone else inserted a board in between them.
first, okular & gimp
now remembering how to upload ?

stephen

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

Re: [libmaple] FSMC LCD 16bit

Post by stevestrong » Fri Jul 07, 2017 1:25 pm

I think I remember now I had problems to set the FSMC_A18 line high (used as LCD_CD(RS) control line), it didn't work.
https://github.com/stevstrong/Arduino_S ... fsmc.c#L69
Instead, another address line, I think A16 worked only in the current configuration, and I don't know why...
Could you check with a scope whether this pin will be set when writing something to "fsmcData"?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest