Skip to main content
BJens.1
Associate II
March 15, 2021
Solved

What could cause the display to be black?

  • March 15, 2021
  • 10 replies
  • 5022 views

I am trying to make some tests with the touchGFX and the STM32H7B3I-DK kit.

I have tried different approaches with online step by step videos and webinars.

This one: https://www.youtube.com/watch?v=4-fyx4e96jk

I have tried now and all compiles and uploads without error, but the display does not turn on. It works because uploading something simple directly from tGFX designer turn on the display.

I get 1 warning, but don't know why that should have impact on the display not turning on. The warning is:

Invalid project path: Include path not found (C:\TouchGFXProjects\Designer_tGFX_1\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS).

Why should that meke the display stay black, and what should I do to get rid of the warning. I have followed the video to the point.

I have read at some places that this board is not as good as others regarding "Working right of the shelf"

Another thing: If I try to flash the original demo into it, there is a lot of tear in the images on the mainscreen. Why is that?

This topic has been closed for replies.
Best answer by BJens.1

Well, gave it another go, and voila finally 4 weeks of intense work paid off. :)

I based my experience on the guide mentioned in the start of this thread. https://www.youtube.com/watch?v=4-fyx4e96jk

Now got it working with:

CubeMX 6.2.0 with MCU package STM32Cube_FW_H7_V1.9.0

CubeIDE 1.6.0

touchGFX 4.16.1

The black screen happened because there is a mismatch somewhere if using FW_H7_V1.6.0 instead of FW_H7_V1.9.0.

Apparently Designer generates as if the default was FW 1.6.0. But there is a fix for this in the CubeMX. In the project setup (when a project is loaded), Default Firmware Location should be unticked and you should browse to the location of the resent version (here 1.9.0).

Some of the other stuff I had to struggle with, was just 2 typos of my own.

Sometimes the flashing stopped in the middle of flashing. The only solution for me was to reset the board and try again, and sometimes it was also necessary to "make clean" the project and start a new compilation.

10 replies

Alexandre RENOUX
Visitor II
March 16, 2021

Hello BJens.1,

First to reassure you, your warning has no effect on your board's behavior. Basically, you have a non existant folder called CMSIS_RTOS. The right folder is CMSIS_RTOS_V2 and is also included. This is why it compiles correctly anyway. To remove it, I need to know what IDE you are using but basically, you need to go to your project settings and remove the include path for CMSIS_RTOS.

As for why it is black, they can be many reasons for this.

Have you tried the following steps ? :

  • Opening TouchGFX Designer
  • Select the H7B3-DK Application Template and Animated Image Example as the UI
  • Click Create
  • Click Run Target while your board is plugged

/Alexandre

BJens.1
BJens.1Author
Associate II
March 16, 2021

Yes. no matter which example I choose from the designer, I compile and run on the target everything is ok. And all is looking pretty good I might add. But I think the problems arise, at least with this board, when trying to use the hardware with the tGFX. And that must be the whole purpose of a controller. =)

Oh and by the way, it is a fresh install (yesterday) So it is all the latest tools.

tGFX 4.16.1

CubeMx 6.2.0

CubeIDE 1.6.0

Romain DIELEMAN
ST Employee
March 16, 2021

Hi,

I also faced a black display issue when generating code with CubeMX 6.2 for the H7B3-dk board, I havent investigated yet on it but I would advise to install CubeMX 6.1.1 for now to see if it fixes your issue.

/Romain

HP_it
Senior II
March 16, 2021

I haven't seen the video so the below suggestions might not be valid for your case, but with that said the usual culprits when the screen stays black are two things.

  1. Missing a call to MX_TouchGFX_Process() - this should be placed in a separate task (with enough stack). the call is 'captive' meaning that it does not return so it is important to have a task specifically for that
  2. the display should have an 'enable' pin. check the state of this pin. If the pin is set to 'reset' state, it is low, meaning the display is disabled.

a third but less likely option could be the back-light not being turned on but that usually works with the default hardware settings.

BJens.1
BJens.1Author
Associate II
March 16, 2021

Thanks for you reply. In the video he shows the kit working with backlight on after doing the steps I have mimiked. So following a step-by-step with the same kit, and nothing working as expected is pretty disappointing. :(

Well in these pandemic times, I'm working from home, so no access to an oscilloscope, to meassure any pins actual state.

And all is very overwhelming right now, it's a steep learning curve. I'm used to C but C++ is pretty new to me. Have read a lot about it, but never yet made a project in C++. And have to get familiar with the IDE - never used eclipse before. And have only experience with 8 bit AT-MEGA controllers from Atme. But we want to step up our game and enter the bright and exciting world of 32 bits and all the fantastic projects that now become possible. :) Even though HAL is a layer to remove complexity, it is at the same time introducing another layer of complexity. So a lot of new things to get into. :)

