2021-11-18 11:26 AM
I am using an STM32F429IIT6 with SDRAM connected to SDRAM 2, SDCKE1+SDNE1, Byte enabled "Disabled" do to the pin conflict with the LTDC settings for the display, a 480x272 RGB888 display connected to LTDC. I can read and write the SDRAM with code such as
uint32_t *externalRAM = 0xd0200000;
const uint32_t size = 120000;
//write external RAM
for(int i = 0; i < size; i++)
{
externalRAM[i] = i;
}
reading the SDRAM back in the same way confirms ability to read and write SDRAM. If I fill the frame buffer after setting up the rest of the system using the generated code from STM32CubeIDE the SDRAM data is written to the display showing the solid color I programmed into the SDRAM. I realize since all the values are the same in SDRAM I don't know yet if the the DMA transfer is 16 or 32 bits wide yet. But most of the system is working.
I can see with the debugger that the SDRAM is being filled but appears the writes are 16 bits wide and not reflecting what was written. For example a signal 32bit word that should be
0x030004ff is showing in SDRAM as 0xffffffff 0xffffff03 0xffffff04 and repeats. I was able to use a uint16_t var making multiple writes under program control to get the same result. uint16_t* frameBuffer0 as defined in the generated code in file HAP.cpp confirms the uint16_t pointer.
The issue may be from setting up the Framebuffer Pixel Format under Software Packs TouchGXF Generator in STM32CubeMX. When setting to ARG8888, which is the setting in LTDC Pixel Parameters, I get a page of errors in TouchGFXGeneratedHAL.cpp
FreeMarker template error (DEBUG mode; use RETHROW in production!):
The following has evaluated to null or missing:
==> data.parameters.tgfx_video [in template "TouchGFXGeneratedHAL_cpp.ftl" at line 81, column 6]
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
... and the list goes on.
When I set the Framebuffer Pixel Format under Software Packs RGB888 the code is generated without error. However the writes to SDRAM are 16bit wide as described above.
I am hoping there is a work around for this already. If not perhaps there is a strategic location I can convert the writes to the required width.
For completeness I have attached a .ioc configuration file with only the SDRAM and LCD configured. I have the latest version of CubeMX.
Thanks in advance for any help.
Solved! Go to Solution.
2022-06-29 07:31 AM
Hello @RLarr.1 ,
This issue is fixed in STM32CubeMX latest release.
V6.6.0 is now available under this Link.
Thanks for your contribution.
Sara.
2021-11-26 03:37 AM
Hello @RLarr.1 ,
Thanks for your feedback,
This issue is reported internally to be checked.
I will keep you posted with the updates.
Regards,
Sara.
2022-06-29 07:31 AM
Hello @RLarr.1 ,
This issue is fixed in STM32CubeMX latest release.
V6.6.0 is now available under this Link.
Thanks for your contribution.
Sara.