AnsweredAssumed Answered

STM32Cube FatFS FreeRTOS double generated init code

Question asked by Schenkel.Bernd on Mar 17, 2016
Latest reply on Oct 6, 2016 by STM32Cube-T
 I have enabled 3 FATFS: SDRAM, SRAM and SDCard

Bug 1: Using FreeRTOS and FATFS and USB-Desice on stm32F429 double 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.