2021-01-07 02:16 AM
Everything is working fine having the framebuffer in RAM_D1 (0x24000000).
This is what I have done trying to move my frame buffer to RAM_D2 (0x30000000):
TouchGFX_Framebuffer :
{
*(TouchGFX_Framebuffer)
*(TouchGFX_Framebuffer*)
. = ALIGN(4);
} >RAM_D2
__HAL_RCC_D2SRAM1_CLK_ENABLE();
__HAL_RCC_D2SRAM2_CLK_ENABLE();
__HAL_RCC_D2SRAM3_CLK_ENABLE();
What do I miss out for this to work?
Solved! Go to Solution.
2021-01-13 07:06 AM
This https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices pointed me to the conclusion that this is not possible.
The DMA2D can copy data from QSPI to RAM_D2 (this I can confirm from debugging) but the LTDC can not take data from RAM_D2 because there is no connection between them. And therefor using RAM_D2 for frame buffer is not possible on STM32H7. Take a look at the memory architecture below.
Is my conclusion correct?
2021-01-07 06:20 AM
Hi, you dont write how big is your buffer , but i mean 128k here is low ?
And how your TouchGFX_Framebuffer is used in code?
2021-01-07 06:44 AM
Hi, my framebuffer is (320*240*3) 225KB and the RAM_D2 area is 288KB (using STM32H743ZI) so this should be enough.
From TouchGFX in TouchGFXGeneratedHAL.cpp:
namespace {
// Use the section "TouchGFX_Framebuffer" in the linker to specify the placement of the buffer
LOCATION_PRAGMA("TouchGFX_Framebuffer")
uint32_t frameBuf[(320 * 240 * 3 + 3) / 4] LOCATION_ATTRIBUTE("TouchGFX_Framebuffer");
static uint16_t lcd_int_active_line;
static uint16_t lcd_int_porch_line;
}
2021-01-07 07:44 AM
Maybe this help you How to properly enable all RAMs on a single core STM32H7?
2021-01-07 08:23 AM
Thanks @MM..1 for helping out.
Yes, I have seen this and tried it but with no luck!
I do believe this is the issue here, so I think I'm not implementing this correctly.
I will do some debugging tomorrow to get more answers.
2021-01-08 06:59 AM
I can confirm that the RAM_D2 is working, I can read and write to the RAM_D2 area.
The frame buffer is setup to use RAM_D2 address @0x30000000.
But the screen is black, nothing is showing up on the screen...
In the linker file, this works:
TouchGFX_Framebuffer :
{
. = ALIGN(4);
*(TouchGFX_Framebuffer)
} >RAM_D1
This don't work:
TouchGFX_Framebuffer :
{
. = ALIGN(4);
*(TouchGFX_Framebuffer)
} >RAM_D2
The frame buffer contains the same data in both cases, so it seams like it's not capable to push data to display when it's in the RAM_D2 area.
Does anyone have any clue why it's not working from RAM_D2?
Is it a DMA issue her not working with RAM_D2?
2021-01-08 08:07 AM
You dont write how your LCD is connected and ... , but maybe you set new address only for TouchGFX and not hw layer. Your declaration in namespace
uint32_t frameBuf ...?
Try check in debuger how data is in framebuff and what is send to display.
2021-01-11 04:25 AM
I use the STM32H743ZI on a custom board and I use parallel interface LTDC with ChromART (DMA2D), pixel format RGB888.
When I debug I can se that the LTDC frame buffer CFBADD is set to 0x30000000 (RAM_D2) and also the DMA2D memory address MA is also using the RAM_D2 (0x30000000 to 0x30038400, frame buffer size 225K).
The application is running fine (except for there is no picture on the LCD) and also if I have the application to change the screen picture I can see the RAM_D2 (0x30000000 to 0x30038400) content is changing.
Remember the only thing I have to do is change which RAM (RAM_D1 or RAM_D2) in the linker where the frame buffer (TouchGFX_Framebuffer) shall be, and using RAM_D1 it works fine!
2021-01-13 07:06 AM
This https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices pointed me to the conclusion that this is not possible.
The DMA2D can copy data from QSPI to RAM_D2 (this I can confirm from debugging) but the LTDC can not take data from RAM_D2 because there is no connection between them. And therefor using RAM_D2 for frame buffer is not possible on STM32H7. Take a look at the memory architecture below.
Is my conclusion correct?
2021-01-13 12:15 PM
Yes when isnt RAM_D2 accessible over AXI SRAM , then you have right about LTDC. Otherwise MPU is boss.