diff options
| author | Keith Packard <keithp@keithp.com> | 2012-03-18 22:10:02 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-03-28 21:37:03 -0700 | 
| commit | ab6ea9043b592c25948a70b6204d613756a9a250 (patch) | |
| tree | 4b80aae20861b4128b0bf6da410ae7fd35f65650 /src/stm/ao_timer.c | |
| parent | 0cc01d378ae96325e429ad608b953661582939b0 (diff) | |
Basic OS running on STM32L
This gets stm-demo working
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_timer.c')
| -rw-r--r-- | src/stm/ao_timer.c | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c index 76304f0e..387df184 100644 --- a/src/stm/ao_timer.c +++ b/src/stm/ao_timer.c @@ -48,13 +48,16 @@ ao_debug_out(char c);  void stm_tim6_isr(void)  { -	++ao_tick_count; +	if (stm_tim6.sr & (1 << STM_TIM67_SR_UIF)) { +		stm_tim6.sr = 0; +		++ao_tick_count;  #if HAS_ADC -	if (++ao_adc_count == ao_adc_interval) { -		ao_adc_count = 0; -		ao_adc_poll(); -	} +		if (++ao_adc_count == ao_adc_interval) { +			ao_adc_count = 0; +			ao_adc_poll(); +		}  #endif +	}  }  #if HAS_ADC  | 
