You will be surprised. It looks like, apart from one command, I simply removed all the rest.
I was working with the BSP Example / Demo. I.e. the board support package demo - that's what you can see in my photos before, with the ST logo etc.
My changed version of that sequence looks like this :
/*************************/
/* LCD POWER ON SEQUENCE */
/*************************/
// very minimal init code for panasys round octagonal tft
// this is 0x36 for MADCTL, with parameter 0x48 for xmirror, top left to bottom-right, bgr
HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x36, 0x48);
//HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3A, 0x55);
/* Sleep out */
HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P0, DSI_EXIT_SLEEP_MODE, 0x0);
HAL_Delay(120);
Essentially I replaced all the LCD init code with a simple MATCTL 0x48 (that is cmd 0x36, data 0x48).
Perfect, thanks for your information, very useful for me.
However, there is a signal, the TE (Tearing effect), I don't know if you are using it. For pictures, it is perhaps not important, but to play videos may be essential, it is a synchronization signal that sends the screen to the program, to avoid an effect that would cause half of the upper image not to be synchronized with the other half, let's say half of the screen would show the current frame and the other half still the previous frame.
This octagonal screen does have the TE signal, but I have other screens that do not. I suppose that the screens that do not have the TE signal would not serve to play video, just to see images.
In the list of commands sent to me by the seller of the screen, there is command 35, data 00, related to the activation of the TE signal.
I created a rough GFXMMU_LUT, but this is just to save memory by, erm, not allocating the bits of pixel space that would be outside of the circle. I think you can work without it..
I also have the same kit you used to do your tests with round screens. I read something about specific routines to save space in RAM, eliminating all the pixels that are outside the circular area of ​​the screen. As soon as I get my screen to work, I will see if setting up that routine correctly, I can optimize the performance of the program. Notwithstanding the example sources for the STM32F769, they are for rectancular screens such as the one included in Discovery, these routines of the STM32L4R9I-DISCOVERY kit should be added.
Obviously I disabled all touchscreen stuff in the demo code
I made other modifications for the width, height, etc
essentially, all the modifications I made to the BSP LCD drivers, are in the files here:
http://internetsomething.com/lcd/bsp-example/
I'll see if I can get the screen to do anything useful on the STM32F769I Disco board, although I only have about an hour, and I haven't been near C or STM32 in what feels like a year, and I was only just starting to learn it then too, so it's not very clear to me really
I will also check all the parameters, in the Cube for the F769, there is also the Drivers / BSP directory with the sources for the lcd that define all those parameters. The sources in the Cube for Discovery with the F769 are for visualizing images. The source for playing videos is for the EVAL board.
Both, Discovery and EVAL evaluation boards, use the same microcontroller, the differences in practice to be able to use the EVAL example source code in Discovery are these.
1.- The EVAL has two SD cardholders, the Discovery only one. In the EVAL sources the cardholder that does not have the Discovery is used, I think the SD1. It would be necessary to edit the sources and change it, it seems simple.
2.- The EVAL Card Detect is connected through an I2c expander, while in the Discovery it goes directly to a GPIO port. It also seems a simple change to make.
3.- The SDRAM in the EVAL is double, 256 Megabytes, in the Discovery we have 128 Megabytes. I don't know if this can be a problem to be able to run the program that plays videos. If 256 megabytes of SDRAM were necessary for the video player, then I will make my own board, with the F769, the SDRAM and an SD card holder, in addition to the backlight voltage booster.
For the voltage booster, for the backlight, I use this scheme with several jumpers, to select several voltages, for the different display models I have, each one requires a different voltage.