Firmware crashes with dynamicBitmap in TouchGFX
I'm using TouchGFX's dynamicBitmaps to load an image that I have in a buffer.
The problem is that, even just using the example I found at this link https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/dynamic-bitmaps:
BitmapId bmpId;
//Create dynamic bitmap
const int width = 32;
const int height = 24;
bmpId = Bitmap::dynamicBitmapCreate(32, 24, Bitmap::RGB565);
//set all pixels white
if (bmpId != BITMAP_INVALID)
{
memset(Bitmap::dynamicBitmapGetAddress(bmpId), 0xFF, width*height*2);
}
//Make Image widget show the dynamic bitmap
image.setBitmap(Bitmap(bmpId));
//Position image and add to View
image.setXY(20, 20);
container1.add(image);
and I set up the cache in the constructor of view as follows:
.
.
.
uint32_t bitmapCache[32 * 24 * 3];
.
.
.
Bitmap::setCache((uint16_t*)bitmapCache, sizeof(bitmapCache), 1);
.
.
.As soon as the container where I add the dynamicBitmap appears (in this case I do it in the setupScreen function and assign the image to a container that is in a swipe container) the firmware crashes at the code point shown in the image below:

What could be the problem?
I hope I was clear.
Regards
