cancel
Showing results for 
Search instead for 
Did you mean: 

How to display image from QSPI flash?

Priyank
Associate III

Hi I've been trying to display an image on the GUI using an image (hex array) stored in the QSPI flash (memory mapped). I've taken a look at some of the documentation such as Loading Images at Runtime & Dynamic Bitmaps. 

void LandingView::loadImageFromQSPI(Image& imageWidget)
	{
	    BitmapId bmpId = Bitmap::dynamicBitmapCreateExternal(
			185,
			 43,
	        (const void*)0x90FC0000,
	        Bitmap::RGB565
	    );

	    if (bmpId != BITMAP_INVALID)
	    {
	        imageWidget.setBitmap(Bitmap(bmpId));
	        imageWidget.invalidate(); // To trigger redraw
	    }
	}
FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
    : FrontendApplicationBase(m, heap)
{
    Bitmap::setCache(touchgfxCache, sizeof(touchgfxCache));
}

 When debugging, I keep getting BITMAP_INVALID? I've made sure I'm in memory mapped mode. 

1 REPLY 1

Dump the memory content at 0x90FC0000 visible to the MCU, perhaps the first 64 or 128 bytes to a serial terminal, so someone can make an assessment as to whether this is consistent with the described bitmap, or NOT

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..