Jump to content

tronicgr

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by tronicgr

  1. Hi,

    You are right, I was trying to use the ILI9341 driver from the uGFX repository. But the driver on the STM32F429i is using RGB and SPI connection. I'm trying to figure out if I can only use SPI for now and how. The pinout is somehow different from normal SPI interfaces and can't find much info anywhere except from the the LTDC demo example. So many files to go through... :o

    I'll keep trying...

    Thanks

    Thanos

  2. Ok, I managed to fix my installation issues... So far it looks its compiling with only a few warnings:


    Description Resource Path Location Type
    unused variable 'shelltp' [-Wunused-variable] main.c /STM32F429-DISCOVERY-example line 180 C/C++ Problem
    comparison of unsigned expression < 0 is always false [-Wtype-limits] main.c /STM32F429-DISCOVERY-example line 102 C/C++ Problem
    comparison of unsigned expression < 0 is always false [-Wtype-limits] main.c /STM32F429-DISCOVERY-example line 84 C/C++ Problem
    implicit declaration of function 'rand' [-Wimplicit-function-declaration] main.c /STM32F429-DISCOVERY-example line 147 C/C++ Problem
    implicit declaration of function 'srand' [-Wimplicit-function-declaration] main.c /STM32F429-DISCOVERY-example line 141 C/C++ Problem
    incompatible implicit declaration of built-in function 'memset' [enabled by default] main.c /STM32F429-DISCOVERY-example line 160 C/C++ Problem
    unused parameter 'g' [-Wunused-parameter] board_SSD1289.h /STM32F429-DISCOVERY-example/resources/ugfx/drivers/gdisp/SSD1289 line 115 C/C++ Problem
    implicit declaration of function 'memset' [-Wimplicit-function-declaration] main.c /STM32F429-DISCOVERY-example line 160 C/C++ Problem
    incompatible implicit declaration of built-in function 'strcat' [enabled by default] main.c /STM32F429-DISCOVERY-example line 162 C/C++ Problem
    implicit declaration of function 'strcat' [-Wimplicit-function-declaration] main.c /STM32F429-DISCOVERY-example line 162 C/C++ Problem

    I'll have a change to try it on the actual board tomorrow, probably won't display anything :lol:

    Regards,

    Thanos

  3. Hi Resset,

    The timings you posted are the same I use right now (in the zip file and in the piece of code I posted). :roll:

    How I set slower timing? I'm not familiar with the meaning of these bits and what should change for slower operation:

    /* FSMC timing */
    FSMC_Bank1->BTCR[FSMC_Bank + 1] = (FSMC_BTR1_ADDSET_2 | FSMC_BTR1_ADDSET_1) \
    | (FSMC_BTR1_DATAST_2 | FSMC_BTR1_DATAST_1) \
    | FSMC_BTR1_BUSTURN_0;

  4. Thanks for the welcome and the prompt replies!

    what does 'black/white screen' exactly mean? Do you see anything or just a black screen and nothing at all?

    The screen remains blank with white background, unless that is the backlight.

    I'm trying to use the FSMC interface of the F4 as described in the connections guide but I'm not sure if it set correctly:

    static inline void init_board(void) {

    #if defined(STM32F1XX) || defined(STM32F3XX)
    /* FSMC setup for F1/F3 */
    rccEnableAHB(RCC_AHBENR_FSMCEN, 0);

    #if defined(GDISP_USE_DMA) && defined(GDISP_DMA_STREAM)
    #error "DMA not implemented for F1/F3 Devices"
    #endif
    #elif defined(STM32F4XX) || defined(STM32F2XX)
    /* STM32F2-F4 FSMC init */
    rccEnableAHB3(RCC_AHB3ENR_FSMCEN, 0);

    #if defined(GDISP_USE_DMA) && defined(GDISP_DMA_STREAM)
    if (dmaStreamAllocate(GDISP_DMA_STREAM, 0, NULL, NULL)) gfxExit();
    dmaStreamSetMemory0(GDISP_DMA_STREAM, &GDISP_RAM);
    dmaStreamSetMode(GDISP_DMA_STREAM, STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD | STM32_DMA_CR_DIR_M2M);
    #endif
    #else
    #error "FSMC not implemented for this device"
    #endif

    /* set pins to FSMC mode */
    IOBus busD = {GPIOD, (1 << 0) | (1 << 1) | (1 << 4) | (1 << 5) | (1 << 7) | (1 << 8) |
    (1 << 9) | (1 << 10) | (1 << 11) | (1 << 14) | (1 << 15), 0};

    IOBus busE = {GPIOE, (1 << 7) | (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12) |
    (1 << 13) | (1 << 14) | (1 << 15), 0};

    palSetBusMode(&busD, PAL_MODE_ALTERNATE(12));
    palSetBusMode(&busE, PAL_MODE_ALTERNATE(12));

    /* FSMC timing */
    FSMC_Bank1->BTCR[FSMC_Bank + 1] = (FSMC_BTR1_ADDSET_2 | FSMC_BTR1_ADDSET_1) \
    | (FSMC_BTR1_DATAST_2 | FSMC_BTR1_DATAST_1) \
    | FSMC_BTR1_BUSTURN_0;

    /* Bank1 NOR/SRAM control register configuration
    * This is actually not needed as already set by default after reset */
    FSMC_Bank1->BTCR[FSMC_Bank] = FSMC_BCR1_MWID_0 | FSMC_BCR1_WREN | FSMC_BCR1_MBKEN;

    /* Display backlight control */
    /* TIM3 is an alternate function 2 (AF2) */
    pwmStart(&PWMD4, &pwmcfg);
    palSetPadMode(GPIOD, 13, PAL_MODE_ALTERNATE(2));
    pwmEnableChannel(&PWMD4, 1, 100);

    }

    Thanks,

    Thanos

  5. Hi all,

    I have a STM32F4-discovery board that I try to make it work with my SSD1289 LCD screen.

    Resset lead me to a chibistudio example he had for a different screen , and after I changed all files for my screen I only get a blank white screen. The LCD works as it came with a Open107 development board and it displays fine the demonstration programs.

    Is there available a complete example of STM32F4-discovery for Chibistudio and ugfx for that LCD? Nothing fancy, just display a hello message maybe. :(

    I'm sure that even if I compiled the example I have, with no errors, I must be missing something...

    Best Regards,

    Thanos

×
×
  • Create New...