STM32F4 Discovery, HY32D LCD and uGFX

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
mikimtb
Posts: 4
Joined: Sat Dec 06, 2014 11:53 pm

STM32F4 Discovery, HY32D LCD and uGFX

Post by mikimtb »

Hi to everybody,
first of all I want to introduce myself. My name is Miroslav Bozic, and I'm PHD student at Faculty of Electronic Engineering, University of Nis, Serbia. Before STM32 I successfully used Microchip PIC microcontrollers, but now I'm interested in new technologies especially ARM. When I search for development tools and IDE for STM I found chibios/RT very useful. I setup Eclipse environment and build some example code from chibios demos. Everything went as I expected and after building I got hex file which I uploaded to the STM32F4 Discovery board. I got runing example. :)

A couple a days ago I received HY32D display board. It consist of LCD display with resistive touch panel and SSD1289 display controller. Also the board include XPT2046 touch panel controller. When I start to read about driver for SSD1289 I found uGFX - The GUI library for microcontrollers. That was perfect start point for me. Before everything I wan't at the begining is to check if the display I bought from China is working properly. To do that I download examples from https://github.com/etmatrix/ChibiOS-GFX-Example. I tried to compile bench-FSMC demo example. I import project on the same way I did with chibios demo project. Also I copy uGFX files into chibios/ext folder. Then I resolved the index and try to build all. Before build I made changes on make file in accordance to my paht to the chibios folder. After build all I got next message in console:

00:10:48 **** Incremental Build of configuration Default for project mandelbrot-FSMC ****
make all
makefile:245: ../..//os/ports/GCC/ARMCMx/flash.mk: No such file or directory
make: *** No rule to make target `../..//os/ports/GCC/ARMCMx/flash.mk'. Stop.

00:10:49 Build Finished (took 512ms)


I opened the make file and found that there is no flash.mk file into the ARMCMx folder. I commented out this line in make file and try to build the project without it. Then, after build all I got next error message in console:

00:13:23 **** Incremental Build of configuration Default for project mandelbrot-FSMC ****
make all
Compiling crt0.c
arm-none-eabi-gcc: error: unrecognized argument in option '-mfloat-abi=yes'
arm-none-eabi-gcc: note: valid arguments to '-mfloat-abi=' are: hard soft softfp
make: *** [build/obj/crt0.o] Error 1

00:13:24 Build Finished (took 876ms)


I search the internet for both errors but I didn't find anything useful. Does somebody had the same problem?

Also, where I can find some tutorial how to use chibios and uGFX properly. I would like to start this project from beginning, to initialize everything and to draw some rectangle or something else, just to understand how this component works. After that I will start to make advanced functionality. I can use example but there is a lot of files, and I don't know which one I have to include in simple project.

Also I would be grateful if someone shared a similar project with me, witch consist to the same LCD.

I hope that somebody know the answers to my questions.

Best regards.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by Giovanni »

Hi,

Apparently that demo is built over an old and customized ChibiOS. The makefile is an old one, please take a makefile from an F4 demo and just adjust the inclusions.

That error is caused by the USE_FPU setting, "yes" is no more a valid choice.

Giovanni
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by steved »

There are also some useful examples in the ugfx package - most of them are written for ChibiOS. (You might do well to move to ChibiOS V3 now - although nominally still in development, its proving very stable)

I think the Embest-STM32-DMSTF4BB is actually an interface board to an F4 Discovery, so might be a good starting point.

I also suggest that you put your 'board' files in the ugfx directory tree (rather than the chibi one), since they need to include the display interface routines.

I've not used your particular display, but found it very straightforward to get a ugfx example to run.
mikimtb
Posts: 4
Joined: Sat Dec 06, 2014 11:53 pm

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by mikimtb »

Hi guys,
thank you very much for answers. I will try to build the project with new make file. Then I will tell you the results.

I will check chibios v3 definitely.

Best regards.
mikimtb
Posts: 4
Joined: Sat Dec 06, 2014 11:53 pm

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by mikimtb »

Hi,
I made changes on make file as Giovanni told me and now I can build the project properly. I used bench- FSMC example, build everything and download ch image file to the microcontroller. After that nothing happened, only LEDs on discovery board are lighting but the LCD is white. I try to debug the program and as I saw it is working properly. What is happening, I captured and upload on youtube https://www.youtube.com/watch?v=lgYETLdcWAE&feature=youtu.be, maybe somebody had the same situation.

Tomorrow I will check the connections with ohm meter, maybe some of the wires are not connected properly. Also I will use oscilloscope to check signals on data bus. Because LEDs are connected to the PD5, PD14 and PD15, and these pins are also used as FSMC WR, D0 and D1 I'm sure that program is working correctly. It is 50:50 chance that display is broken in transport. We will see.

Best regards.
mikimtb
Posts: 4
Joined: Sat Dec 06, 2014 11:53 pm

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by mikimtb »

Hi guys,
I checked connections with ohm meter and all pins are connected as is recomanded (FSMC interface). Then I used oscilloscope and capture the signals on data lines. What I saw is very bad square wave signal. I'm not sure what is the problem?

I would be very grateful if somebody share with me image or hex file of proven example with stm32f407 discovery and HY32D display? I don't need source code I just want to be sure does my display alive.

Best regards.
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by steved »

I don't have an SSD1289 manual, but two things to check with FSMC interfaces:
a) Firstly, that the width of the data bus matches that assumed in the driver
b) At least some of the SSD**** chips have a 'Command/Data Register select' input, which is usually connected to one of the address lines on the FSMC interface. It doesn't particularly matter which address line is chosen, as long as the software driver uses the same line - and this can vary according to the implementation.

Also worth searching for 'SSD1289'; its used with other displays and platforms, so you may get some clues that way.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: STM32F4 Discovery, HY32D LCD and uGFX

Post by Tectu »

This is most likely an issue with your uGFX board file. I'd be more than happy to help you out there. However, this is more uGFX related and in order not to spam the ChibiOS/RT board you probably want to post your board file on the uGFX forum: http://forum.ugfx.org


~ Tectu
Post Reply