diff options
| author | Keith Packard <keithp@keithp.com> | 2012-08-27 22:45:47 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-08-28 23:00:22 -0700 | 
| commit | 68df2b1173e82d48f7857ad2e9325e6a9cbbedfd (patch) | |
| tree | 820b21628e06dd0eb6dc6ad3c1f463dcb56119ba | |
| parent | c677f26852b70bcbb303382c306ce06664fde028 (diff) | |
altos: Enable STM SYSCFG when routing EXTI
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>
| -rw-r--r-- | src/stm/stm32l.h | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index 3a498a0a..25f5af07 100644 --- 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) | 
