aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32L1xx/hal_lld.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-04 20:14:01 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-04 20:14:01 +0000
commit05b919403101cc7395776aa24b92369564c91968 (patch)
tree97832a449711617e087d759b9d84bdf49b6a0d74 /os/hal/platforms/STM32L1xx/hal_lld.c
parent9f2e4d3c4c3e58e1b7166265e943af59c111f39a (diff)
parentc506b8f2b1bf2446442040cd3f00f8750754d5aa (diff)
downloadChibiOS-05b919403101cc7395776aa24b92369564c91968.tar.gz
ChibiOS-05b919403101cc7395776aa24b92369564c91968.tar.bz2
ChibiOS-05b919403101cc7395776aa24b92369564c91968.zip
PVD. Merged to trunk. Checked compilability on F1x, L1x, F4x.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3733 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32L1xx/hal_lld.c')
-rw-r--r--os/hal/platforms/STM32L1xx/hal_lld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32L1xx/hal_lld.c b/os/hal/platforms/STM32L1xx/hal_lld.c
index 54d67b9d0..69619dead 100644
--- a/os/hal/platforms/STM32L1xx/hal_lld.c
+++ b/os/hal/platforms/STM32L1xx/hal_lld.c
@@ -74,6 +74,12 @@ void hal_lld_init(void) {
#if defined(STM32_DMA_REQUIRED)
dmaInit();
#endif
+
+ /* Programmable voltage detector enable. */
+#if STM32_PVD_ENABLE
+ rccEnablePWRInterface(FALSE);
+ PWR->CR |= PWR_CR_PVDE | (STM32_PLS & STM32_PLS_MASK);
+#endif /* STM32_PVD_ENABLE */
}
/**