Jump to content

Wrong execution of example ChibiOS / STM32F429 Discovery


spinnenfeind

Recommended Posts

Hello uGFX community,

 

I'm absolutely new to uGFX - up to now I was just using some simple alphanumeric displays.

However, I've been working with ChibiOS for some years, so I would like to give the combination of a nice OS with a nice gfx lib a try :-)

For my first steps I chose this example:

 

 

I can compile it without error, however there are several warnings.

If I execute the hex, I get a blue screen with text "Calibration" and some kind of cursor which I have to press on the touchscreen.

After pressing, the cursor shows at another position:

1. Uppler left corner

2. Upper right corner

3. Lower right corner

4. Center of screen

 

After having pressed the center cursor, the cursor disappears, but nothing happens. The screen still shows "Calibration".

I guess this calibration takes place somewhere in the uGFX initialization function. Because when I look into main.c, there is nothing about calibration, but a lot of text and graphics drawing, which does not seem to be executed in my case. Also there is no blinking LED on the board.

 

Is there a technical problem, or did I just not understand how to use the example? Any other screen position or hardware button which I have to press to leave the calibration?

 

Thanks for your help!

Tobias

 

Link to comment
Share on other sites

OK, I solved the problem by setting GMOUSE_STMPE811_SELF_CALIBRATE to TRUE.

No calibration screen anymore, demo starts directly into the graphics screen including a working slider, and LED is blinking.

However, would be interesting to know why the calibration routine blocks.

Link to comment
Share on other sites

Hello Tobias and welcome to the µGFX community!

There's no technical problem here. Most likely that example uses the touchscreen in Pen mode. There are two modes that a touchscreen driver can run in: Finger mode and Pen mode. There's no functional difference. The only difference there is is that the Finger mode is a lot less strict when it comes to moves and calibration error. Basically you need to press the calibration crosshairs a lot more precise in the Pen mode.

I'm currently on the road so I can't easily check but there's some API call which allows you to switch the mode. However, calibration takes place in gfxInit() and you cannot change the mode before that, only after the µGFX library has been initialized. Therefore, you need to change the default mode. That's a driver configuration so you need to look at /drivers/ginput/touch/<driver_name> and check whether you can do it in the drivers configuration file. If not, have a look at the VMT (struct) in the drivers implementation.

Link to comment
Share on other sites

Hello Joel,

 

thanks for your welcome and quick response!

I tried both finger and a dedicated touchscreen pen, makes no difference.  From what I saw in the source code, it should show an error message if calibration fails, but in my case, nothing happens after pressing the 4th crosshair. The crosshair disappears, the text "Calibration" remains forever. No error message, it just blocks.

For my first tries I do not need touch input, and the demo slider even works well with self calibration, so I'm happy. However, when I go deeper into touch input, I can try to switch finger/pen mode.

 

Thanks so far!

Edited by spinnenfeind
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...