cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with STM32F769I-DISCO LCD initializing with provided Example

Michael Green
Associate II
Posted on May 22, 2017 at 10:49

Hello,

I recently bought the STM32F769I-DISCO to learn and do independent work with the M7-Cortex MCU series, and decided that the features of this board would be sufficient for such work, having special interest in working with its provided LCD as well.

I'm currently using the Eclipse IDE and have the Cross ARM toolchain installed, using the 2017 q1 version. I was able to build the GPIO example or the Blinky LED and have the board be able to communicate with both LEDs. I decided afterwards to jump straight into the DSI_LCD examples to see how they work. I installed the BSP packages and had everything set up correctly as far as I'm concerned, with the header/source files provided being able to compile correctly. The driver packages by the way were compiled by STM32-CubeMX, and I initialized all peripherals to their default state, as well as enable the LCD and LEDs.

The example is supposed to draw from 2 images, both which are apparently inside the header files stored in the form of a massive array which colors a 320x240 image. Everything compiled nicely, with the exception of some common warnings about unused variables (which if I haven't already mentioned, the source, header and BSP files were provided from the ST 1.7.0 package while the drivers were provided from the CubeMX software). Once that's done, I flash it using ST-LINK 4.0.

The image attached is what appears when the flash is complete. A mess of pixel noise with some odd blocks. I have no idea what the problem could be considering this is supposed to be an example project that, according to the readme, should just work in drawing the images if the drivers were set up correctly. I should mention specifically that this project in question is the LCD_DSI_VideoMode_SingleBuffer provided in the STM32Cube_FW_F7_V1.7.0 package.

Any idea on what to do to fix this would be greatly appreciated!

#support
6 REPLIES 6
john doe
Lead
Posted on May 22, 2017 at 12:15

maybe those compiler warnings are trying to tell you something is wrong.

Michael Green
Associate II
Posted on May 23, 2017 at 06:09

I checked the warnings but I'm not seeing anything relevant to why the screen is acting as it is. They're only common warnings, and I've tried using the BSP commands for the LCD and some work, such as turning on or off the display, changing brightness. What doesn't seem to work is setting a layer and attempting to draw a shape of any kind, nor is the example file capable of putting the image like it intended. I tried making a clean main file and initializing the LCD on my own, but just using the LCD_Init function gives me the same problem. It's like turning on the LCD causes it to show this screen. I can't tell if the screen is broken (somehow) or if there's some fundamental thing I'm missing from this example.

EDIT: There is one observation I forgot to mention. The HAL_Delay() is acting strange, where using a value such as 3000ms causes the delay to actually act in 1500ms. This is weird to me considering the blinking LED project worked fine and accurately when I used HAL_Delay() for it. I'm not sure if this incorrect timing is related to the problems of the screen though.

Posted on May 24, 2017 at 03:31

why dont you start by importing the example into your ide without any modifications and just try building and running it.  it should build without any warnings and should display the image correctly.

Posted on May 24, 2017 at 03:53

I did, I imported the entire example, used the drivers it provided, left all the files as is and it does compile. It still shows warnings though; the warnings only talk about functions not used and how the initializer for 'DrawRGBImage' was missing, which at first I thought was the root of the problem, at least it made sense that it sounded like the problem. The thing is, it's saying there should be an initializer in a read-only file, I'm unsure why I should even have to add it to the typedef struct when it should be working by default anyways.

Also, the actual main.c file provided doesn't utilize it at all. It uses a custom CopyBuffer function that basically sets up the screen to cycle between two images coded into the header files. When that wasn't working, I got rid of it and decided to just use the BSP functions that came with the BSP package and, while some functions work, anything involving manipulation of the screen's pixels (besides brightness or turning on off the display) doesn't work. I'm at a loss as to whether the LCD really is broken or there's something wrong with the initialization of the LCD.

Posted on May 24, 2017 at 04:52

Everything in your post suggests an installation error. While I have the same board, I'm not using it the same way so I'm not much help as to a broken install. sorry.

You should be able to just import, build, upload, execute.

Do ANY of the examples in the Cube repository work for you straight away?

Posted on May 24, 2017 at 04:58

Yes, the GPIO example for the blinking LEDs work. I was able to use HAL_Delay() as well and have the LEDs function both automatically and manually with the push button. I've tried the DMA2D, LCD_DSI and ADC examples, all of which compiles, but all of them also required the LCD to function to work, which it didn't for any of them (still shows the pixel noise from the screenshot). I'm going to try doing a fresh project again and use a fresh tool chain, see if that changes anything. If that doesn't work I'm just going to RMA the board and ask for a replacement since it should still be within the return time-frame.

EDIT: So after downloading the Embedded Wizard Studio and attempting to flash the board with its Hello World program, it turns out the LCD actually does work! I'm able to interact with its touch capabilities and see the fonts as expected. This can only mean that there's a fundamental problem with the way I set up the drivers, or something else that I'm not sure what yet. It's good to know however that I don't need to return the board, now I just need to figure out what exactly is causing these LCD examples to not function correctly.

EDIT 2: An interesting observation I made, while I was messing with the embedded wizard studio and testing other strings, fonts and images, is that whenever the LCD initializes, it makes the same exact image like in my screenshot, except only for about half of a second. After half a second, it brings up the interactive application where I can move around a logo and read whatever strings are implemented on the display. I have a feeling that there is indeed something *missing* from my eclipse project, and I'm going to need to dig deeper to find out what it is exactly.