2015-10-09 02:25 AM
* Description of the bug:
In file stm32f4xx_fmc.c (v1.5.1) (same bug in file stm32f4xx_fsmc.c), fonction FMC_NORSRAMInit():
Write timing configuration ,from line 243 to 264, doesn't take into account the BusTurnAroundDuration field of the WriteTimingStruct. Bits BUSTURN of FMC_BWTRx register are set to ''0000'' during the configuration. Therefore, the delay after a write operation is only 1 HCLK period.
Moreover, CLKDIV is not used i
n
FMC_BWTRx register.
* Workaround:
1/ replace line 257:
''((FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_CLKDivision) << 20) |''
by
''(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_BusTurnAroundDuration << 16) |''
2/ replace line 249:
''assert_param(IS_FMC_CLK_DIV(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_CLKDivision));''
by
''assert_param(IS_FMC_TURNAROUND_TIME(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_BusTurnAroundDuration));''
#stm32-fmc-fsmc2015-10-15 08:39 AM
Hi cnicnac,
Thank you for your feedback, the issue is reported to development team. -Shahrzad-2015-10-22 02:00 AM
Hi,
The fix will be implemented in F4 StdLib V1.6.1 that will be soon released on ST web . -Shahrzad-* Description of the bug:
In file stm32f4xx_fmc.c (v1.5.1) (same bug in file stm32f4xx_fsmc.c), fonction FMC_NORSRAMInit():
Write timing configuration ,from line 243 to 264, doesn't take into account the BusTurnAroundDuration field of the WriteTimingStruct. Bits BUSTURN of FMC_BWTRx register are set to ''0000'' during the configuration. Therefore, the delay after a write operation is only 1 HCLK period.
Moreover, CLKDIV is not used i
n
FMC_BWTRx register.
* Workaround:
1/ replace line 257:
''((FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_CLKDivision) << 20) |''
by
''(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_BusTurnAroundDuration << 16) |''
2/ replace line 249:
''assert_param(IS_FMC_CLK_DIV(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_CLKDivision));''
by
''assert_param(IS_FMC_TURNAROUND_TIME(FMC_NORSRAMInitStruct->FMC_WriteTimingStruct->FMC_BusTurnAroundDuration));''