Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


STemWin Touch Input on STM32F429 (STMPE811)

Hello,

Finally, I got STemWin working with my current settings (AC6 + ST Std.Periph.Lib)

For the resistive touch panel mounted on the STM32F429-Disco Board, I’m using the driver bundled with the firmware package (stm32f429i_discovery_ioe.c).

Up to this moment, I have been able to initialize and configure the TP. I have been able to read the TP, too, and this is a small test program I have made to test the TP functionality:

TP_State = IOE_TP_GetState();
if((TP_State->TouchDetected))
{
GPIOG->ODR |= GPIO_Pin_13;
GUI_DrawPoint(TP_State->X, TP_State->Y);
}
else
if(!(TP_State->TouchDetected))
{
GPIOG->ODR &= ~GPIO_Pin_13;
}

However, when it comes to STemWin, I just don’t understand the mechanism used to read the TP and send its data to the GUI. I tried adding the following to the IOE_TP_GetState(void) function, but it doesn’t work!

GUI_TOUCH_StoreStateEx(&TS_State);
GUI_Exec();

And in the main loop, I call
switch (GUI_GetKey()
{
case GUI_ID_BUTTON1: // Button and its handle created earlier!
break;
default:
break;
}

GUI_Demos were too messy and very difficult to trace/absorb! Any advice?

Thank you!

Have you tried building a screen using the GUI builder? It puts together all of the code to put up a screen and route messages to your widgets.

I presume that you’ve already verified that you can read touch events and that the coordinates look reasonable. There’s some interesting magic (read code I can’t figure out) deep in the driver.

The STemWin demo is pretty involved since they’re trying to demonstrate all of STemWin’s capabilities. There is a HelloWorld example that is pretty straitght forrward. It doesn’t use touch but IIRC it configures touch and it is pretty easy to add STemWin screens to it.

Of couse, I tried GUI Builder the very first moment I got STemWin working on my board. I can read touch events and the coordinates seem reasonable enough.

“There’s some interesting magic (read code I can’t figure out) deep in the driver” Could you please explain what do you mean? And what driver are you talking about? If you mean the TP driver bundled with emwin, could you please provide a reference to that driver file?

Thank you!

I started to reply but must not have hit ‘post.’ The confusing code is in the board support package (BSP) for the discovery board and so is the responsibility of ST. I’m away from the computer at the moment so I cannot provide the file name otherwise I could be of more help. The file name is something like stm32f429i_discovery_ts.c IIRC.

Doesn’t matter, Hank.

By the way, I don’t have any file with that name in my FW or ST Lib folders. Could it be stm32f429i_discovery_ioe.c?

Anyways, the TP driver works, but I could not associate it with emWin GUI. I still had no chance to ask at their forum. I’ll be doing it pretty soon!

Thank you again!


France

Hi,

For all emWin questions that are not specific to system Workbench for STM32, you should also use the emWin forums at http://forum.segger.comQuestion where you are more likely to get a prompt answer.

Bernard

Thank you Bernard. I’ll sign up and post it there on their forum, as well!