If anything is missing, it should have been mentioned in the video I guess.

Alexandre RENOUX
Visitor II
March 16, 2021

Hello BJens.1,

I'm sorry to hear that.

Thank you for your feedback. It is actually very useful to hear your struggles and from where you come (C programmer experienced with 8 bit MCUs). This helps us understand what kind of people are trying to use TouchGFX and ST softwares in general and try to find ways to help making the ecosystem more user-friendly.

What I usually suggest and what I did when I started with TouchGFX was to compare existing working code with my own and see/analyze the discrepancies.

So to understand more I would recommend you to compare your project with the Application Template H7B3-DISCO available in TouchGFX Designer and see what's different.

You can also share your project in this thread. I can't guarantee I will have much time to look deep into it but we never know. Also, someone else could have a look and help you too. This is what the community is for ^^

/Alexandre

BJens.1
BJens.1Author
Associate II
March 16, 2021

Ok, that changed the black display, so now it shows me the 2 screens. The hardware part with the LEDs and the button does not, but I will play a little with that and return.

In the meantime I can tell, that it is not just uninstalling the CubeMX 6.2.0 and installing CubeMX 6.1.1. Because when you start up the CubMX 6.1.1 it will not read the *.ioc file because it i generated with a newer version. So the choises are to either start from scratch, or do as I did. Open the *.ioc file in notepad or something similar, find the line where the CubMX version is mentioned, and change it to the version you use (in this case 6.1.1) and try to open the ioc again and generate the code from within there again. And then when opening the project in CubeIDE the projekt can compile and flash - and it works (Well sort of, but I have to investigate if all my variables are named correctly and so on).

I know it is not the right way to edit the *.ioc file, because if something in the way it is generated has changed from version to version, it could give me some other problems. But in this case it seems to work. :)

Romain DIELEMAN
ST Employee
March 16, 2021

Yeah I was wrong CubeMX 6.2 is not the main issue as it appears with 6.1.1 as well, it is the FW package selected. CubeMX does not recognize that the fw package v1.6. is not the latest one. You have to go in CubeMX in the Project manager tab in the "Mcu and firmware package" section. You have to uncheck the "Use default firmware location" and browse to the v1.9.0 folder.

I have reported this to the CubemX team. This is a very weird issue as v1.6.0 used to work. Unfortunately it is out of our reach for now, we will try to update the application templates for the h7b3 disco board asap in order to fix this problem for now.

/Romain

BJens.1
BJens.1Author
Associate II
March 16, 2021

I think I might have expressed myself unclear. It did make a difference. The display do turn on with CubeMx 6.1.1. So it did make a difference to me. Only thing is it didn't bring up the functionality of the code to turn on the board LED on a screentouch nor turn on the screen LED at the userswitch push. That is what I mean by functionality. Sorry for the wrong formulation.

But it is still not good enough for me, because that is the whole idea, to make the hardware lyaer in sync with the tGFX. :-).

BJens.1
BJens.1Author
Associate II
March 16, 2021

Ok went through all the code added in the example, ending up with the same result as all the other times I have tried different tutorials. No functionality. The display shows the items (the same way as in tGFX designer) but no functionality. Which I guess is not the purpose of the tutorials.

The tutorials should be able to guide newbees into the faboulous world of these controllers, not make us descuriaged and upgiving. :(

We (I) need some tutorials up-to-date with the newest software packages (because those are the ones beginners download), which are worked through examples tested and proven to work.

And I'm absolutely not writing this because I'm not happy with te tools. But they should work for a beginner without all kind of workarounds.

I am thrilled about the tools, they seem to be very good (and free - lets not forget), but if I should be convinced that I have landed in the right (processor) family, I need some good experiences to convince me. :)

When I get this to work I have a ton of additional questions. :)

BJens.1
BJens.1Author
Associate II
March 18, 2021

Thank you. But for now I'm giving up. I have tried this board now for 3 weeks, and I am not getting any closer to a working solution.

Everything works directly from the designer. But the designer is only to make the graphics and yeah well the design of the graphical touchscreen. And it does a fantastic job.

