Jump to content

Nicolas Dammin

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Nicolas Dammin

  1. Thank you all for the reply. Now this makes sense to me. It is the decoding algorithm rather than the image itself. The internal RAM of the STM32F103 is just too small for that. I was just curious what I can do without having to add an external RAM chip, and displaying an image (in RAW32 mode) is quite impressive! I think I'd better use a more powerful µC and a SRAM chip for further experiments (I have them already lying around), because I think I can't get my User Interface working with those specs. Thanks and Regards Nico
  2. Thanks cpu20. But even with 3k (more isn't possible because of the huge overhead from FreeRTOS) it doesn't work. Is there a way to transfer the image data from Flash directly to the LCD without pushing the whole image to the RAM? Like using another function? I'm totally new to ugfx.
  3. Hello, I use the ugfx library for a ST7735 color display on my STM32F103. It has 64 kb of FLASH and 20 kb of RAM. I want to display some labels and small images on the display. The images are gif-files that are converted to header files using file2c. They are all static const. That was the only way to get the images on the internal flash of the STM. When I use RAW32, everything works fine. But when I wanna use FreeRTOS, I won't get the images. I am using the CubeMX software to generate the initial code, including the FreeRTOS provided there. So I preconfigure FreeRTOS in CubeMX with a gfx-Thread and let it generate the code. Then I include the ugfx library using the SW4STM32 IDE. gfx-Task: /* StartGFXTask function */ void StartGFXTask(void const * argument) { /* USER CODE BEGIN StartGFXTask */ (void)argument; gfxInit(); guiInit(); guiShowPage(DISPLAY_PAGE); /* Infinite loop */ for(;;) { osDelay(500); } /* USER CODE END StartGFXTask */ } The functions to register the Thread: /* definition and creation of gfxTask */ osThreadDef(gfxTask, StartGFXTask, osPriorityAboveNormal, 0, 1024); gfxTaskHandle = osThreadCreate(osThread(gfxTask), NULL); The heap memory of FreeRTOS is set to 16384k which is the maximum my STM32 can handle. In the gui.c I have this for showing the image: // light icon wi.g.show = TRUE; wi.g.x = 5; wi.g.y = 5; wi.g.width = 20; wi.g.height = 20; wi.g.parent = ghContainer; wi.text = ""; wi.customDraw = 0; wi.customParam = 0; wi.customStyle = 0; lightImage = gwinImageCreate(0, &wi.g); gwinImageOpenMemory(lightImage, light); As I said, the same code worked without FreeRTOS. When FreeRTOS is used, I get the labels and the background color correct, but there is no image. Is that a memory or timing issue? Should I better use the FreeRTOs-functions from ugfx? Can I get any example code for a image read from the internal flash with FreeRTOS? Thanks in advance Nico
×
×
  • Create New...