cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in stm32f10x_fsmc.c ?!

daviddavid91
Associate II
Posted on January 21, 2009 at 06:30

Bug in stm32f10x_fsmc.c ?!

1 REPLY 1
daviddavid91
Associate II
Posted on May 17, 2011 at 13:00

Hello MCD Application Team,

when initializing a memory struct of the type FSMC_NORSRAMInitTypeDef, I found out that two pointers to timing structures are not initialized, only their members. This will probably crash the application!

FSMC_NORSRAMInitStruct->FSMC_WriteTimingStruct

FSMC_NORSRAMInitStruct->FSMC_ReadWriteTimingStruct

Is this already known?!

The workaround would like this:

FSMC_NORSRAMInitTypeDef SRAMInit;

FSMC_NORSRAMTimingInitTypeDef RWTimingInit;

FSMC_NORSRAMTimingInitTypeDef WrTimingInit;

SRAMInit.FSMC_ReadWriteTimingStruct = &RWTimingInit;

SRAMInit.FSMC_WriteTimingStruct = &WrTimingInit;

FSMC_NORSRAMStructInit(&SRAMInit);

Or do not use this function at all and set directly the members to the intended value without default initialization before.

How can the correction look like? Passing the timing-pointers to the initialization function?

Best regards,

Michael