Jump to content

HY-Mini STM32V Board


trunet

Recommended Posts

Hi,

I'm having a hard time trying to make ugfx work on this board: http://www.micro4you.com/store/hy-mini-stm32v.html

I 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

Could you please attach your project? The important files are:

  • main.c (any any other related sources)
  • Makefile
  • gfxconf.h
  • board files

One 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

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

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).

~ Tectu

Edit: fixed typo gdispInit() -> gfxInit()

Link to comment
Share on other sites

this chinese crap. website is saying that is SSD1289, however mine is ILI9320. I have sure. :D

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 working

done that!

  • Don't uncomment values in the gfxconf.h file when you leave it to the default value anyway (talking about GDISP_TOTAL_XXX

done 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

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

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

  • 4 weeks later...
  • 2 months later...

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/imprint

2. 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

Hi

I 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 unavailable
Compiler Options
arm-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.o

mkdir -p build/obj
mkdir -p build/lst
Compiling crt0.c
Compiling 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 directory
compilation terminated.
../../chibios/os/ports/GCC/ARMCMx/crt0.c:359:1: fatal error: opening dependency file .dep/crt0.o.d: No such file or directory
compilation terminated.
make: *** [build/obj/vectors.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/obj/crt0.o] Error 1

22: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

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...