Unable to write into LTDC registers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-17 6:53 AM
Hello everyone,
I've been trying to integrate a simple TouchGFX project into STM32CubeIDE (so that I can add my own code to it), it's supposed to print simple graphics on the screen of a STM32L4R9I-EVAL board, but I stumbled upon an issue in the LDTC initialization : I can't write the LTDC configuration in the correct registers. In HAL_LTDC_Init, the LTDC registers are supposed to be initialized with parameters (e.g. the display size goes in AWCR), but when monitoring them through the debugger's memory monitor at address 0x40016800, I only see zeros... Note that earlier it was all 0x2220, I have no idea why it changed. Also, I can see that other peripherals don't have this issue because there are non-zero bytes near address 0x40000000 (the start of memory-mapped peripherals).
I attach 3 screenshots at different points in the program's execution (using breakpoints), to show that the value of register AWCR does not change despite being written into. Plus 2 screenshots showing the memory monitor.
This is the code generated by CubeMX, I have not modified it. I also attach the full project. I created it from STM32CubeIDE as a C++ project. The CubeMX configuration is copied from the TouchGFX project, so they are identical.
Any help will be appreciated !
- Labels:
-
LCD-LTDC
-
STM32CubeIDE
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 4:20 AM
> not change anything to the state of the LTDC registers (nor RCC)
If RCC_APB2RSTR.LTDCRST is still 1, it's still the source of your problem, wherever it comes from.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 6:20 AM
It is not 1 anymore. Sorry I forgot to mention that ^^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 8:00 AM
I don't know, then, sorry.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 8:01 AM
Thanks for trying to help anyway !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-21 12:09 PM
Try start new project and use only cube generated LTDC init as first test.
Steps for CUbeIDE:
- add new STM project
- in wizard choice your MCU on custom board or in board selection
- in MCU config wizard choice CLOCK config properly
- enable peripherals ...
- close IOC and generate code
- build and test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-24 2:47 AM
I folled your steps, and indeed the LTDC registers were properly initialized.
Si I started adapting the CubeMX config to the one of the project, to see at which point it starts malfunctionning : It seems to work fine until I try to integrate TouchGFX.
However I can't figure out how I had integrated TouchGFX last time, it's so intricate I can't make it compile... But I guess the problem arose from TouchGFX the first time too.

- « Previous
-
- 1
- 2
- Next »