Question
White zones on circleProgress
Hello all,
The problem that I’m facing is that two specific zones are showed in white color in my screen. These zones only appear in a circleProgress that is based in an image.
I am using the TouchGFX version 4.26.1, and the MCU is a STM32U575CIUX.
These problem only happens when I save data on the persistent memory of the MCU with this function (source code below):
// Write into flash memory
bool PERSIST_write(RegistroFlash *persist_memory_to_write)
{
uint32_t address = USER_FLASH_START_ADDRESS;
uint8_t *ptr = (uint8_t *)persist_memory_to_write;
FLASH_EraseInitTypeDef erase;
uint32_t pageError;
HAL_StatusTypeDef program_ok_result = HAL_ERROR;
bool function_ok_result = false;
// Unlock the flash memory to write there
HAL_FLASH_Unlock();
// Erase the corresponding flash page (in my case only the last page 255)
// Although we do not use it completely a complete page must be deleted (2 KB)
erase.TypeErase = FLASH_TYPEERASE_PAGES;
erase.Page = (USER_FLASH_START_ADDRESS - FLASH_BASE) / FLASH_PAGE_SIZE;
erase.NbPages = 1;
HAL_FLASHEx_Erase(&erase, &pageError);
// Write the corresponding structure
// The structure RegistroFlash must be multiple of 16 bytes due to the use of FLASH_TYPEPROGRAM_QUADWORD
for (uint32_t i = 0; i < sizeof(RegistroFlash); i += BYTES_PERSIST_BLOCK)
{
program_ok_result = HAL_FLASH_Program(FLASH_TYPEPROGRAM_QUADWORD, address, (uint32_t)(ptr + i));
if (program_ok_result == HAL_OK)
{
address += BYTES_PERSIST_BLOCK;
function_ok_result = true;
}
else
{
function_ok_result = false;
}
}
// Lock the flash memory
HAL_FLASH_Lock();
return (function_ok_result);
}
Much thanks in advance to all.
Any other data that is needed just tell me.
