2021-05-19 12:12 PM
I checked sd card contents and it got the required files with right permissions and formatting. I tried debugging and kStorage_OpenFileDrawPixel() used for checking the file and printing on LCD returns kstorage_ERROR_OPEN. This is demo project with nothing changed and sdcard contents were not modified. Any suggestions on this issue
void kDemo_Initialization(void)
{
uint32_t pXSize;
/* Initialize the SD */
BSP_SD_Init(SD_INSTANCE);
/* Initialize the LCD */
BSP_LCD_Init(LCD_INSTANCE, LCD_ORIENTATION_LANDSCAPE);
UTIL_LCD_SetFuncDriver(&LCD_Driver); /* SetFunc before setting device */
UTIL_LCD_SetDevice(0); /* SetDevice after funcDriver is set */
UTIL_LCD_Clear(UTIL_LCD_COLOR_WHITE);
/* Check if we return from standby */
if((PwrSBFlag & PWR_SR1_SBF) != 0x00u)
{
kWindow_Popup("Low Power", UTIL_LCD_COLOR_WHITE, UTIL_LCD_COLOR_ST_BLUE,\
"\nExit from Standby\n", UTIL_LCD_COLOR_ST_BLUE, UTIL_LCD_COLOR_WHITE );
/* Let time user to see information */
HAL_Delay(2000);
}
/* Check the SD presence else wait until SD insertion */
if(BSP_SD_IsDetected(SD_INSTANCE) != BSP_ERROR_NONE)
{
kWindow_Error("sd not present\n...\nwait sd insertion\n");
while(BSP_SD_IsDetected(SD_INSTANCE) != BSP_ERROR_NONE);
BSP_SD_Init(SD_INSTANCE);
}
/* FatFs initialisation */
if(kStorage_Init() != KSTORAGE_NOERROR)
{
kWindow_Error("FatFs initialization failed\nplease check the SD card\n");
Error_Handler();
}
if(RccBootFlags != 0)
{
/* Display the demonstration window */
UTIL_LCD_SetFont(&LCD_DEFAULT_FONT);
UTIL_LCD_Clear(UTIL_LCD_COLOR_WHITE);
UTIL_LCD_SetBackColor(UTIL_LCD_COLOR_ST_PINK);
UTIL_LCD_SetTextColor(UTIL_LCD_COLOR_ST_PINK);
BSP_LCD_GetXSize(LCD_INSTANCE, &pXSize);
UTIL_LCD_FillRect(0, 0, pXSize, LCD_DEFAULT_FONT.Height*2, UTIL_LCD_COLOR_ST_PINK);
UTIL_LCD_SetTextColor(UTIL_LCD_COLOR_WHITE);
UTIL_LCD_DisplayStringAt( 0, 0, (uint8_t *)EVAL_BOARD, CENTER_MODE);
UTIL_LCD_DisplayStringAt( 0, LCD_DEFAULT_FONT.Height , (uint8_t *)"DEMONSTRATION", CENTER_MODE);
kStorage_OpenFileDrawPixel(((LCD_DEFAULT_FONT.Height*2) + 1), ((pXSize - 170) / 2), (uint8_t *)"STFILES/STLogo.bmp");
/* Let time user to see information */
HAL_Delay(2000);
}
/* Module Initialization */
kModule_Init();
/* control the resources */
if(kModule_CheckRessource() != KMODULE_OK)
{
kWindow_Error("resource file\nmissing\nplease update\nsd card contents\n");
while(1);
}
}
void kModule_Init(void)
{
kModule_Add(MODULE_MAIN_APP , ModuleAppMain);
kModule_Add(MODULE_TSENSOR , ModuleTsensor);
kModule_Add(MODULE_VIEWBMP , ModuleImageBrowser);
kModule_Add(MODULE_FILESBRO , ModuleFilesBrowser);
kModule_Add(MODULE_LOWPOWER , ModuleLowPower);
kModule_Add(MODULE_AUDIO , ModuleAudio);
kModule_Add(MODULE_CALENDAR , ModuleCalendar);
kModule_Add(MODULE_WHITELED , ModuleWhiteLed);
kModule_Add(MODULE_MATH , ModuleMath);
kModule_Add(MODULE_UCPD , ModuleUcpd);
}
Solved! Go to Solution.
2021-05-27 07:44 AM
Hello @Rrn.3 and welcome to the STM32 Community :)
If the microSD™ card does not contain appropriate icons and pictures for the demonstration, this error content "Error Popup resource file missing please update sd card content" is displayed on the LDC screen.
You will find the errors cases in this UM2583 STM32CubeG4 STM32G474E-EVAL demonstration firmware, and this will help you on your project.
Hope this helps you !
Please keep me updated about your progress on this issue.
When your question is answered, please close this post by choosing "Select as Best". This will help other users find that answer quicker.
Imen
2021-05-27 07:44 AM
Hello @Rrn.3 and welcome to the STM32 Community :)
If the microSD™ card does not contain appropriate icons and pictures for the demonstration, this error content "Error Popup resource file missing please update sd card content" is displayed on the LDC screen.
You will find the errors cases in this UM2583 STM32CubeG4 STM32G474E-EVAL demonstration firmware, and this will help you on your project.
Hope this helps you !
Please keep me updated about your progress on this issue.
When your question is answered, please close this post by choosing "Select as Best". This will help other users find that answer quicker.
Imen
2021-06-09 03:35 AM
Hi @Rrn.3
Please let me know if your issue is solved or if you still need help.
When your question is answered, please close this topic by choosing "Select as Best".
Imen