cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC reading random value on all registers on STM32H747

Chris Rice
Associate III

Hello, we are seeing a weird symptom in our application in which all LTDC registers are reading back the same seemingly random number.  This is during a debugging session via system viewer (we are using Keil 5.40 and compiler 5), OR when reading and printing out values to serial at runtime.  The LTDC seems to be operating properly (mostly, working through various issues but it's displaying graphics at least.  I'm stumped, and so are the AIs I use.  Any ideas as to why this might be? 

6 REPLIES 6
mƎALLEm
ST Employee

Hello,


@Chris Rice wrote:

all LTDC registers are reading back the same seemingly random number.  


What do you mean by this? could you please provide more details? registers content continuously changing without any access from your side? which registers are changing? Perhaps they are supposed to change at runtime according to what you are doing in your application!

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Sorry, for context we are developing a display pipeline, LTDC reading from two SDRAM framebuffers, configured to drive a DSI wrapper and host to send via adapted command mode to a CO5300. I have to debug frequently, obviously, and can get register values from all other peripherals (DSI, RCC, FMC, etc) that make sense.  Except for LTDC.  Whether I look at that in system viewer, if I grab them in code and print them out over UART, even if I look at the values in memory viewer starting at the LTDC address (0x50001000), I see LTDC register values that don't make sense. Most often all zeroes, but sometimes the same random (?) value in each register.

That said, the LTDC is working (sort of)!  We are getting (slightly corrupted -- not sure if related) graphics on the screen from the framebuffers via the LTDC.

So, it's some sort of peripheral-specific readback error?  Or something by design, cant read anything while enabled, maybe?

All in all very weird.  It'd sure help my troubleshooting if I could inspect LTDC register settings.
 

Hello,

I ran the example: Projects\STM32H745I-DISCO\Examples\LTDC\LTDC_Display_2Layers provided in STM32CubeH7 on STM32H745I-DISCO and checked the address 0x50001000 and nothing special occurred:

mALLEm_0-1776415560100.png

There are some values are changing but I think this is normal: some internal registers are changing according to what the application is doing at run time and what the current status of the LTDC registers, but didn't see at any time that "all zeroed" LTDC region or that "?" character.

Perhaps, you need to simplify your code as much as possible by just running LTDC, remove all the remaining stuff.. 

It could be something in your code performing an unwanted access to that LTDC registers region by another DMA or another CPU access ...

Check also if the LTDC enable bit is always set in RCC_APB3ENR register and nothing doing an access to that register disabling it at run time. 

PS: STM32H745 and STM32H747 (share the same die).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thank you for checking that.  My coworker learned that we can see the LTDC registers before we enable the DSI wrapper, but not after. Very strange, I can't find anything about this.  At least we can view them now, but I'm worried that indicates some deeper problem...

LTDC + DSI command mode is two hw bridges (MCU offload) in real life undebugable. More intuitive is video modes, but both require meet timing conditions for speed from LTDC is little less as sped over DSI, otherwise ...

Debug is real only for line and frame ISR if are used .

Try to run the example in Cube example on your hardware and check if it shows the same behavior.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.