cancel
Showing results for 
Search instead for 
Did you mean: 

No slide transition effect for STM32L4R9 Discovery ? Please help me!!

JPark.14
Associate III

Dear All,

I have tried to make the slide transition effect when a screen is changed to another screen. I set all "Interactions" in TouchGFX designer.

  • Change screen
  • Transition : Slide
  • Transition Direction : East
  • other setting are all good.

But the screen transition act like "None" transition option.

"Cover" transition option ==> it works.

"Slide" transition option ==> it acts like "None"

But one thing, the simulator works fine for evey options.

Why "Slide" transition option doen't work? Please give me some advises about this matter.

Thanks in advance.

FYI, I don't use GFXmmu and I use DMA2D.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

You're missing an "animation storage" buffer - The slide transition takes a snapshot of the current framebuffer it uses to create the transition. If you do not want to use a buffer you can use "cover transition".

How did you create the project?

/Martin

View solution in original post

8 REPLIES 8
Martin KJELDSEN
Chief III

You're missing an "animation storage" buffer - The slide transition takes a snapshot of the current framebuffer it uses to create the transition. If you do not want to use a buffer you can use "cover transition".

How did you create the project?

/Martin

Martin KJELDSEN
Chief III
    /**
     * @fn virtual void HAL::setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true)
     *
     * @brief Sets the address used for frame buffers, usually located in external memory.
     *
     *        Sets the address used for frame buffers, usually located in external memory. Will
     *        reserve memory for one or two frame buffers based on display size. Will optionally
     *        also reserve memory for a third frame buffer used for animationStorage.
     *
     * @param [in] adr                 Starting address to use for frame buffers.
     * @param      depth               (Optional) Depth of each pixel in bits, default is 16.
     * @param      useDoubleBuffering  (Optional) If true, reserve memory for an extra frame buffer.
     * @param      useAnimationStorage (Optional) If true, reserve memory for animation storage.
     *
     * @deprecated Use the setFramaBufferStartAddress with 'format' parameter instead of 'depth'
     */
    virtual void setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true);

e.g.

hal.setFrameBufferStartAddress((uint16_t*)frameBuf0, bitdepth, true, true);

/Martin

Dear Martin,

Thank you very much for your quick response. I could learn one more about TouchGFX from your reply.

You ment that I have to set another framebuffer for using AnimationStorage. Right?

My code is from cubeMX and the initialization code is like the below.

// from MyProject\TouchGFX\target\generated\TouchGFXGeneratedHAL.cpp

void TouchGFXGeneratedHAL::initialize()

{

   HAL::initialize();

   registerEventListener(*(touchgfx::Application::getInstance()));

   setFrameBufferStartAddresses((void*)FRAME_BUFFER0, (void*)FRAME_BUFFER, (void*)0);

   lockDMAToFrontPorch(false);

}

I have to use double buffering and I already use 400Kbyte for frame buffer. I think I cannot afford to use another 200kbyte for framebuffer.

(STM32L4R9 has just internal 640K SRM. and I have to use the remained 140K for the other usage.)

So, I have a question about this matter. Can I use external PSRAM for the animation storage frame buffer? OR I have to use only internal SRAM for frame buffer?

Thanks in advance!!

J.Park

You can use SDRAM or PSRAM just fine. Just supply a pointer to where you want the storage to be located.

setFrameBufferStartAddresses((void*)FRAME_BUFFER0, (void*)FRAME_BUFFER, (void*)ANIMATION_STORAGE);

/Martin

Dear Martin,

It works perfectly with PSRAM!! Thank you so much~~

J.Park

Glad it's working! :)

ZRego.1
Associate II

Hi!

I have a similar problem on STM32F74G-DISCO board. My default code looks like that:

setFrameBufferStartAddresses((void*)0xC0000000, (void*)0xC003FC00, (void*)0);

0xC0000000 is the address of external SDRAM that is available on the DISCO board.

How do I know what is the next available address which I can use for animation storage?

I can estimate that the second buffer at address 0xC003FC00 is same size as the first at 0xC0000000, which results into 0xC007F800 being available for the third (animation) buffer. However that is not the case, because part of the image on display becomes corrupted, probably because the RAM is overwritten. So how do I effectively determine the next available RAM address?

You determine it as you say - If something is getting overwritten something else must be wrong. TouchGFX should keep within the confines of a buffer based on the dimensions and depth of the application.