Skip to main content
BRado
Associate II
February 10, 2020
Solved

X-CUBE-TOUCHEGFX v4.13.0 vs STM32L4R9AI

  • February 10, 2020
  • 20 replies
  • 4496 views

Hello,

Can we, now, generate a STM32L4R9AI project with STM32CubIde including TouchGFX Middelware ?

X-CUBE-TOUCHEGFX v4.13.0 offer this possibility or not yet ?

Tankyou.

This topic has been closed for replies.
Best answer by Alexandre RENOUX

Hello,

The porting of the STM32L4R9 Discovery Board is currently being done. Hopefully, this will be finished by the end of this week.

I will write another comment to inform you.

20 replies

LSobo.1
Associate II
February 12, 2020

Hello,

I am also interested in an estimate of when the update for the STM32L4R9 Discovery Board will come. There is a rough schedule?

My problem is, that i have a custom board with the Display and Touch Controller of the STM32L4R9. I implemented the Display by myself, but i think it is not 100% correct.

Thanks!

Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
February 17, 2020

Hello,

The porting of the STM32L4R9 Discovery Board is currently being done. Hopefully, this will be finished by the end of this week.

I will write another comment to inform you.

Alexandre RENOUX
Visitor II
February 25, 2020

The STM32L4R9 Discovery Board is now available through TouchGFX Designer.

/Alexandre

BRado
BRadoAuthor
Associate II
March 3, 2020

hello Alexandre,

Thank's for your feedback.

I tried to to modify the .ioc generated for STM32L4R9I_EVAL board to change LTDC interface from DSI to RGB. Unfortunately, the project no longer compile !

In attached you find my project.

is it possible to perform interface change through ioc ?

Tank's for your help.

Alexandre RENOUX
Visitor II
March 4, 2020

What are your compiling errors ? Do you confirm using CubeIDE ?

Normally, it should be possible to perform interface change using CubeMX, but you might also need to change some user code section in the project to make it work. Some code has been added for the DSI and GFXMMU to work correctly.

/Alexandre

BRado
BRadoAuthor
Associate II
March 4, 2020

Yes I confirm using CubeIDE.

I think this error is related to DSI, but I do not understand why, because I disabled the DSI interface ...

Here is a snapshot of the compilation log:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

16:56:06 **** Incremental Build of configuration Debug for project STM32L4R9I_EVAL ****

make -j8 all

arm-none-eabi-g++ -o "STM32L4R9I_EVAL.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m4 -T"C:\TouchGFXProjects\MyApplication_27\STM32CubeIDE\STM32L4R9AIIX_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32L4R9I_EVAL.map" -Wl,--gc-sections -static -L"C:/Dev/STM32L4R9I_EVAL/stm32l4r9i_eval/STM32L4R9I_EVAL/Middlewares/ST/touchgfx/lib/core/cortex_m4f/gcc" -L"C:/TouchGFXProjects/MyApplication_27/Middlewares/ST/touchgfx/lib/core/cortex_m4f/gcc" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group

Application/User/TouchGFX/target/TouchGFXHAL.o: In function `LCD_ReqTear':

C:/TouchGFXProjects/MyApplication_27/TouchGFX/target/TouchGFXHAL.cpp:45: undefined reference to `HAL_DSI_LongWrite'

C:/TouchGFXProjects/MyApplication_27/TouchGFX/target/TouchGFXHAL.cpp:47: undefined reference to `HAL_DSI_ShortWrite'

C:/TouchGFXProjects/MyApplication_27/TouchGFX/target/TouchGFXHAL.cpp:48: undefined reference to `hdsi'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:68: STM32L4R9I_EVAL.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

16:56:08 Build Failed. 4 errors, 0 warnings. (took 1s.805ms)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Waiting for your help.

Thank's

Alexandre RENOUX
Visitor II
March 5, 2020

As you can in the log, HAL_DSI_LongWrite cannot be called and the struct hdsi is now undefined as you removed DSI in CubeMX.

Note that TouchGFXHAL.cpp is a programmer file meaning CubeMX does not modify it. So you have to change this file to match your new screen configuration (LTDC-RGB).

You can refer to the STM32F746G Disco application template to remove the correct parts as it uses LTDC-RGB without DSI.

/Alexandre

BRado
BRadoAuthor
Associate II
April 7, 2020

​Hello!

Now, I can build a project using using CubeIDE + X-CUBE-TOUCHEGFX but the problem : Nothing is displayed on the screen 

  • The backlight is on
  • I can detect touche on screen ( function is called periodically --> touchegfx task is running) 

can you please give me som ways ton investigate ?

RBI

Alexandre RENOUX
Visitor II
April 7, 2020

Hello,

When you say nothing is displayed, you mean black screen ? Do you see if the Tearing Effect callback is triggered ?

Make sure your pins are correctly set, your Flash and RAM is working correctly and that your display interface is well configured.

There's a new documentation available online maybe https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-ltdc-parallel-rgb can help.

/Alexandre

BRado
BRadoAuthor
Associate II
April 8, 2020

​Hello,

The screen is White.

I searche the Tearing Effect callback but I found that is defined only in DSI driver, I use the RGB interface ! Can you please give me the name of the callback what do you think about ?

 Thankyou

Alexandre RENOUX
Visitor II
April 8, 2020

Hello,

You will find it in TouchGFXGeneratedHAL.cpp

extern "C"
{
 void HAL_LTDC_LineEventCallback(LTDC_HandleTypeDef *hltdc)
 {
 if (LTDC->LIPCR == lcd_int_active_line)
 {
 //entering active area
 HAL_LTDC_ProgramLineEvent(hltdc, lcd_int_porch_line);
 HAL::getInstance()->vSync();
 OSWrappers::signalVSync();
 // Swap frame buffers immediately instead of waiting for the task to be scheduled in.
 // Note: task will also swap when it wakes up, but that operation is guarded and will not have
 // any effect if already swapped.
 HAL::getInstance()->swapFrameBuffers();
 GPIO::set(GPIO::VSYNC_FREQ);
 }
 else
 {
 //exiting active area
 HAL_LTDC_ProgramLineEvent(hltdc, lcd_int_active_line);
 GPIO::clear(GPIO::VSYNC_FREQ);
 HAL::getInstance()->frontPorchEntered();
 }
 }
}

When you use the RGB interface, TouchGFX Generator/CubeMX will generate all the code necessary for it to work, which is not the case for DSI where the programmer needs to implement his own custom interface.

/Alexandre

BRado
BRadoAuthor
Associate II
April 8, 2020

​I confirm that this callback is periodicaly called.

Alexandre RENOUX
Visitor II
April 8, 2020

What kind of UI do you want to display ?

Is the background of your UI supposed to be white ?

Except the DSI to LTDC-RGB change, did you change something else ?

/Alexandre