cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F746ZG + 7" 800x480 SSD1963 16-bit FMC

ALomb
Senior

I successfully implemented (via CubeMX) an application to manage the display.

So FMC initialization is correct, as are the prmitive to interact with the LCD

I would now like use TouchGFX.

I have read in the various posts that it can be done.

My problem is: where to start?

I have searched for a long time in the forum, but we are referring to older versions of the TouchGFX Designer.

The ideal would be an HowTo to create a Custom Application Template for a project generated with CubeMX and Atollic (or SW4STM32).

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Okay, let me give you a super fast overview of what we need to do here without going into too many details:

  1. Configure RAM and flash memory - You've probably already done this.
  2. Configure the LTDC and Layer 1 (Maybe you've already done this)
  3. Configure TouchGFX with MCU specific (STM32F7) HAL, DMA, TouchController. Usually done in BoardConfiguration.cpp if you need inspiration from other applications. The TouchController is a hook in which you'll use your own drivers to sample touch over e.g. I2C.
  4. Create a gui task that runs the TouchGFX main event loop
  5. TouchGFX (and thus your application) will be driven by the VSYNC interrupt in STM32F7HAL.

Edit: Please have a look at https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-fmc

Let me know what you think and where you think we should start.

/Martin

View solution in original post

17 REPLIES 17
Martin KJELDSEN
Chief III

Funny you should ask about this because i've just had a meeting with the product owner about writing an extensive article on porting TouchGFX to custom hardware platforms. We have articles but none that are very concise in a ST setup (CubeIDE, CubeMX, etc).

The "Creating a custom application template" is universal, though. It is not compiler specific: https://touchgfx.zendesk.com/hc/en-us/articles/115002741432-Create-custom-Application-Template.

CubeMX has its own issues but i'm headed somewhere next week to help fix some of the issues with integration.

I don't expect you can select TouchGFX for your Nucleo board? I'd write some pointers here, but i'm affraid it would get too complex too soon. I'd love to help, though. Let's start by figuring out what you can actually configure using CubeMX currently.

Let me know.

/Martin

ALomb
Senior

Currently with the CubeMX I have configured FMC in 16-bit mode and related GPIOs for display control (reset, wait, interrupt).

The SSD1963 controller is correctly initialized and I can display graphics and text on the LCD.

I have already used TouchGFX on the STM32F746-DISCO and on the STM32F469I-DISCO (Atollic), but I need to go to a larger display (7 '' or 10.1 '').

I understand that it is currently possible only using boards that are already supported by TouchGFX Designer (such as EDT boards).

Another problem I have is that using internal controller of the micro (LTDC) many pins are used for LCD: the pins number usable for other devices goes down :crying_face:

Martin KJELDSEN
Chief III

Okay, let me give you a super fast overview of what we need to do here without going into too many details:

  1. Configure RAM and flash memory - You've probably already done this.
  2. Configure the LTDC and Layer 1 (Maybe you've already done this)
  3. Configure TouchGFX with MCU specific (STM32F7) HAL, DMA, TouchController. Usually done in BoardConfiguration.cpp if you need inspiration from other applications. The TouchController is a hook in which you'll use your own drivers to sample touch over e.g. I2C.
  4. Create a gui task that runs the TouchGFX main event loop
  5. TouchGFX (and thus your application) will be driven by the VSYNC interrupt in STM32F7HAL.

Edit: Please have a look at https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-fmc

Let me know what you think and where you think we should start.

/Martin

ALomb
Senior

Sorry @Martin KJELDSEN​ ,

I did not understand point 2. : can I use LTDC in my scenario ? Or "LTDC and Layer 1" means "FMC"?

I would say starting from point 3.

For point 5 I was thinking (as read in other posts) of the TE pin (Tearing Effect Signale) of the SSD1963 controller.

Martin KJELDSEN
Chief III

How is your LCD connected? Being an STM32F7 i'd assume it has a TFT controller. Unrelated to FMC.

Okay, starting from point 3 i'll try to come up with a plan to follow. We'll have to take things step by step. Maybe the first thing to do is get a working project base - The things you have working now, are they in an Atollic project, and configured with CubeMX?

ALomb
Senior

The LCD is connected as follow:

---- STM32 -------------------- SSD1963 ----------

PF0  FMC_A0 D/C - Data/Command Select

PD4  FMC_NOE RD# - 8080 Mode Read Strobe Signal

PD5  FMC_NWE WR# - 8080 Mode Write Strobe Signal

PD7  FMC_NE1 C/S - Chip Select

PD14 FMC_D0 DB0 

PD15 FMC_D1  DB1

PD0  FMC_D2  DB2

PD1  FMC_D3  DB3

PE7  FMC_D4  DB4

PE8  FMC_D5  DB5

PE9  FMC_D6  DB6

PE10 FMC_D7  DB7

PE11 FMC_D8  DB8

PE12 FMC_D9  DB9

PE13 FMC_D10  DB10

PE14 FMC_D11 DB11 

PE15 FMC_D12 DB12

PD8  FMC_D13 DB13

PD9  FMC_D14 DB14

PD10 FMC_D15 DB15 

PC2 GPIO_OUT RESET - Master Syncronize Reset

PC0  GPIO_EXTI0 TE - Tearing Effect

PC3 GPIO_OUT BL - Backlight ON/OFF

ALomb
Senior

Hi Martin,

you have some news ?

In the meantime I bought the Waveshare Open746-I board, which have HW architecture very similar to ST32746-Discovey.

I hope you can give support on this.

P.S. I tried to contact EDT, but I didn't get a concrete answer!

Best Regards

Antonello

Martin KJELDSEN
Chief III

Hi @Community member​,

What did you contact EDT about? Maybe i can help clarify with them. If you're using a configuration inspired by STM32F746-DISCO maybe you could start with an STM32F746-DISCO project (Start from the TGFX designer - V2.0.0 has an .ioc file for the board).

We should be able to start making necessary modifications from there on - Some settings and files used will be the same (e.g. STM32F7DMA- and -HAL.cpp)

How does that sound?

/Martin

ALomb
Senior

I contacted EDT because they have cards with a 7 "and 10.1" display that support TouchGFX. that is similar to my HW scenario.

I would first start implementing my software before starting the HW design of my card.

I look forward to your extensive article on porting TouchGFX to custom hardware platforms 🙂

Thanks for the suggestions. As soon as the board arrives I will let you know.

Do you think the first step is to create an AT for the new/custom board ?

If I start with the tamplate for STM32F746-DISCO, how do I change LCD resolution (800x480)?

/Antonello