Jump to content

GunterO

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by GunterO

  1. Yes, could be it, I will look into the mbed code to find out how they are handling this. But the init/clearing of the display is much slower as well. Made some vid's to see the difference. µGFX: https://drive.google.com/file/d/0B3B79f ... sp=sharing mbed: https://drive.google.com/file/d/0B3B79f ... sp=sharing Thanks for helping!
  2. No, I'm not aware of a µGFX port for mbed so far. My (visual) comparisation is just by drawing rectangles on the screen. The library / sample I use for mbed is from here: https://developer.mbed.org/users/gmoral ... 40Library/ For µGFX (on ChibiOS/RT), I use gdispFillArea() For mbed, I use tft.FillRect() The hardware setup is identical because I use the same board, LCD & connections.
  3. Hi, I was able to increase the SPI speed (SPI_BaudRatePrescaler_2) by changing the pad config: static inline void init_board(GDisplay *g) { (void) g; g->board = 0; //Set up the pins.. palSetPadMode(SPI_PORT, CS_PAD, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); palSetPadMode(SPI_PORT, SCK_PAD, PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); palSetPadMode(SPI_PORT, MISO_PAD, PAL_MODE_ALTERNATE(5)); palSetPadMode(SPI_PORT, MOSI_PAD, PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); palSetPadMode(RESET_PORT, RESET_PAD, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); palSetPadMode(DNC_PORT, DNC_PAD, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); //Set pins. palSetPad(CS_PORT, CS_PAD); palSetPad(RESET_PORT, RESET_PAD); palClearPad(DNC_PORT, DNC_PAD); //Start SPI1 with our config. spiStart(SPI_DRIVER, &spi_cfg); spiSelect(SPI_DRIVER); /* Slave Select assertion. */ } And did some marginal optimalisations: static inline void write_index(GDisplay *g, uint8_t index) { (void) g; palClearPad(DNC_PORT, DNC_PAD); spiSend(SPI_DRIVER, 1, &index); } static inline void write_data(GDisplay *g, uint8_t data) { (void) g; palSetPad(DNC_PORT, DNC_PAD); spiSend(SPI_DRIVER, 1, &data); } But the speed is still (visually) slower then my mbed demo. Both are compiled with µVision 5.13 if this should influence something. Maybe a µGFX setting? DMA (but GDISP_USE_DMA = TRUE)?
  4. Yep, works! Seems to be a problem with the SPI speed I used. Your default SPI_BaudPrescaler_4 wasn't working on my L152RE Nucleo board, had to use Prescaler_8, which is quite slow in my opinion. My mbed example runs significantly faster, SPI speed is set there at 24MHz. I'll try to figure out how to increase the speed. Thanks!!
  5. Yes, please share :-) I'm trying to get the same LCD working on a Nucleo board in combination with ChibiOS and uGFX too. Via mbed, the LCD demo is working, but I don't like mbed very much. Thanks!
  6. Thank you for your quick response. I didn't know about the recommendation to use the master branch, I'll switch to that. Sometimes the recommendation is to use the latest stable release, and not nightly builds. But I guess this depends on the actual library / develop team. Anyway, thanks for clearing that up for me, and keep up the very good work. Nice library you and your team have made. It is a big help for all of us!
  7. Hi, I'm experimenting with ugfx_release_22_150104 in combination with a STM32F4-Discovery + Embest LCD add-on. When I activate DMA for the LCD, I stumbled on a typo in \drivers\gdisp\SSD2119\gdisp_lld_SSD2119.c: LLDSPEC void gdisp_lld_blit_area(GDisplay* g) { pixel_t* buffer; coord_t ynct; must be: LLDSPEC void gdisp_lld_blit_area(GDisplay* g) { pixel_t* buffer; coord_t ycnt; With the variable renamed correctly to ycnt, all is working fine. Maybe somebody of the develop team can review this, and make the change if needed. Cheers!
×
×
  • Create New...