From e7a3df6c18173ad12750faa56cb8a8f6c68874cb Mon Sep 17 00:00:00 2001 From: barthess Date: Tue, 4 Aug 2015 13:30:01 +0300 Subject: Improved FSMC. SRAM configuration is much more flexible now. --- os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c') diff --git a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c index 22ec255..114f9bc 100644 --- a/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c +++ b/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c @@ -128,8 +128,9 @@ void fsmcSramStart(SRAMDriver *sramp, const SRAMConfig *cfgp) { "invalid state"); if (sramp->state == SRAM_STOP) { - sramp->sram->BCR = FSMC_BCR_WREN | FSMC_BCR_MBKEN | FSMC_BCR_MWID_0; - sramp->sram->BTR = cfgp->btr; + sramp->sram->BCR = cfgp->bcr | FSMC_BCR_MBKEN; + sramp->sram->BTR = cfgp->btr; + sramp->sram->BWTR = cfgp->bwtr; sramp->state = SRAM_READY; } } -- cgit v1.2.3