2019-10-16 07:07 AM
I tried to create a project with the new versions of cubeide and touchgfx. After disabling the watchdogs and SDMMC2, and programming with the st-link utility, it ran in the debugger. The output isn't what I created in touchgfx.
I noticed that this line wasn't present in the linker file so I added it. Nothing changed.
QUADSPI (r) : ORIGIN = 0x90000000, LENGTH = 64M
Thanks for any suggestions.
2019-10-16 07:16 PM
By some method of reading posts and comparing with the code generated by Touchgfx, I have the project working. The recent changes to cubeide and touchgfx designer don't enable the automatic creation of a working project for the 769disco as far as I can tell.
I need to figure out why the screen transitions are so quick, but I've attached the working project in case it might help anyone. Someone was nice and created this https://www.youtube.com/watch?v=237lPdMsDZs&feature=youtu.be so I've got the QSPI working now too.
2019-10-16 11:53 PM
CubeIDE/CubeMX do not guarantee a working project. They don't know how to put your QSPI in Memory Mapped Mode, for instance. The "Board Selector" is a confusing interface in CubeMX, period. It's an IP initializer, but won't configure the CAS Latency of your SDRAM or anything QSPI, or send commands to setup your DSI display.
I don't blame people for being confused about this.
/Martin
2019-10-17 06:51 AM
I'm starting to understand better, but I don't understand why regenerating the files with cubemx breaks my project. These changes must be made every time cubemx generates code:
//In BoardConfiguration.cpp:
//in touchgfx_init function change the display size to this
uint16_t dispWidth = 800;
uint16_t dispHeight = 480;
//In HW_Init.cpp
//In MX_LCD_Init change the pitch function
HAL_LTDC_SetPitch(&hltdc, 800, 0);
//MX_DSI_INIT function
CmdCfg.CommandSize = 480;
CmdCfg.CommandSize = 800;
//change the orientation from portrait to landscape
OTM8009A_Init(OTM8009A_FORMAT, OTM8009A_ORIENTATION_LANDSCAPE);
Do I have cubemx set up incorrectly or is cubemx unable to modify these files? If I've done something wrong, I'd like to fix it.
2019-10-17 07:00 AM
What do you mean by "these changes must be made"? By you, manually? Any code you want to add to CubeMX generated code should be done inside the so called "User Code Sections" or it will get overwritten.
Otherwise everything should be configurable from within CubeMx.
/Martin
2019-10-17 07:10 AM
There are some things that stand out to me, like your command size, and probably also your LTDC layer settings (window settings and image w/h). In our own HAL for these DSI based boards what we do is transfer smaller regions at a time to avoid tearing in complex applications.
e.g.
pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 400;
pLayerCfg.WindowY0 = 0;
pLayerCfg.WindowY1 = 480;
pLayerCfg.ImageWidth = 400;
pLayerCfg.ImageHeight = 480;
...
CmdCfg.CommandSize = 400;
/Martin
2019-10-17 07:13 AM
Generating code in cubemx makes incorrect changes to the HW_Init.cpp and BoardConfiguration.cpp files.
I started with my working project, then made changes unrelated to graphics (removed unused peripherals). I generated code with cubemx to update the project and the changes in the above post had to be made. I just tried again by re-enabling ETH and it changed the HW_Init.cpp and BoardConfiguration.cpp files again. That's making me think that I have something set up wrong in cubemx. I had used the guide for the board to set up cubemx: https://touchgfx.zendesk.com/hc/en-us/articles/360020208091-Configuring-STM32F769I-DISCO