Question
STM32Cube FatFS FreeRTOS double generated init code
Posted on March 17, 2016 at 15:55
STM32Cube_FW_F4_V1.11.0
I have enabled 3 FATFS: SDRAM, SRAM and SDCard Bug 1: Using FreeRTOS and FATFS and USB-Desice on stm32F429double
generates MX_FATFS_Init(); MX_USB_DEVICE_Init(); in ''main()'' and in Task ''void StartDefaultTask(void const * argument)'' - one time would be enough ==> 2 calls of MX_FATFS_Init() ==> 6 calls of ''FATFS_LinkDriverEx()'' in ''ff_gen_drv.c'' Bug2: Array check in FATFS_LinkDriverEx in ''ff_gen_drv.c'': the array[_VOLUMES] index test in Line 55 is if(disk.nbr <= _VOLUMES) correct is if(disk.nbr < _VOLUMES) Result: Access behind the Array is made --> System overrides nextVariables and crashes some times later. #!bug #!stm32-!cubemx