HAL GFXMMU Use Cases

Required Configuration

@startuml

==Initialization==



participant "User application" as App

participant "HAL GFXMMU Driver" as  GFXMMU 



App -> GFXMMU : HAL_Init()

note right : initialize the GFXMMU handle and associate an instance

activate GFXMMU

GFXMMU --> App : hal_status:HAL_OK 

deactivate GFXMMU 

note left : return

==Configuration==

App -> GFXMMU  : HAL_GFXMMU_SetConfig()

activate GFXMMU

note right : Global configuration : select the block size

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM

deactivate GFXMMU

note left : return



@enduml

Called functions:

User Application with Enabling the Packing Mode

@startuml

==Initialization==



participant "User application" as App

participant "HAL GFXMMU Driver" as  GFXMMU 



App -> GFXMMU : HAL_Init()

activate GFXMMU

GFXMMU--> App : hal_status:HAL_OK 

deactivate GFXMMU 

note left : return



App -> GFXMMU  : SystemClock_Config()

activate GFXMMU

GFXMMU --> App : hal_status:HAL_OK 

deactivate GFXMMU

note left : return



App -> GFXMMU  : HAL_GFXMMU_Init()

activate GFXMMU

note right : Initialize the GFXMMU handle and associate an instance

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return



== Global Configuration ==

App -> GFXMMU  : HAL_GFXMMU_SetConfig()

activate GFXMMU

note right : Global configuration

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return



== Set Packing mode ==



App -> GFXMMU  : HAL_GFXMMU_SetConfigBuffPacking()

note right : Set the packing mode configuration

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

note left : return

App -> GFXMMU  : HAL_GFXMMU_EnableBuffPacking()

note right : Enable the buffer packing

GFXMMU --> App : hal_status:HAL_OK 

note left : return



== Buffer Configuration ==

App -> GFXMMU  : HAL_GFXMMU_SetBuffPhysicalAddr()

activate GFXMMU

note right : Set the physical address to the dedicated buffer

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return



@enduml

Called functions:

User Application with Configured LUT Lines and Enabling Packing Mode

@startuml

==Initialization==



participant "User application" as App

participant "HAL GFXMMU Driver" as  GFXMMU 



App -> GFXMMU : HAL_Init()

activate GFXMMU

GFXMMU--> App : hal_status:HAL_OK 

deactivate GFXMMU 

note left : return



App -> GFXMMU  : SystemClock_Config()

activate GFXMMU

GFXMMU --> App : hal_status:HAL_OK 

deactivate GFXMMU

note left : return



App -> GFXMMU  : HAL_GFXMMU_Init()

activate GFXMMU

note right : Initialize the GFXMMU handle and associate an instance

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return



== Global Configuration ==

App -> GFXMMU  : HAL_GFXMMU_SetConfig()

activate GFXMMU

note right : Global configuration

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return

== Configuration LUT lines ==

App -> GFXMMU  : HAL_GFXMMU_SetLUT()

activate GFXMMU

note right : LUT Lines configuration

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return

== Buffer Configuration ==

App -> GFXMMU  : HAL_GFXMMU_SetBuffPhysicalAddr()

activate GFXMMU

note right : Set the physical address to the dedicated buffer

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

deactivate GFXMMU

note left : return

group optional Set packing mode



==Enable Packing mode==

group optional Disable address translation

App -> GFXMMU  : HAL_GFXMMU_DisableLUT()

note right : Activate all lines and blocks 

GFXMMU --> App : hal_status:HAL_OK 

note left : return

end

App -> GFXMMU  : HAL_GFXMMU_SetConfigBuffPacking()

note right : Set the packing mode configuration

GFXMMU --> App : hal_status:HAL_OK or HAL_INVALID_PARAM 

note left : return

App -> GFXMMU  : HAL_GFXMMU_EnableBuffPacking()

note right : Enable the buffer packing

GFXMMU --> App : hal_status:HAL_OK 

note left : return

end



@enduml

Called functions: