This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR6989 + GRLIB

Other Parts Discussed in Thread: MSP430FR6989

Hi, guys!
I've ported the "MSP432P401R + Education Booster pack" examples to "MSP430FR6989 + Education Booster pack". Now I want to make an example with a bitmap image. I have successfully displayed text on the screen but when I try to display a pixmap from the tool "Imageformer" the picture gets chopped from the right side. (image attached)

I tried to expand the "clipRegion" but it didn't work. So basically I don't know whether there's something wrong with my GRLIB port or am I just using the GRLIB in the wrong way...

Any help is appreciated!

Regards,
L. B.

#include <stdio.h>
#include <driverlib.h>
#include "grlib.h"
#include "Crystalfontz128x128_ST7735.h"
#include "tu_logo.h"

/* Graphic library context */
Graphics_Context g_sContext;

Graphics_Image tu_logo;

int main(void) {

	init();

    /* Initializes display */
    Crystalfontz128x128_Init();

    /* Set default screen orientation */
    Crystalfontz128x128_SetOrientation(LCD_ORIENTATION_UP);

    /* Initializes graphics context */
    Graphics_initContext(&g_sContext, &g_sCrystalfontz128x128);
    Graphics_setForegroundColor(&g_sContext, GRAPHICS_COLOR_BLUE);
    Graphics_setBackgroundColor(&g_sContext, GRAPHICS_COLOR_WHITE);
    GrContextFontSet(&g_sContext, &g_sFontFixed6x8);
    Graphics_clearDisplay(&g_sContext);

    Graphics_drawStringCentered(&g_sContext, (int8_t *)"Embedded Systems", AUTO_STRING_LENGTH, 64, 10, OPAQUE_TEXT);

//    g_sContext.clipRegion.xMin = 0;
//    g_sContext.clipRegion.xMax = 128;
//    g_sContext.clipRegion.yMin = 0;
//    g_sContext.clipRegion.yMax = 128;

    Graphics_drawImage(&g_sContext, &tu_logo8BPP_UNCOMP, 14, 20);

    while(1){ }
}

  • Hi L.B.,

    Does the image appear properly with the MSP-EXP432P401R? What happens if you left-justify the image on the LCD screen, does more of it appear on the right side or will the same amount remain? Can you provide your tu_logo.h or full project? I would expect the end of "Embedded Systems" to also be cut off if something was wrong with LCD initialization, so the issue either lies with the Graphics_drawImage function or tu_logo8BPP_UNCOMP.

    Regards,
    Ryan
  • Hi, Ryan,
    unfortunately I don't have this kit for now.
    If I left justify the picture (i.e. X = 0, Y = 0) the picture is shown the correct way - entirely. I'm providing you with the full project ... buuut... I don't know how to do that here ... maybe I can send you a message or something?
  • Hello L.B.,

    We can exchange project files through a private message.  In the meantime, can you also get text to correctly display inside of the LCD area in question? This would localize the issue to the Graphics_drawImage function. Once again, does the image appear correctly if using the MSP432 solution?  What if a TI-provided image is used?  I notice that most examples flush the buffer to the LCD after drawing the image.

    Regards,
    Ryan

  • Hello, Ryan!
    I tried the text - it displays correctly but the image itself is still chopped. I tried the TI logo from the MSP432 example. It worked correctly. I noticed that it uses compression.

    So I did my logo with compression and now it displays correctly.

    I tried to draw a circle in the chopped area and it displayed correctly. So my guess is - there is something wrong with the Graphics_drawImage( ) function in the uncompressed part...

    I have attached the CCS 6.1.3.00033 project.BlinkLED_MSP430FR6989_pixmap_fail.zip

  • Hello L.B.,

    I've submitted your findings to the software tools team so that they can investigate whether a bug is present within GRLIB. In the meantime I would suggest that you only use compressed images.

    Regards,
    Ryan
  • Thanks!

    The picture's array was generated with Imagereformer 1.00.00.00 btw.

**Attention** This is a public forum