trunet Posted June 26, 2014 Report Share Posted June 26, 2014 Hi,I'm having a hard time trying to make ugfx work on this board: http://www.micro4you.com/store/hy-mini-stm32v.htmlI just want LCD display something.I wrote a new board, based on Olimex-STM32-LCD, I changed chibios_board/board.h to match different pins. This board don't have LCD RESET(it's tied to RST button directly), so I removed all reset code from board_ILI9320.h.I got demo/modules/gdisk/basic and added to my chibios main.c file and created a new thread. I have 1 thread blinking leds(and it's working) but display stays blank(even backlight is turned off).Any help is appreciated. Link to comment Share on other sites More sharing options...
steved Posted June 26, 2014 Report Share Posted June 26, 2014 Some LCDs take a bit of time after reset to initialise (I have one that needs a second) - maybe a power up delay.Web site for the board was down, so couldn't check. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 26, 2014 Report Share Posted June 26, 2014 Could you please attach your project? The important files are: main.c (any any other related sources) Makefile gfxconf.h board filesOne more thing to check: Can you please make sure that the backlight is on? You should try to manually enable it in your main source files first. It's very likely that your display is actually displaying it but you just can't see it as the backlight is off. Also, when the backlight is on the screen might either be white or filled with garbage. The later would indicate a successful display controller initialisation.We're more than happy to help where we can.~ Tectu Link to comment Share on other sites More sharing options...
trunet Posted June 26, 2014 Author Report Share Posted June 26, 2014 Code is attached. application.zip is my code. the other one is the ugfx boards/base directory that I adapted from olimex.With this line:palSetPad(GPIOB, GPIOB_BL_CNT);LCD backlight turns on, but screens stays white filled.Thanks,Wagnerboards_base_HY-MiniSTM32V.zipapplication.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 26, 2014 Report Share Posted June 26, 2014 I'll take a look into this this evening. I'll keep you posted.~ Tectu Link to comment Share on other sites More sharing options...
trunet Posted June 26, 2014 Author Report Share Posted June 26, 2014 thank you very much tectu. Link to comment Share on other sites More sharing options...
trunet Posted June 26, 2014 Author Report Share Posted June 26, 2014 I could make it work without using uGFX. I got that ugly chinese GLCD library available on internet and my display is working perfectly.I started debugging ugfx. Apparently it's not calling init_board. I know that because I add a palSetPad to turn on backlight and it's not doing it. I'm calling gfxInit() on my code, but display is not being initialized.Any clue?Thanks,Wagner Sartori Junior Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 26, 2014 Report Share Posted June 26, 2014 "evening" is starting here in about 30 minutes. Then I'll take the look as promised. Stay tuned :-P~ Tectu Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 26, 2014 Report Share Posted June 26, 2014 It looks like you're using the wrong driver. The web site you linked says that the board uses an SSD1289 controller, but inside your board.mk you include the ILI9320 one. Please make sure that you include the right driver. Change the board file accordingly.Other things I have noticed: Disable all the other subsystems until you have your GDISP module working Don't uncomment values in the gfxconf.h file when you leave it to the default value anyway (talking about GDISP_TOTAL_XXX Call gdispClear() after gdispInit(). I recommend to take some vibrant color for debugging (like blue or red).~ TectuEdit: fixed typo gdispInit() -> gfxInit() Link to comment Share on other sites More sharing options...
trunet Posted June 26, 2014 Author Report Share Posted June 26, 2014 this chinese crap. website is saying that is SSD1289, however mine is ILI9320. I have sure. I had an arduino plugged on this same TFT using UTFT library, and it worked using ILI9320 code. Disable all the other subsystems until you have your GDISP module workingdone that! Don't uncomment values in the gfxconf.h file when you leave it to the default value anyway (talking about GDISP_TOTAL_XXXdone that! Call gdispClear() after gdispInit(). I recommend to take some vibrant color for debugging (like blue or red).I didn't have a gdiskInit() on my main. my main() is:gfxInit();gdispClear(Blue);Backlight is off. Apparently it's not running board_init inside. I say that because I have this on board_ILI9320.h inside init_board() function:palSetPadMode(GPIOB, GPIOB_BL_CNT, PAL_MODE_OUTPUT_PUSHPULL);palSetPad(GPIOB, GPIOB_BL_CNT);This code should turn backlight on. If I move it out init_board() to my main(), backlight turns on. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 27, 2014 Report Share Posted June 27, 2014 I'm sorry, I meant "Call gdispClear() after gfxInit()", not gdispInit() (there even isn't such a thing).At the moment I cannot see any reason why your board_init() does not get called. Please step through your code and show us your trackback / calltree if necessary.Setting the backlight there does not seem to be a very good idea to make sure that the function is being executed as the backlight settings will probably be overwritten after that call. Step through your code instead (or light up an LED if you're not able to properly debug it).Well, when it's an ILI9320 then you should probably also know that there have already be an awful lot of problems with the ILI93xx drivers. It looks like there are MANY different revisions of that chip out there. I myself even had the problem that I received an ILI9325 and the chinese person told me it's an ILI9320 and vice-versa.What I strongly recommend you to do is replace the initialization code inside gdisp_lld_init() and replace it with the working ones you have.~ Tectu Link to comment Share on other sites More sharing options...
trunet Posted June 27, 2014 Author Report Share Posted June 27, 2014 I don't have a JTAG debugger here, so I'm serial debugging(ARG!!!).I tried to get device address first from memory. It was returning zero, so, I figured out that GDISP_RAM were different:correct:#define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */wrong:#define GDISP_RAM (*((volatile uint16_t *) 0x60100000)) /* RS = 1 */now I'm getting 0x1505. so probably my board is R61505U.I'll try to change initialization to match another board and see how it goes. Link to comment Share on other sites More sharing options...
trunet Posted June 27, 2014 Author Report Share Posted June 27, 2014 It worked...New driver attached hehethank you very much tectu. excellent work on your uGFX project.gdisp_R61505U.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 27, 2014 Report Share Posted June 27, 2014 I am AWFULLY sorry. I actually had "make sure that GDISP_RAM is correct" in the list from the other post, but for some reason I deleted the wrong line.But I'm glad to hear that it is working now Feel free to open a new thread for any question you might have.~ Tectu Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted July 24, 2014 Report Share Posted July 24, 2014 Sorry that this took so long, trunet.We have finally added your driver to the official repository. Furthermore we have added you to the contributors table.If you want to tell us your real name, we can add it there as well.~ Tectu Link to comment Share on other sites More sharing options...
trunet Posted July 24, 2014 Author Report Share Posted July 24, 2014 Thanks Tectu.My name is Wagner Sartori Junior. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted July 24, 2014 Report Share Posted July 24, 2014 Done ~ Tectu Link to comment Share on other sites More sharing options...
electrotehnik Posted October 10, 2014 Report Share Posted October 10, 2014 HiI have HY-Mini STM32V Board too.1. Please give me sample project "Hello world" with uGFX GUI for this demo board. Keil IDE is desirable.2. For use GUI uGFX is required ChibiOS ?Schematic of HY-Mini STM32V Board is attached. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 10, 2014 Report Share Posted October 10, 2014 Hello Roman and welcome to the uGFX community!1. Sadly we are not able to create a ready-to-use project for you as it takes a lot of time. However, the wiki is very detailed on what you need to do in order to get uGFX running. The forum is always there to ask specific questions.If you are a commercial customers please contact us through the mail address that can be found here: http://ugfx.org/imprint2. You do not have to use ChibiOS/RT when you want to use uGFX. There are many other already supported underlying systems such as FreeRTOS. However, you can really use it with any system. You can either use the raw32 port to use it bare metal (= without any operating system) or you can easily implement a new operating system port following our wiki guide.~ Tectu Link to comment Share on other sites More sharing options...
electrotehnik Posted October 10, 2014 Report Share Posted October 10, 2014 Thank you for your answer!I have installed Chibios IDE (Eclipse based) and updated OS and uGFX lib to the last version. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 10, 2014 Report Share Posted October 10, 2014 You're welcome.Feel free to open a new thread if you hit any problem / having a specific question.~ Tectu Link to comment Share on other sites More sharing options...
electrotehnik Posted October 14, 2014 Report Share Posted October 14, 2014 HiI try to build the project, but there is an error:22:25:27 **** Build of configuration Default for project HY-miniSTM32V_Chibios_uGFX ****make -j2 all 0 [main] sh 8212 sync_with_child: child 6808(0x168) died before initialization with status code 0xC0000142 28 [main] sh 8212 sync_with_child: *** child state waiting for longjmp/usr/bin/sh: fork: Resource temporarily unavailableCompiler Optionsarm-none-eabi-gcc -c -mcpu=cortex-m3 -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/ -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I../../chibios/os/ports/common/ARMCMx/CMSIS/include -I../../chibios/os/ports/common/ARMCMx -I../../chibios/os/ports/GCC/ARMCMx -I../../chibios/os/ports/GCC/ARMCMx/STM32F1xx -I../../chibios/os/kernel/include -I../../chibios/os/hal/include -I../../chibios/os/hal/platforms/STM32F1xx -I../../chibios/os/hal/platforms/STM32 -I../../chibios/os/hal/platforms/STM32/GPIOv1 -I../../chibios/os/hal/platforms/STM32/I2Cv1 -I../../chibios/os/hal/platforms/STM32/RTCv1 -I../../chibios/os/hal/platforms/STM32/SPIv1 -I../../chibios/os/hal/platforms/STM32/TIMv1 -I../../chibios/os/hal/platforms/STM32/USARTv1 -I../../chibios/os/hal/platforms/STM32/USBv1 -I../../chibios/ext/ugfx/boards/base/MiniSTM32-LCD/chibios_board -I../../chibios/os/various -I../../chibios/ext/ugfx/boards/base/MiniSTM32-LCD -I../../chibios/ext/ugfx/drivers/gdisp/SSD1289 -I../../chibios/ext/ugfx -I../../chibios/ext/ugfx/src/gdisp/mcufont main.c -o main.omkdir -p build/objmkdir -p build/lstCompiling crt0.cCompiling vectors.c../../chibios/os/ports/GCC/ARMCMx/STM32F1xx/vectors.c:324:1: fatal error: opening dependency file .dep/vectors.o.d: No such file or directorycompilation terminated.../../chibios/os/ports/GCC/ARMCMx/crt0.c:359:1: fatal error: opening dependency file .dep/crt0.o.d: No such file or directorycompilation terminated.make: *** [build/obj/vectors.o] Error 1make: *** Waiting for unfinished jobs....make: *** [build/obj/crt0.o] Error 122:25:32 Build Finished (took 5s.263ms)I think a bug in the makefile. but where?ChibiStudio.rar Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 14, 2014 Report Share Posted October 14, 2014 This is definitely not an uGFX related problem.Please open a new thread whenever you hit a new problem. This way we keep the forum clean and it is easier for people to find answers using the forum search.I can try to compile it as well and point you to the actual problem then.~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now