But the IDE can start a project in so many ways, and dependent of the roadmap, the looks af the project is completely different, which I find to be messy.

If you start a project one way the main.c file will be located in a folder called Application/user/TouchGFX.

If you start the project from a allready generated *.ioc file from the designer the main.c file will be located in Core/Src

I find this very confusing. Additionally to the confusion if generated one way the the compiler/linker complaints about to little RAM memory. This another frustration.

I think I will have to conclude that either is STM32 tGFX not ready for me, or I'm not ready for tGFX. :(

Sad because i could really see the potential.

BJens.1
BJens.1Author
Associate II
March 18, 2021

Thank you. But for now I'm giving up. I have tried this board now for 3 weeks, and I am not getting any closer to a working solution.

Everything works directly from the designer. But the designer is only to make the graphics and yeah well the design of the graphical touchscreen. And it does a fantastic job.

But the IDE can start a project in so many ways, and dependent of the roadmap, the looks af the project is completely different, which I find to be messy.

If you start a project one way the main.c file will be located in a folder called Application/user/TouchGFX.

If you start the project from an allready generated *.ioc file from the designer the main.c file will be located in Core/Src

I find this very confusing. Additionally to the confusion if generated one way the the compiler/linker complaints about to little RAM memory. This another frustration.

I think I will have to conclude that either is STM32 tGFX not ready for me, or I'm not ready for tGFX. :(

Sad because i could really see the potential.

HP_it
Senior II
March 19, 2021

Hey @BJens.1​  - I know that I might be well too late to 'save' your faith in tGFX. Anyway, I have made a video on how to implement tGFX on a custom board (https://www.youtube.com/watch?v=SRQD8JMeg_k) - this approach should work for all boards no matter if it is a custom board or a development kit.

You're absolutely right - there are multiple ways of creating a project, some of them more confusing than others. I know that the tGFX team is working to address this fact but until we see a resolution and 'streamlining' of all structures we will have to make do with what we have.

IF you start with the application template in the designer you do get a working project - as you describe. However, there is no reason not to continue that project in CubeIDE where you can add the HW interactions you want.

In other words, you have two options

  1. the custom approach, where you have to inlclude everything yourself (see the video above)
  2. the application template approach where you start in the designer and switch to cubeIDE.

The latter approach let you start easily but have some drawbacks with regards to files 'missing' in the cubeIDE project. They are there and everything will work, they files are just harder to find, unfortunately. this method, however, will set up the touch screen, QSPI and external memory mapping so you should not see the RAM limitations you have seen with the other approach. I have a video for this 'easy' method as well - it's for the 746 board but the steps are the same.

BJens.1
BJens.1Author
Associate II
March 19, 2021

Hi HP

I will definately watch your video (probebly during the weekend). And I think it is too good tools to just give up. But I was really in a bad mood yesterday. :)

I think it is VERY interesting to hear about your take on how to do a custom solution, which is the aim in the end.

My frustration is ofcause that I can see so much potential, but can't get, what is supposed to be a very simple tutorial to work. That makes me feel incredibly stupid. Not a nice feeling. :(

But thank you, I will watch your video, and may feel stupid on a higher level, or maybe somthing will catch on We'll see. :)

BJens.1
BJens.1AuthorBest answer
Associate II
March 25, 2021

Well, gave it another go, and voila finally 4 weeks of intense work paid off. :)

I based my experience on the guide mentioned in the start of this thread. https://www.youtube.com/watch?v=4-fyx4e96jk

Now got it working with:

CubeMX 6.2.0 with MCU package STM32Cube_FW_H7_V1.9.0

CubeIDE 1.6.0

touchGFX 4.16.1

The black screen happened because there is a mismatch somewhere if using FW_H7_V1.6.0 instead of FW_H7_V1.9.0.

Apparently Designer generates as if the default was FW 1.6.0. But there is a fix for this in the CubeMX. In the project setup (when a project is loaded), Default Firmware Location should be unticked and you should browse to the location of the resent version (here 1.9.0).

Some of the other stuff I had to struggle with, was just 2 typos of my own.

Sometimes the flashing stopped in the middle of flashing. The only solution for me was to reset the board and try again, and sometimes it was also necessary to "make clean" the project and start a new compilation.

Alexandre RENOUX
Visitor II
March 26, 2021

Hello BJens.1,

Glad to hear that it works now. The bug on CubeMX is really unfortunate. FW_H7_V1.6.0 is quite old now so it should not be used.

Since your question is answered, please close this topic by choosing Select as Best.

/Alexandre