cancel
Showing results for 
Search instead for 
Did you mean: 

std periph lib: FMC BusTurnAround is not configured for Write timing in Extended mode

nicolas239955_stm1
Associate
Posted on October 09, 2015 at 11:25

* 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

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-fsmc
2 REPLIES 2
Posted on October 15, 2015 at 17:39

Hi cnicnac,

Thank you for your feedback, the issue is reported to development team.

-Shahrzad-

Posted on October 22, 2015 at 11:00

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

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));''