aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2015-08-04 13:30:01 +0300
committerbarthess <barthess@yandex.ru>2015-08-04 13:30:01 +0300
commite7a3df6c18173ad12750faa56cb8a8f6c68874cb (patch)
treef3bcdf0ff5bca120e42cd9f534a5d1d5518eb88a /os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c
parent8c8c0a0be4dc937c36bac5c5f29a1974e5a1e0ec (diff)
downloadChibiOS-Contrib-e7a3df6c18173ad12750faa56cb8a8f6c68874cb.tar.gz
ChibiOS-Contrib-e7a3df6c18173ad12750faa56cb8a8f6c68874cb.tar.bz2
ChibiOS-Contrib-e7a3df6c18173ad12750faa56cb8a8f6c68874cb.zip
Improved FSMC.
SRAM configuration is much more flexible now.
Diffstat (limited to 'os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c')
-rw-r--r--os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram.c5
1 files changed, 3 insertions, 2 deletions
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;
}
}