aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F7xx
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-07-07 08:24:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-07-07 08:24:50 +0000
commit8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a (patch)
treea3bedabfa260b3d3522ddf6f6daff3465bdec762 /os/hal/ports/STM32/STM32F7xx
parent18f021db303aa9b1d70c4efa1aaa53699118e577 (diff)
downloadChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.tar.gz
ChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.tar.bz2
ChibiOS-8a0cfa1ce2cfb15d6bd1bc7492beb86c55656d0a.zip
Fixed bug #953.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12131 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32/STM32F7xx')
-rw-r--r--os/hal/ports/STM32/STM32F7xx/stm32_rcc.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/os/hal/ports/STM32/STM32F7xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F7xx/stm32_rcc.h
index 6b110b146..68fc7f18b 100644
--- a/os/hal/ports/STM32/STM32F7xx/stm32_rcc.h
+++ b/os/hal/ports/STM32/STM32F7xx/stm32_rcc.h
@@ -64,6 +64,7 @@
RCC->APB1LPENR |= (mask); \
else \
RCC->APB1LPENR &= ~(mask); \
+ (void)RCC->APB1LPENR; \
}
/**
@@ -75,6 +76,8 @@
*/
#define rccDisableAPB1(mask) { \
RCC->APB1ENR &= ~(mask); \
+ RCC->APB1LPENR &= ~(mask); \
+ (void)RCC->APB1LPENR; \
}
/**
@@ -86,7 +89,8 @@
*/
#define rccResetAPB1(mask) { \
RCC->APB1RSTR |= (mask); \
- RCC->APB1RSTR = 0; \
+ RCC->APB1RSTR &= ~(mask); \
+ (void)RCC->APB1RSTR; \
}
/**
@@ -103,6 +107,7 @@
RCC->APB2LPENR |= (mask); \
else \
RCC->APB2LPENR &= ~(mask); \
+ (void)RCC->APB2LPENR; \
}
/**
@@ -114,6 +119,8 @@
*/
#define rccDisableAPB2(mask) { \
RCC->APB2ENR &= ~(mask); \
+ RCC->APB2LPENR &= ~(mask); \
+ (void)RCC->APB2LPENR; \
}
/**
@@ -125,7 +132,8 @@
*/
#define rccResetAPB2(mask) { \
RCC->APB2RSTR |= (mask); \
- RCC->APB2RSTR = 0; \
+ RCC->APB2RSTR &= ~(mask); \
+ (void)RCC->APB2RSTR; \
}
/**
@@ -142,6 +150,7 @@
RCC->AHB1LPENR |= (mask); \
else \
RCC->AHB1LPENR &= ~(mask); \
+ (void)RCC->AHB1LPENR; \
}
/**
@@ -153,6 +162,8 @@
*/
#define rccDisableAHB1(mask) { \
RCC->AHB1ENR &= ~(mask); \
+ RCC->AHB1LPENR &= ~(mask); \
+ (void)RCC->AHB1LPENR; \
}
/**
@@ -164,7 +175,8 @@
*/
#define rccResetAHB1(mask) { \
RCC->AHB1RSTR |= (mask); \
- RCC->AHB1RSTR = 0; \
+ RCC->AHB1RSTR &= ~(mask); \
+ (void)RCC->AHB1RSTR; \
}
/**
@@ -181,6 +193,7 @@
RCC->AHB2LPENR |= (mask); \
else \
RCC->AHB2LPENR &= ~(mask); \
+ (void)RCC->AHB2LPENR; \
}
/**
@@ -192,6 +205,8 @@
*/
#define rccDisableAHB2(mask) { \
RCC->AHB2ENR &= ~(mask); \
+ RCC->AHB2LPENR &= ~(mask); \
+ (void)RCC->AHB2LPENR; \
}
/**
@@ -203,7 +218,8 @@
*/
#define rccResetAHB2(mask) { \
RCC->AHB2RSTR |= (mask); \
- RCC->AHB2RSTR = 0; \
+ RCC->AHB2RSTR &= ~(mask); \
+ (void)RCC->AHB2RSTR; \
}
/**
@@ -220,6 +236,7 @@
RCC->AHB3LPENR |= (mask); \
else \
RCC->AHB3LPENR &= ~(mask); \
+ (void)RCC->AHB3LPENR; \
}
/**
@@ -231,6 +248,8 @@
*/
#define rccDisableAHB3(mask) { \
RCC->AHB3ENR &= ~(mask); \
+ RCC->AHB3LPENR &= ~(mask); \
+ (void)RCC->AHB3LPENR; \
}
/**
@@ -242,7 +261,8 @@
*/
#define rccResetAHB3(mask) { \
RCC->AHB3RSTR |= (mask); \
- RCC->AHB3RSTR = 0; \
+ RCC->AHB3RSTR &= ~(mask); \
+ (void)RCC->AHB3RSTR; \
}
/** @} */