cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube FatFS FreeRTOS double generated init code

bernd2
Associate
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 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.

#!bug #!stm32-!cubemx
1 REPLY 1
stm32cube-t
Senior III
Posted on October 06, 2016 at 17:39

Dear user,

The issue is known and logged against STM32Cube firmware package on ff_gen_drv.c but has not been fixed yet.

Best regards