Jump to content

enrico.dallavia

Members
  • Posts

    34
  • Joined

  • Last visited

Recent Profile Visitors

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

  1. Ok, I understood! thanks for the clarifications
  2. Ok, thanks. One question, how is the refresh of the image handled by ugfx? what I mean is, if I want to reduce the refresh rate,do I have to modify some parameters in ugfx or is something that involves also the parameters on the display controller? (or both?) As an example, once I've drawn a new image, is ugfx with some thread that takes care to redraw the image xxx times per seconds? or it is completely detached from ugfx?
  3. It works! I've first loaded with ROMFS a bitmap, then copied the bytes on the external NOR flash. Using gdispImageOpenMemory(&myImage,data); gdispImageDraw(&myImage, 0, (fheight1+5), 60, 84, 0, 0); where data is the pointer to the address where the image is written, I can see the image at screen! uGFX is a wonderful piece of work!!!
  4. Hi all, thanks for the reply! I have a small gif loaded from romfs, but I don't think the images are needed to be redrawn a lot of time (so I will rather avoid caching). The external pSRAM is pretty big but the issue there is the speed at which I can use it. The flash also is quite big and I plan to save inside it only bmp image (so as Tectu has written, it should be fine loading them directly from the nor). I will try today using gdispImageOpenMemory. One question, since I can pass to the function only the address, how the ugfx will know how big is the image? because with bmp the image size is inside some part in the beginning of the "file" I've loaded? https://en.wikipedia.org/wiki/BMP_file_ ... ile_header thanks
  5. Hi inmarket, thanks for the reply! I've used the example provided from ugfx for stm32F429-discovery, modifying the code to implement the new kopin controller (for the initial setup and the change of backlight level), I also have changed the ram management because I've got a pSram instead of sdram connected through FMC (the FMC is shared between pSram and nor flash implemented by a single chip device S71VS256RD0 made by spansion). I can't change the ram nor the display resolution, but I can try to reduce the refresh rate (I hope I can also redraw the screen between frames, but I wonder how to do it, do I have to ask the controller or is there something inside ugfx where I can ask the status of the refreshing?) Thanks
  6. Hello, I have a custom board, with stm32 F429. Using the FMC we have equipped the board with a 256MBit flash NOR, I've already used the embedded filesystem to load images on the uP's internal flash (generating the .h files as described in the guide of ugfx with ROMFS). But now I'm wondering how to use image (the images are plain bmp) loaded at runtime and saved on the external flash, is it possible to fill a gdispImage object with the data read from external flash? I don't have a filesystem over external flash, only a small portion of code that tell me at which address the image begins and how long it is. Can I use gfileOpenMemory to read data of image inside gdispImageOpenFile, or to be more accurate, is there a way to open an image and display it, using gfileOpenMemory and using as the void * memptr the address on flash where the image file begins? Maybe what I'm searcing for is gdispImageOpenMemory? Thanks ps: is this approach valid? --> viewtopic.php?f=23&t=250 but I've already tried to use a pixmap, creating the heap on external pSram, and the system performance slows down a lot, if I use cached image, could I suffer the same problem?
  7. I got an acceptable result, using a pixmap 1 row width and height as my font's height and placing it inside the screen (as Tectu has suggested) but even when I clear the screen with gdispFillArea(0, 0, swidth, sheight/2,Black); gdispFillArea(0, sheight/2, swidth, sheight/2,Black); I'm suffering the ugly effect of scrolling from top to bottom of the black pixels. I had to split in two the fill area, because I got a better results if I do like that, instead of doing it on 1 call (I wonder why...) What could be the bottleneck? my cpu is running at 168MHz but the ram unfortunately is not working on burst mode. But beside the complete change of the screen, the image left untouched is clear (if I start a cycle that use write over the flash nor shared on FMC bus, the image became blurred and it is not readable anymore, so I think the speed of the ram is acceptable to refresh the screen)
  8. last update: even with pixmap (I've modified a little the ugfx source to be able to use a custom heap when request a new pixmap), when i had to redraw completely the screen, I'm suffering with a scroll issue (it seems that the screen is refreshed starting from the first line till the end very slowly), the gdispBlitArea(0, 0, swidth, sheight, surface); seems to have no influence at all on the overall performance. Maybe because both frame buffers are on the same external psram? Plus the system seems to be overloaded, with the pixmap, I got timing problem with other threads (they runs too slow) and so I'm thinking to drop use of a pixmap (at least large as the whole screen). What I'm doing is gdispGFillArea(pix,0, 0, swidth, sheight,Black);//on screen change //update of 2-3 lines of text gdispGFillStringBox(pix,0, 0, swidth, fheight1, _date, curr_font, Black, White, justifyCenter); gdispGFillStringBox(pix,0, fheight1+5, swidth, fheight1, _time, curr_font, Black, White, justifyCenter); //update of some gif if needed gdispGImageDraw(pix,&myImage, 0, (3*fheight1+5), 100, 100, 0, 0); gdispBlitArea(0, 0, swidth, sheight, surface); Once it is completely redrawn, the changes of what is needed are barely acceptable.
  9. with chibios 3 the call is a little different, I've tried static struct memory_heap ext_heap; chHeapObjectInit(&ext_heap, (void*)(SRAM_BANK_ADDR+8*1024*1024), 1024*1024);//307200 where SRAM_BANK_ADDR is 0x64000000 and my external memory is 16 MByte wide (pSram), so I've allocated a heap at half the size with 1Mbyte. The call uint16_t *pData = NULL; pData = (uint16_t *)chHeapAlloc(&ext_heap,512*1024); seems to work fine. Now the question is, how can I tell ugfx to use this kind of heap instead the default one when it try to allocate a pixmap? I know that Tectu has suggested pixmap if I got only small portion but the most trouble I got is when I change the screen from one page with another one and I have to erase/redraw all the screen. So I would like to use a pixmap large as the main screen to implement a sort of double buffer. As the question I forgot to answer, I have a stm32-f429 uP with lcos controller A913 made by kopin (which I configure when system start through i2c command) to control a screen made also by kopin. Thanks
  10. Good morning and happy new year! Due to other jobs, I had to delay the speed up of screen's refresh until now. I tried to use pixmaps but unfortunately the gdispCreatePixmap fails because chHeapAlloc of chibios seems to return 0. I have external SRAM initialized to handle the graphics (but the size of the ram is quite big so I assume I can use part of it for other things). May can I use this ram to handle the heap that holds the pixmap? The screen resolution is 640x480 and I don't have enough internal sram on stm-f429 to keep the pixmap. Does anyone know how to initialize heap of chibios from a certain address? from a past discussion i found static MemoryHeap ext_heap chHeapInit(&ext_heap, (void*)0x60000000, 10240); How ugfx use the external sram? If I put the base address of heap far away from the size of ugfx screen buffer (> 640x480x4 for example) could it work? thanks in advance!
  11. Hi, today I got other job to do, but tomorrow I will try to implement what you have suggested. Thanks a lot!
  12. Hi, I'm trying to display a clock, so every 1 second I'm redrawing the screen, but the effect is very poor since I got a bad effect during the redraw of the screen with the new values. Is it possible to have a double buffer or syncronizing the redraw of the screen when the display begins redrawing with first line? Thanks I'm using this function to draw //initialization of some variables at the beginning swidth = gdispGetWidth(); sheight = gdispGetHeight(); curr_font = gdispScaleFont(font,2,2); fheight1 = gdispGetFontMetric(curr_font, fontHeight)+2; //code to call every 1s GetDateTime(&_date,&_time); gdispFillStringBox(0, 0, swidth, fheight1, _date, curr_font, Black, White, justifyCenter); gdispFillStringBox(0, fheight1+5, swidth, fheight1, _time, curr_font, Black, White, justifyCenter);
  13. Yes it true that every thing must be re-initialized, but since the wakeup from standby is very similar to a cold boot and the sw begins from first line of main, I thought that sdram and everything are initialized again, since I had the calls to halInit(); chSysInit(); // Initialize and clear the display gfxInit(); but something inside the display maybe keeps something dirt. My question are now the command issued to the display. Why the screen won't turn off if I send the command? I hope command are sent through SPI (and I'm quite sure original ugfx initialization send them like I do) because if I can't send properly the command I can't handle the wakeup from sleep. Cheers
  14. I try to write some command inside gdisp_lld_control but they seems to not have any effect like acquire_bus(g); write_data(g,ILI9341_CMD_DISPLAY_OFF); release_bus(g); the display won't turn off in the same way what manual wrote about going in and out from sleep has no effect at all. Am I missing something about write command to lcd controller?
  15. Hi, thanks to all for the suggestion, I will do some test today. For the initialization/de-initialization,when it returns from standby imply that the program would start again from the first line of main, the function gfxInit is always called. But maybe there are some registers inside the lcd controller that are messed up during standby procedure.
×
×
  • Create New...