File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
hal/targets/cmsis/TARGET_STM/TARGET_STM32F1 Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,9 @@ void set_compare(uint16_t count);
43
43
extern volatile uint32_t SlaveCounter ;
44
44
extern volatile uint32_t oc_int_part ;
45
45
extern volatile uint16_t oc_rem_part ;
46
- extern volatile uint16_t cnt_val ;
47
46
48
47
void timer_irq_handler (void ) {
49
- cnt_val = TIM_MST -> CNT ;
48
+ uint16_t cval = TIM_MST -> CNT ;
50
49
51
50
TimMasterHandle .Instance = TIM_MST ;
52
51
@@ -65,7 +64,7 @@ void timer_irq_handler(void) {
65
64
} else {
66
65
if (oc_int_part > 0 ) {
67
66
set_compare (0xFFFF );
68
- oc_rem_part = cnt_val ; // To finish the counter loop the next time
67
+ oc_rem_part = cval ; // To finish the counter loop the next time
69
68
oc_int_part -- ;
70
69
} else {
71
70
us_ticker_irq_handler ();
Original file line number Diff line number Diff line change @@ -43,9 +43,10 @@ void set_compare(uint16_t count);
43
43
extern volatile uint32_t SlaveCounter ;
44
44
extern volatile uint32_t oc_int_part ;
45
45
extern volatile uint16_t oc_rem_part ;
46
+ extern volatile uint16_t cnt_val ;
46
47
47
48
void timer_irq_handler (void ) {
48
- uint16_t cval = TIM_MST -> CNT ;
49
+ cnt_val = TIM_MST -> CNT ;
49
50
50
51
TimMasterHandle .Instance = TIM_MST ;
51
52
@@ -64,7 +65,7 @@ void timer_irq_handler(void) {
64
65
} else {
65
66
if (oc_int_part > 0 ) {
66
67
set_compare (0xFFFF );
67
- oc_rem_part = cval ; // To finish the counter loop the next time
68
+ oc_rem_part = cnt_val ; // To finish the counter loop the next time
68
69
oc_int_part -- ;
69
70
} else {
70
71
us_ticker_irq_handler ();
You can’t perform that action at this time.
0 commit comments