HAL GFXTIM How to Use

group GFXTIM_How_To_Use

GFXTIM peripheral overview

The Graphic Timer peripheral (GFXTIM) allows a smart management of graphical events for frame or line counting.

This file provides firmware functions to manage the following functionalities:

  • Initialization and de-initialization functions

  • Frame and line clock generator functions

  • Tearing-effect functions

  • Absolute timer functions

  • Relative timers functions

  • Event generators functions

  • Watchdog timer functions

How to use the GFXTIM HAL module driver

The GFXTIM HAL driver can be used as follows:

This module provides 10 sets of APIs that allows to:

  1. Initialize and De-Initialize the logical object:

    • To initialize the GFXTIM, use the HAL_GFXTIM_Init() function to:

      • Associate physical instance to logical object.

      • Enable the GFXTIM peripheral Clock:

        • Call the HAL_RCC_GFXTIM_EnableClock() function, which directly enables the clock for the GFXTIM peripheral.

        • Set the USE_HAL_GFXTIM_CLK_ENABLE_MODEL to HAL_CLK_ENABLE_PERIPH_ONLY in the stm32tnxx_hal_conf.h module. With this configuration, the GFXTIM peripheral clock will be automatically enabled during the initialization process by HAL_GFXTIM_Init() .

    • To de-initiliaze the GFXTIM peripheral, use the HAL_GFXTIM_DeInit() function that stops any ongoing processes and sets the GFXTIM handle states to reset.

  2. Manage the clock generator Several APIs are available to manage the clock generator (Line clock generator and/ or Frame clock generator)

  3. Control the Tearing-effect detection:

  4. Manage the absolute line and the absolute frame: After clock generator configuration, the absolute timer (absolute line and/ or absolute frame) can be used.

  5. Manage the relative timers: After frame clock generator configuration, the relative frame can be used. Several APIs are available to manage the relative timers.

  6. Configure the event generators: This feature is used to generate a complex event.

  7. Manage the watchdog timer: The GFXTIM watchdog timer is used to generate an alarm and pre-alarm events.

  8. Peripheral state Functions:

  9. IRQHandler and Callbacks Functions:

  10. User data Functions: