cancel
Showing results for 
Search instead for 
Did you mean: 

Two problems porting TouchGFX to CoreH743I - missing LTDC_IRQHander() and a HardFault during HAL_Init().

GGowi.1
Associate II

Hi,

I'm trying to port TouchGFX to the CoreH743I board and I'm following the instructions on how to do that. In part 3 on bringing up the framebuffer I'm running into two problems:

The internal CubeMX in CubeIDE is not generating the LTDC_IRQHander() function in stm32h7xx_It.c, so I can't really time my frame rate.

The other problem is a hard fault being generated when HAL_Init() tries to call NVIC_SetPriorityGrouping(PriorityGroup) by calling NVIC_SetPriorityGrouping(PriorityGroup);

The debugger makes it past the assert but then hard faults on the call to NVIC_SetPriorityGrouping(). It does not allow me to step into that function - it immediately goes to the HardFault_IRQ handler.

EDIT: it would help if I attached the .ioc file... so here it is.

Any ideas?

Thanks

8 REPLIES 8
Romain DIELEMAN
ST Employee

Hi,

LTDC_IRQHandler is not generated because the LTDC global interrupt is not enabled in CubeMX. Go to NVIC settings in the LTDC Mode and Configuration section in your cubeMX project to solve this.

/Romain

Thanks! I'll try that and see if it fixes the other problem, too.

OK - that created the global interrupt but it is still generating a hard fault when it calls HAL_Init().

Updated ioc attached because I fixed a couple of things that I thought were causing problems - the screen size is now the actual screen size while the layer size id the small layer size because the screen is too large to fit in the built-in RAM (the board has 8mb of external RAM as well).

I also noticed that the DMA2D was not enabled but was on the sample code using STemWin that works, so I enabled that. It didn't help.

Thanks

I managed to make it stop crashing - I created a new project and input the settings and for some reason everything worked, so I must have done something else before.

However, after trying to debug with the LCD screen attached, I can't connect to the board any more:

error in initializing st-link device. reason target not halted

I'll look here for pointers. I hope I didn't fry the board. The ST-LINK works because I tested it on another board after receiving that error on the CoreH743I.

Arh that is weird. I believe you are using STM32CubeProgrammer ? Might be completely useless but have you tried playing around the ST-Link configuration + firmware upgrade?

Hi Romain,

Yes, I have tried various combinations and unfortunately, it didn't work. :(

I went ahead and ordered a new board, but I still hope to be able to resurrect this one since the new board ships from China and will take several weeks to arrive.

A guy on Facebook gave me a suggestion that worked - plug everything in and start up STM32CubeProgrammer. Press the reset button on the board, then click on the "Connect" button in STM32CubeProgrammer and simultaneously let go of the reset button on the board. Worked the first time.

I'll update again once I finish testing the code to see if it can write to the screen.

Thanks

OK - it's not crashing any more. It is also not writing to the screen so I'm going to create a new question about the screen.

Thanks for your help!