Jump to content

Oshel

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Oshel

  1. It appears that I get these stripes only if I go from the "button screen" to the "string screen". Both does not have a parent defined. But the 2nd one, when redrawing in gwin_wm.c in _gwinFlushRedraws function enters the while loop: // Do loss of visibility first while ((RedrawPending & DOREDRAW_INVISIBLES)) { ... _GWINwm->vmt->Redraw(gh); ... } and it clears the window with the default color. Honestly I do not have idea why It happens only in one direction and not in the other. Plus I do not see the point of clearing the display (the container area) with default color and then drawing the container with background color.
  2. Hello, I would like to ask if this is normal LTDC performance problem- in video when redrawing the screen you can see the black stripes for a moment. 1 per 5 times it does not appear. I am using containers (full screen)- first one is container with 2 buttons, second one is container with a label. I use gwinHide/gwinShow. I don't know if it is problem with memory access or with LTDC settings (default one with ALLOW_2ND_LAYER difned as GFXON). The system is STM32F429 with FreeRTOS. The screen is RGB666 640x480. VID_20180313_214255.mp4
  3. http://www.ampdisplay.com/documents/pdf/AM-640480G2TNQW-00H-F.pdf
  4. Well, love it. Got line pitch setting set wrongly. Anyway topic to be closed. Have a nice day!
  5. Hello oh mighty uGFXians! I've got some problem with DMA2D on a custom hardware with external RAM. I am using LTDC driver in 565 mode. Currently, without DMA2D the intro logo is rendering fine. But after enabling DMA2D I got the image as shown in the picture. The display is natively 666 but I'm using 565. I was expeimenting with 888 as well but with no luck. Any help would be useful couse I gues I am missing something in the settings. I need to show it to the client as a proof of concept to finally buy a licence, huh!
  6. I do have the MCU connected to the controller well- I mean D0 to D0, D1 to D1 etc. So when I program the controller in RGB mode it should work. After all- by default it is in RGB. I will look into that.
  7. Well, I've changed TFT Panel Data Width to 24 bit and in gdisp_lld_config.h changed to GDISP_PIXELFORMAT_RGB565 to GDISP_PIXELFORMAT_BGR565 and it stated to work ;o Any explaination?
  8. Hello, Well, after strugling for few hours I need to ask for a hint. I've just got this display: http://www.buydisplay.com/default/7-tft-screen-touch-lcd-display-module-w-ssd1963-controller-board-mcu I am trying to control it with SMT32F103VC. Everything goes well, it initiates and works (although I had to change PLL values- there is 20 MHz clock onboard instead of 10 MHz). But i do have problem with colors. White is yellow, green is super dark green (almost invisable), yellow is very light green, red is very light green, blue is dark red... I don't get it. I am setting it in RGB565 mode, 16 bit- default ugfx settings. I've also checked if I write good values to the RAM- and yes, everything is fine. EVerything else works, like the backlight etc- it means that ssd accepts commands. Any idea what is wrong? Here is init of FSMC code (works with ssd1289): #define GDISP_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */ #define GDISP_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */ { GPIO_InitTypeDef GPIO_InitStruct; __HAL_RCC_AFIO_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE(); __HAL_RCC_GPIOE_CLK_ENABLE(); GPIO_InitStruct.Pin = GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_14 | GPIO_PIN_15; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); __HAL_RCC_FSMC_CLK_ENABLE(); FSMC_NORSRAM_InitTypeDef FSMC_NORSRAM_InitStruct; FSMC_NORSRAM_TimingTypeDef FSMC_NORSRAM_TimingInitStruct; FSMC_NORSRAM_InitStruct.NSBank = FSMC_NORSRAM_BANK1; FSMC_NORSRAM_InitStruct.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE; FSMC_NORSRAM_InitStruct.MemoryType = FSMC_MEMORY_TYPE_SRAM; FSMC_NORSRAM_InitStruct.MemoryDataWidth = FSMC_NORSRAM_MEM_BUS_WIDTH_16; FSMC_NORSRAM_InitStruct.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE; FSMC_NORSRAM_InitStruct.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW; FSMC_NORSRAM_InitStruct.WrapMode = FSMC_WRAP_MODE_DISABLE; FSMC_NORSRAM_InitStruct.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS; FSMC_NORSRAM_InitStruct.WriteOperation = FSMC_WRITE_OPERATION_ENABLE; FSMC_NORSRAM_InitStruct.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE; FSMC_NORSRAM_InitStruct.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE; FSMC_NORSRAM_InitStruct.ExtendedMode = FSMC_EXTENDED_MODE_DISABLE; FSMC_NORSRAM_InitStruct.WriteBurst = FSMC_WRITE_BURST_DISABLE; hal_sram.Instance = FSMC_NORSRAM_DEVICE; hal_sram.Extended = FSMC_NORSRAM_EXTENDED_DEVICE; hal_sram.Init = FSMC_NORSRAM_InitStruct; FSMC_NORSRAM_TimingInitStruct.AddressSetupTime = 2; FSMC_NORSRAM_TimingInitStruct.AddressHoldTime = 1; FSMC_NORSRAM_TimingInitStruct.DataSetupTime = 2; FSMC_NORSRAM_TimingInitStruct.BusTurnAroundDuration = 1; FSMC_NORSRAM_TimingInitStruct.CLKDivision = 2; FSMC_NORSRAM_TimingInitStruct.DataLatency = 2; FSMC_NORSRAM_TimingInitStruct.AccessMode = FSMC_ACCESS_MODE_A; HAL_SRAM_Init(&hal_sram, &FSMC_NORSRAM_TimingInitStruct, NULL); __HAL_AFIO_FSMCNADV_DISCONNECTED(); } Here are the settings (got it from the forum here): #define SCREEN_HSYNC_BACK_PORCH 46 #define SCREEN_HSYNC_FRONT_PORCH 210 #define SCREEN_HSYNC_PULSE 8 #define SCREEN_VSYNC_BACK_PORCH 23 #define SCREEN_VSYNC_FRONT_PORCH 22 #define SCREEN_VSYNC_PULSE 8 static const LCD_Parameters DisplayTimings[] = { // You need one of these array elements per display { 800, 480, // Panel width and height SCREEN_HSYNC_BACK_PORCH, SCREEN_HSYNC_FRONT_PORCH, SCREEN_HSYNC_PULSE, // Horizontal Timings (back porch, front porch, pulse) CALC_PERIOD(800,SCREEN_HSYNC_BACK_PORCH,SCREEN_HSYNC_FRONT_PORCH,SCREEN_HSYNC_PULSE), // Total Horizontal Period (calculated from above line) SCREEN_VSYNC_BACK_PORCH, SCREEN_VSYNC_FRONT_PORCH, SCREEN_VSYNC_PULSE, // Vertical Timings (back porch, front porch, pulse) CALC_PERIOD(480,SCREEN_VSYNC_BACK_PORCH,SCREEN_VSYNC_FRONT_PORCH,SCREEN_VSYNC_PULSE), // Total Vertical Period (calculated from above line) CALC_FPR(800,480,SCREEN_HSYNC_BACK_PORCH,SCREEN_HSYNC_FRONT_PORCH,SCREEN_HSYNC_PULSE,SCREEN_VSYNC_BACK_PORCH,SCREEN_VSYNC_FRONT_PORCH,SCREEN_VSYNC_PULSE,60ULL), // FPR - the 60ULL is the frames per second. Note the ULL! FALSE, // Flip horizontally FALSE // Flip vertically }, };
  9. Hello, I would like to ask about creation of the custom widget. The widget would consist of buttons which after pressed roll out other buttons/fields to edit. The other buttons (main ones) then would move under the rolled out list. Pictures in order 1-6 shows what I mean (I guess). I would like to ask how to do this? Should I create a custom widget? Or the container with containers? I have a problem with that "Button2" and "Button3" have to go under the list and I don't know where to start to deal with it. I don't want you to give me the solution of course, just a hint how would you do that in a simpliest way. I couldn't paste the pictures ("There was a problem processing the uploaded file. Please contact us for assistance." error) so I paste the link to google drive: https://drive.google.com/file/d/1Wd1oXuc35P5LDGxkud8BcnYdMbj--QCO/view?usp=sharing
  10. Well, I figured what have I been doing wrong- I was changing the global compiler setting instead of project settings... I changed the execs as follows (Settings->Compiler->Toolchain executables) on the picture. After that I changed the build options (righ mouse click on project->Build options-> change compiler on cygwin). Last thing is to change the makefile options (right mouse click on project->Properties->This is custom Makefile). And voila! It works! EDIT: Is there a way in CodeBlocks to include ugfx not in makefile but in search directories? I am missing the functions' names complementary. EDIT: Nvm. - I just included "#include "../uGFX/gfx.h" instead of "#include "gfx.h"
  11. Hello Joel, I do know about the concept of IDE. Some time ago I was writing the code for SDCC in CodeBlocks and it was working fine. I am only having problems with cygwin this time. I tried to point directories and the same execs but with no effect. Let's wait to see what cpu20 have to say I would be happy to see the working settings
  12. Thank you for replies. I am aware that f103 can be too slow for this display. I am trying to build it "from the bottom"- I will try this uC and if it is not fast enough for my client then I will go to F4 or search for other solution with external ram instead of frame buffer inside controller. Currently I am waiting for a display delivery. I was asking about the parallel flash because I assume it would be faster and more efficient than using SPI flash. But the price of the parallel flash is quite high so I gues I will leave this idea.
  13. Hello. Sorry for digging out old topic but I do not want to open new one. I followed your guidelines about compiling uGFX projects under Windows. It went smoothly. Now I would like to set up project under latest version of Code::Blocks, but I do have some problems with it. I haven't found any topic or instructions how to do that- I know that you are not Code::Blocks support, but maybe you can write down the instructions so we, users, can have fun with win32 emulator. First of all I have created an empty project in the directory which the "Your First Compile - Windows" tutorial was using. I have created the folder right next to "TestProject". I copied the makefile to that directory. In the codeblocks project I added "main.c" and "gfxconf.h" files from some demo. After that I entered project properties and I picked "This is custom Makefile" box. Next thing I did is changing the compiler: Settings-> Compiler -> Selected Compiler: Cygwin GCC. After that I switched the tab to "Toolchain executables" and I changed the directory to "C:\cygwin64". Aaaand here I have problem. Which compilers from the "bin" directory should I use? How to fill other boxes like "C++ compiler", "Linker for dynamic libs", "Linker for static libs", "Debugger", "Resource compiler" and "Make program"? And should I do some additional steps? Couse I am messing around with these exes files but I still get compiler executables errors. Thank you in advance for a help and happy new 2018 year!
  14. Hello, I am currently planning to set up a device that would use STM32F103VC uC and 800 x 480 TFT LCD with SSD1963 (8080). I would like also to add some external flash. The question is, maybe not directly related to uGFX, but is it possible to connect external flash AND the display to FSMC controller? Anyone have done something simillar? I am only asking if it is possible. As far as I know, there is a CS line so there shouldn't be a hardware conflict. Another question is how it would affect the performance of uGFX? Thank you in advance.
  15. Hello Joel, Yes, I've disabled all modules that only GOS module is enabled. I am currently working on other stuff but when I have time I will try to know what is going on.
  16. Hello, I am currently trying to run USB FS MSC application with uGFX on STM32F746 discovery board. In the begining I was planning to use FreeRTOS but I couldn't get it working. After that I decided to run it without OS- and I still can not make it running. I am using application code from: STM32Cube_FW_F7_V1.8.0\Projects\STM32746G-Discovery\Applications\USB_Host\MSC_Standalone Without gfxInit() function the USB driver is fully initialized. But when I try to run it with uGFX then the driver can not install pendrive and it fails at enumeration phase. Apparently the problem is uGFX's OS (when using GFX_USE_OS_RAW32) because when I comment out _gosInit() function then everything works fine (yes, I know it is not a good approach). Do you maybe have some idea how to run it or how to resolve the problem?
  17. Hello! Sorry for no contact- I was on holiday for 2 weeks. Now I am back. Thank you very much for solving the problem. Youre the best I will try to compile it as soon as I dig myself out of e-mails and hot jobs. I guess I was using the latest library from download section on the site. But true- git sourcing is a better solution.
  18. Hello again, I am (again) having a hard time on the conflict between uGFX and HAL libraries. I am trying to run create a project with: FreeRTOS, USB Host with Mass Storage class, custom FatFs, uGFX ...but after adding uGFX library I am getting these weird color errors. Here is my project: https://drive.google.com/file/d/0BzNqKTMmGSjXMlJaQnJ0TkNUVDQ/view?usp=sharing It is quite heavy due to all the libraries. Could you please take a look at it? I am undefing colors in main.h but I was trying to do this in X other ways and it still doesnt compile.
  19. Hello, I would like to create a TextEdit widget which will open a keyboard when it is pressed (or more precisely- focused). Is it possible to attach such an event? Because today I was fighting with it but I could not handle. My 2nd question is if there is a way to check if the object is already created? For example when I push the button, the keyboard should pop up. I don't want to "recreate" it when I press the button again (of course I can deactivate the button, but it is not the solution in my project). And my last question: I create a virtual keyboard with number, backspace and enter button. I would like to react on the enter button with a destruction of the keyboard. Other keys in the keyboard (like numbers) are generating keyboard-like events. But enter button is generating button-like event when no TextEdit widget is focused. What widget is generating this event? Because I have no bloody idea.
  20. I had my HAL configuration file done correctly. At some point, after messing with includes in the files provided for the board (to make it similar to the working example posted in download section) all these HAL type error disappeared. But these 2 errors- typedef errors- were still there. I wrote before that I do not know what have I done to make it work- now I can tell, but I do not see any sense in that. I rentered to Includes in Symbol and Paths tab in Properties window and I made a little change (move include up or something like that, doesnt matter, coese after that I moved it back to the state from before). It made the compiler to recompile whole thing once more, like really recompile, because before of course I was cleaning the project and I was updating it every single way. I have noticed that every time I am making a change in gfx_conf file the whole project has to be treated that way because not every file is updated with new definitions. Maybe I am missing something? The library is now original- no changes. Of course I know that messing with library source code is bad. I was only doing that to make it work. The workaround with colors was added in the main file- just like in the example. P.S. You should update the library with the board files which are compatible with the HAL files. Or maybe it is updated? I have 2.7 version of the library.
  21. Well, finally I compiled the code without modifications in the library. I do not know how eclipse is linking the files but it just "started" to work at some point. I dunno wtf. If any1 would like to use the code or just check, here it is: https://drive.google.com/file/d/0BzNqKTMmGSjXeUNzbjlxV29CTms/view?usp=sharing
  22. Well, I managed to get rid of the HAL errors by including HAL files in order taht you did in your project. But now I am facing these problems: Type 'bool_t' could not be resolved gdisp_lld_STM32LTDC.c Type 'systemticks_t' could not be resolved stm32f746g_discovery_sdram.c And these problems are related with FreeRTOS. These types are present while raw32 is used- but there is no such definitions in gos_freertos.h file. Edit: I did remove errors by: 1. In file stm32f746g_discovery_sdram.c in line 261 (_FMC_SDRAM_SendCommand function) I replaced systemticks_t to uint32_t. 2. In file gdisp_driver.h I added "typedef int8_t bool_t;" right after "#if GFX_USE_GDISP". Funny fact is that bool_t type should be included while using FreeRTOS- it is in gos_freertos.h. So, although it compiles, I am sure that I did not do this right way...
  23. Hello @cpu20, Could you please tell me what have you done to make your template working? I am trying to follow all the steps with newest ugfx library and FreeRTOS- although FreeRTOS is not a problem here (I guess). I will tell you now what am I doing- step by step: 1. Creating new C project with clear STM32F745 MCU with HAL library and FreeRTOS included. 2. Importing ugfx library. 3. Adding the folder with ugfx to source location in project properties- I exclude every file except gfx_mk.c and gdisp/STM32LTDC folder. 4. I add in Paths and Symbols in project properties paths to ugfx and gdisp/STM32LTDC. 5. I copy files from boards/base/STM32F746-Discovery to src and inc directories. In this moment, imho, it should work. But I constatly get these errors. Could you please tell me how did you get is running? Btw, I am trying to run the display only now.
  24. What you are saying is that I should define new customDraw routine for the keyboard widget, copy the content of gwinKeyboardDraw_Normal and change it as I want, yes?
  25. Hay Joel, Bu as I can see you can not in a simple way change how the keyboard looks lke. You can manipulate with which buttons are active, how they are arranged, what colors will they be when pressed etc but you can not use, let's say, a bitmap as a background of button (single one- I know it only makes sense for fixed keyboard sizes etc, it's just hypothetical). Or make color blending between buttons. I mean create custom redraw routine. P.S. I am just trying to make a copy of existing GUI which is currently made on Linux to make an impress that your library can replace expensive GUIs on Linux.
×
×
  • Create New...