2016-02-16 05:58 AM
The MX_FATFS_Init function is beeing called in the main function and again in the default task. After the second call the SD_Path is invalid. I'm using CubeMX 4.13.0 with the STM32F417IGH6, the configuration is in the attachments.
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_SDIO_SD_Init();
MX_FATFS_Init();
...
/* StartDefaultTask function */
void StartDefaultTask(void const * argument)
{
/* init code for FATFS */
MX_FATFS_Init();
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1);
}
/* USER CODE END 5 */
}
#bug #cubemx2016-02-16 09:22 AM
Hi andi475,
I generate a project using the same settings as you (STM32CubeMx 4.13.0, FreeRTOS, SDIO, FATFS) and I don’t have such problem, the FATFS init function in called only one time in the StartDefaultTask.So please try to generate a new project with MX, if the problem still exist, share your *.ioc file for check. -Syrine-2016-02-16 11:32 AM
Hi Syrine,
Thanks for the fast response. I already tried deleting the old files and generating a new project. The ioc file is attached to my first post.2016-02-16 12:19 PM
this is a bug on stm32cube.
sdio_init , fatfs_init , usb_host_init function must be delete from main and call only on default task .2016-02-17 12:47 AM
Hi,
I'll report this issue to our MX team for checking. Sorry for the inconvenience it may bring.-Syrine-2016-03-22 11:20 AM
Dear user,
This is fixed in STM32CubeMX 4.13.1