projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c677f26
)
altos: Enable STM SYSCFG when routing EXTI
author
Keith Packard
<keithp@keithp.com>
Tue, 28 Aug 2012 05:45:47 +0000
(22:45 -0700)
committer
Keith Packard
<keithp@keithp.com>
Wed, 29 Aug 2012 06:00:22 +0000
(23:00 -0700)
The EXTI routing information is in the syscfg unit, so that needs to
be powered up or writes to its registers will be lost.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/stm32l.h
patch
|
blob
|
history
diff --git
a/src/stm/stm32l.h
b/src/stm/stm32l.h
index 3a498a0a06043febab4b3bca22e38e5dc041e019..25f5af073d76659b3ec7cba65252d6f19b8161fc 100644
(file)
--- a/
src/stm/stm32l.h
+++ b/
src/stm/stm32l.h
@@
-905,6
+905,9
@@
stm_exticr_set(struct stm_gpio *gpio, int pin) {
uint8_t shift = (pin & 3) << 2;
uint8_t val = 0;
+ /* Enable SYSCFG */
+ stm_rcc.apb2enr |= (1 << STM_RCC_APB2ENR_SYSCFGEN);
+
if (gpio == &stm_gpioa)
val = STM_SYSCFG_EXTICR_PA;
else if (gpio == &stm_gpiob)