cancel
Showing results for 
Search instead for 
Did you mean: 

Moving the needle in bare metal by using LTDC drivers.

PM.5
Associate III

Hi...

I am working on stm32f746g board with display resolution of 480 x 272 . I have configured LTDC in 2 layers. One layer contains Gauge image & another with Needle image. Right now it is displaying static images of both gauge & needle. I want to move the needle. Does anyone knows how to move the needle by giving some values?

I want to know without using Touchgfx ,Embedded wizard kind of IDE's can we display a static as well as dynamic images like Gauge with needle rotating at user defined speed.

5 REPLIES 5
KnarfB
Principal III

Image rotation by an arbitrary angle is not supported/accelerated in hardware. If the needle consist of few lines, polygons, ..., compute rotated coordinates and draw it from scratch each time the needle is moving. If the needle is a sophisticated pixel image, you need to implement image rotation yourself, probably with pixel interpolation, or, if the external flash size permits, pre-compute 100 or so rotated needle images and store them in flash.

hth

KnarfB

PM.5
Associate III

Thank you for the reply.

I tried by Touchgfx IDE .It is working fine when FREERTOS has enabled. But when the same thing I try to do by disabling FREERTOS it is not working. What is the issue I am not getting. As I was unable to display without FREERTOS, I tried just by using two LTDC layer, now I got to know it will be little complicated when I go higher level.

The files configured with RTOS & without RTOS I have given below . Please go through those if possible & if any suggestion please let me know .

Pooja M

Your zip seems as project from TouchGFX ... designed and optimized for RTOS.

For noOS you need create project from scratch and no edit some parts...

PM.5
Associate III

Thank you for the reply.

Your second point is not clear , what do you mean by creating from scratch & no edit some part . Can you please explain it.

I tried to do as per this link , but Its not working.

https://community.st.com/s/question/0D53W00000HNRWBSA5/how-to-run-touchgfx-without-rtos

Pooja M

As in article is writed “ in CubeMX (and regenerate code) “,
but Alexandre omit say : TGFX created projects isnt perfectly prepared for this. Regenerating from ioc corrupt some custom setups.
And primary i explain regenerating only swap generated files. If other files exist, stay as is for first generation config.
For example in target folder files stay and in target/generated is reconfigured for noOS or for other colour or any other change.
MX wizard isnt miracle for one click and LCD works. Debug your code and ...