cancel
Showing results for 
Search instead for 
Did you mean: 

Problem imporing project from TouchGFX to STM32CubeIDE using DAC 2 channel.

지한.1
Associate II

Hi, I used the STM32F429ZI-discovery board.

And software specification are here.

STM32CubeIDE : 1.8.0

TouchGFX : 4.17.0

I imported project from TouchGFX to STM32CubIDE by referring to the following site.

https://www.youtube.com/watch?v=12KXreXaLp0

I have successfully built and complied and enabled DAC channel 2.

But, the STM32F429-discovery board LCD shows nothing.

I disabled DAC channel 2 and built and complied.

After that the STM32F429-discovery board LCD shows icon.

I don't understand what the problem is.

Could you help me How to integrate TouchGFX and STM32CubeIDE?

I want to enable DAC channel 2.

Thank you.

11 REPLIES 11
Romain DIELEMAN
ST Employee

Hi´,

This video is a bit outdated. When creating a project from TouchGFX Designer with a TBS for an ST development board (in your case I suppose STM32F429 disco rev E or D) a fully configured STM32CubeIDe project will be generated under the <project name>/STM32CubeIDe folder. You just need to double click on the .project and it will open up in STM32CubeIDE.

/Romain

Hi, Thank you for your reply.

I know how to run it in STM32CubeIDE using the .proejct file generated by TouchGFX.

However, there is a problem with this method.

For example​,

  1. I made the project from TouchGFX( ex. The project name is TestApp. )
  2. Create the proejct and generate code.
  3. Open the directory C:\TouchGFXProjects\TestApp\STM32CubeIDE and execute .proejct file.0693W00000JNPowQAH.png
  4. In STM32CubeIDE Project Explorer, there is no .ioc file,0693W00000JNPzLQAX.png
  5. To enable DAC channel 2, rename the copy of the "STM32F429_DISCO_REV_E01.ioc" file to the "STM32F429I-DISCO.ioc" file.0693W00000JNQ20QAH.png
  6. Copy the "STM32F429I-DISCO.ioc" file paste the STM32CubIDE project explorer.0693W00000JNQ7FQAX.png
  7. In STM32CubeIDE, open the "STM32F429I-DISCO.ioc", enable the DAC channel 2 and generate code.0693W00000JNQ0tQAH.png0693W00000JNQAsQAP.png
  8. In STM32CubeIDE, I can create the TouchGFX folder in the project explorer and open the ApplicationTemplate.touchgfx.part file.0693W00000JNQD8QAP.png
  9. In TouchGFX, generate code but, it fails.0693W00000JNQEBQA5.png
  10. Close the TouchGFX, and build the project in the STM32CubeIDe but, it fails.0693W00000JNQGgQAP.png0693W00000JNQHtQAP.png

Could you tell me, how to import from TouchGFX project to the STM32CubeIDE to enable the DAC channel 2?

Why do you need to add the ioc file in this folder ? You can open up the generated "STM32F429_DISCO_REV_E01.ioc" with STM32CubeMX and do the modifications there. Copying it and renaming it will just be a source of potential errors and does not make it more easy. As you can see in the error message in TouchGFX it is looking for a file that does not exist since it has been moved. You can modify that command with the right path by going to the Config settings on the bottom left of TouchGFX Designer and going to the Build settings. There you can modify the Post Generate Target Command with the correct path.

/Romain

Hi, I try to your method "Open the "STM32F429_DISCO_REV_E01.ioc in the STM32CubeMX".

but, it's problem.

My steps:

  1. In TouchGFX, Make project and generate code. ( ex. Project name is MyTemplate. )
  2. Do to the TouchGFXProject directory C:\TouchGFXProjects\MyTemplate\STM32CubeIDE
  3. Open the project .project, that will open STM32CubeIDE and your IDE should look like that.
  4. Go to C:\TouchGFXProjects\MyTemplate\ open the file STM32F429I_DISCO_REV_E01.ioc with STM32CubeMX. I am using the version 6.3.0.
  5. In STM32CubeMX, Open STM32F429I_DISCO_REV_E01.ioc file and enable DAC Channel 2.
  6. In STM32CubeMX, generate code.
  7. In STM32CubeIDE, project be updated, build it.

This problem is enable the DAC Channel 2.

Enable DAC channel 2, generate code and build, nothing displayed on the LCD.

0693W00000JNTNuQAP.png0693W00000JNTOjQAP.pngDisable DAC channel 2, icon displayed on the LCD.

0693W00000JNTOEQA5.png0693W00000JNTPHQA5.pngCould you please tell me how to enable the DAC channel 2 and also enable the LCD?

I don't know much about DAC but now at least TouchGFX is properly set and works which is what I was looking at.

But I can see that it conflicts with the LTDC settings (display type RGB565) as you can see when you hover the yellow warning sign in STM32CubeMX next to the DAC. So it believe this might be the source of the issue, the warning says "partly disable conflict with LTDC" (but it is "only" a warning, not a error or cant use option/message). I don't know if you'll be able to use both DAC and the display unfortunately, or at least this display. If other users or ST employee know, please step in.

/Romain

Thank you for your reply.

Do you know someone who can discuss this issue?

mattias norlander
ST Employee

@Khouloud OTHMAN​, could you comment on the MX/DAC question?

Hi, LCD cannot be used when DAC 2 channel is enabled.

I want to use DAC 2 channel and LCD together.

Could you help me how to solve this problem?

Thank you

Hello @지용 한​ ,

First let me apologize for the somewhat late reply.

As far as I can understand you want to use simultaneously LTDC (Display Type RGB565(16bits)) and DAC (OUT1 Configuration).

Actually this configuration can't be done through STM32CubeMX because of the conflict between LTDC Display Type RGB565 and DAC (OUT1 Configuration):

0693W00000JPRE1QAP.png 

This behavior is matching the pinout configuration in STM32F429xx Data Sheet:

0693W00000JPRKdQAP.png 

In fact, for LQFP144 packages (which is the case for STM32F429I-DISCO board), DAC_OUT1 signal can only be assigned to PA4 and cannot be remapped to any other pin. Same for LTDC_VSYNC signal which cannot also remapped to any other pin. Hence, the conflict between LTDC and DAC OUT1 Configuration.

Thus, this configuration can't be done.

But you can successfully use LTDC with DAC OUT2 Configuration.

Hope that this answers your question.

Khouloud.