Jump to content

juliandonart

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. In the meantime, I have been able to solve the problem. There is a small bug in the uGFX LTDC driver. It concerns the line in board_STM32LTDC.h where the LCD-TFT clock is activated. RCC->CR |= RCC_CR_PLLSAION; After PLLSAI activation, it is necessary to wait until the LTDC clock is ready. while((RCC->CR & RCC_CR_PLLSAIRDY) == 0); // wait for PLLSAI to lock The driver only works since inside of the call BSP_SDRAM_Init() there is a gfxSleepMillisecond() call which acts as the above-mentioned missing while() loop. // BSP_SDRAM_Init(); I recommend taking over the changes for the next LTDC driver release. It would be nice if there will be a preprocessor option, whether internal SRAM or external SDRAM is used as framebuffer.
  2. Hello everyone, I'm currently working on the same problem. I want to use the LTDC driver of the uGFX library with RAM framebuffer location on my STM32F7 Discovery board. I followed all the steps mentioned by @inmarket: First of all, I've created a global array RGB565_480x272 of type uint32_t and a size of 65280. This array defines my framebuffer in the MCU's memory. In the driverCfg struct in file board_STM32LTDC.h, I've changed the frame buffer starting address from SDRAM_DEVICE_ADDR to my array RGB565_480x272 and I've turned off the second layer as you can see in the following code snippet. ... // board_STM32LTDC.h #define ALLOW_2ND_LAYER FALSE // TRUE static uint32_t RGB565_480x272[65280]; // 480x272 Pixel * 2Byte/Pixel / 4Byte/uint32 = 65280 uint32 static const ltdcConfig driverCfg = { 480, 272, // Width, Height (pixels) 41, 10, // Horizontal, Vertical sync (pixels) 13, 2, // Horizontal, Vertical back porch (pixels) 32, 2, // Horizontal, Vertical front porch (pixels) 0, // Sync flags 0x000000, // Clear color (RGB888) { // Background layer config (LLDCOLOR_TYPE *)&RGB565_480x272[0], // Frame buffer address (LLDCOLOR_TYPE *)SDRAM_DEVICE_ADDR, 480, 272, // Width, Height (pixels) 480 * LTDC_PIXELBYTES, // Line pitch (bytes) LTDC_PIXELFORMAT, // Pixel format ... Then, in the gdisp_lld_config.h file, I've set the GDISP_LLD_PIXELFORMAT to GDISP_PIXELFORMAT_RGB565 #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_RGB565 and in the init_board() function, I finally removed the BSP_SDRAM_Init() call at the end of the function. I think these should be all the required changes to use the internal RAM of the MCU as framebuffer for LTDC. Unfortunately, my display doesn't show anything. Maybe some of you have an idea of what I'm doing wrong ... I'm using the STM32F7 bare metal demo project provided by uGFX. In my gfx_conf.h file, I've defined my GFX OS heap size as follows: #define GFX_OS_HEAP_SIZE (40960) Thank you in advance.
  3. Hello Joel, thank you for the fast answer. I tested successfully a led blinking demo and could verify that the systick runs exactly on 1ms. I found the issue that was here: while(1) { // Get an event pe = geventEventWait(&gl, 0); // Must be TIME_INFINITE switch(pe->type) { } } This Code was auto generated from uGFX Studio. I had to replace 0 with TIME_INFINITE, now everything works fine. The Mouse-Get Function gets called periodically. I use a FT6206 IC for capacitive touch panels. It also has an interrupt pin, that i could configure as EXTI-Interrupt on my STM32. In this case i could renounce the use of a mouse-timer. Thank you for your help. Julian
  4. Hello, i'm new to this forum and community to uGFX, so first of all many thanks for this great library! I just could get running a ILI9341-Display using SPI. Now i would like to get my Touch-IC running. I use a STM32F051 Microcontroller and Coocox CoIDE with ARM-GCC 4.8 and i take the Baremetal/RAW32 implementation of uGFX. I could be sure that i properly implemented the gfxSystemTicks() and gfxMillisecondsToTicks() functions and configured correctly the gfxconf.h Header for using RAW32. My Problem is that the Mouse-Get-Function which should be fired periodically by a Mouse-Timer (Polling) gets never called. It just gets fired once at the start when inizializing. I could watch the same Problem on a STM32F407. To get sure that the problem is not my own fault in implementation, i just do this: #include "gfx.h" #if (GFX_USE_GINPUT && GINPUT_NEED_MOUSE) #define GMOUSE_DRIVER_VMT GMOUSEVMT_ADS7843 //#include "../../../../src/ginput/ginput_driver_mouse.h" #include "src/ginput/ginput_driver_mouse.h" // Get the hardware interface #include "gmouse_lld_ADS7843_board_template.h" static bool_t init_board(GMouse* m, unsigned driverinstance) { //Gets Called at start return TRUE; } static bool_t MouseXYZ(GMouse* m, GMouseReading* pdr) { (void)m; // THIS function only gets called at the start, and will never be polled return TRUE; } const GMouseVMT const GMOUSE_DRIVER_VMT[1] = {{ { GDRIVER_TYPE_TOUCH, GMOUSE_VFLG_TOUCH | GMOUSE_VFLG_ONLY_DOWN | GMOUSE_VFLG_POORUPDOWN, sizeof(GMouse)+GMOUSE_ADS7843_BOARD_DATA_SIZE, _gmouseInitDriver, _gmousePostInitDriver, _gmouseDeInitDriver }, 1, // z_max - (currently?) not supported 0, // z_min - (currently?) not supported 1, // z_touchon 0, // z_touchoff { // pen_jitter GMOUSE_ADS7843_PEN_CALIBRATE_ERROR, // calibrate GMOUSE_ADS7843_PEN_CLICK_ERROR, // click GMOUSE_ADS7843_PEN_MOVE_ERROR // move }, { // finger_jitter GMOUSE_ADS7843_FINGER_CALIBRATE_ERROR, // calibrate GMOUSE_ADS7843_FINGER_CLICK_ERROR, // click GMOUSE_ADS7843_FINGER_MOVE_ERROR // move }, init_board, // init 0, // deinit MouseXYZ, // get 0, // calsave 0 // calload }}; #endif /* GFX_USE_GINPUT && GINPUT_NEED_MOUSE */ Has anyone any idea? Julian
×
×
  • Create New...