cancel
Showing results for 
Search instead for 
Did you mean: 

Touch can not initialize HAL

Breeze1
Associate III

Touch Designer set pix format as ARGB2222, RGB LCD using LTDC setted pix format as L8. In a simple project ,now it can show correctly. But I imgrate this project with a Touch Designer Demo Project , it can not work correctly. Error show 0693W000001rFiSQAU.jpg

I found

uint16_t stride = lcd().framebufferStride();

Than deeper in LCD8bpp_ARGB2222.hpp

0693W000001rFjLQAU.jpg

this makes error.How can I fix the error?

1 ACCEPTED SOLUTION

Accepted Solutions

Great - When you use CubeMX, main.c will contain calls to start TouchGFX automatically so this is what's changed in your project. If you try to run TouchGFX in a task while it hasn't been configured yet, LCD will report this error.

/Martin

View solution in original post

5 REPLIES 5
Martin KJELDSEN
Chief III

Hi, it sounds like you haven't started TouchGFX yet. How did you create the project?

/Martin

I creata a project using CUBE MX 5.6 and Touch Designer 4.13 , it simpley make LCD and touchgfx work. In this project not using DMA2D, touch desinger not using LTDC, save these setting and code.Most code in TouchGFXGeneratedHAL.cpp, OSWrappers.cpp.Setting in ProjectName.touchgfx, application.config, Application.props,app.mk

Then use Touch Designer make a Demo Project as below.

0693W000001rG5lQAE.jpg

I like the demo project architecture .

Then I migrate my own project which is only working on TouchGFX simulator, using demo project architecture, using the first project code and setting.

Sorry forgot to mention.The error happens at void TouchGFXGeneratedHAL::initialize();

in this function I prefer setFrameBufferStartAddress(frameBuf, 8, false, false) than setFrameBufferStartAddresses((void*)frameBuf, (void*)0, (void*)0),

that's how this error happens. If I use setFrameBufferStartAddresses((void*)frameBuf, (void*)0, (void*)0), No error happens , but TouchGFX looks like not work.

Breeze1
Associate III

Problem fixed.Maybe some setting Error.Now I use CUBE MX created project , it can work correctly now.

Great - When you use CubeMX, main.c will contain calls to start TouchGFX automatically so this is what's changed in your project. If you try to run TouchGFX in a task while it hasn't been configured yet, LCD will report this error.

/Martin