cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX calls HAL_Delay in ISR

ERROR
Associate II

Hi,

In TouchGFXHAL.cpp, HAL_DSI_EndOfRefreshCallback() contains HAL_Delay(). Meantime it is called from HAL_DSI_IRQHandler(). Can it be avoided?

The code is generated with TouchGFX Designer 4.22.0 for STM32H747I-DISCO.

The generated file is attached.

3 REPLIES 3

Hello @ERROR ,

I hope I have understood your question correctly. HAL_DSI_EndOfRefreshCallback function is used to send the frame buffer to the DSI display. If you remove the HAL_Delay(), you cannot get the correct frame buffer displayed. Therefore, the answer would be no it cannot be avoided.

If you have more questions, don't hesitate to ask

Mohammad MORADI
ST Software Developer | TouchGFX
ERROR
Associate II

Hi Mohammad,

Thank you for your fast and concrete response!

This is very very unusual engineering practice - adding delays in ISR.

1. It causes side effects for lower priority ISRs and RTOS's tasks, especially sensitive in time critical applications.

2. TouchGFX can be declined as not compliant to coding rules in some companies in industrial and automotive industries. It can even lead to switching to another MCU manufacturer, supporting another GUI.

Since actually I have no more questions, feel free to close this topic.

Hello all

Since this seems to be just callback from DSI, I think that using blocking HAL delay on the interrupt handler can be easily avoided. Just set some tick- handler for example which handles the delayed update start. Maybe somebody from TGFX programming team could take a look ?

Br J.T