From c506b8f2b1bf2446442040cd3f00f8750754d5aa Mon Sep 17 00:00:00 2001 From: barthess Date: Wed, 4 Jan 2012 20:03:49 +0000 Subject: PVD. Checked compilability on F1x, L1x, F4x. Testhal fro F1x git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/pvd2_dev@3732 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32L1xx/hal_lld.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'os/hal/platforms/STM32L1xx/hal_lld.c') 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 */ } /** -- cgit v1.2.3