Skip to content

Commit ff1c172

Browse files
committed
Revert "[NUCLEO_F070RB] 16-bit timer register update"
This reverts commit 82d82d0.
1 parent 3222d07 commit ff1c172

File tree

1 file changed

+2
-3
lines changed
  • hal/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB

1 file changed

+2
-3
lines changed

hal/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/hal_tick.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ void set_compare(uint16_t count);
4343
extern volatile uint32_t SlaveCounter;
4444
extern volatile uint32_t oc_int_part;
4545
extern volatile uint16_t oc_rem_part;
46-
extern volatile uint16_t cnt_val;
4746

4847
// Used to increment the slave counter
4948
void timer_update_irq_handler(void)
@@ -60,7 +59,7 @@ void timer_update_irq_handler(void)
6059
// Used for mbed timeout (channel 1) and HAL tick (channel 2)
6160
void timer_oc_irq_handler(void)
6261
{
63-
cnt_val = TIM_MST->CNT;
62+
uint16_t cval = TIM_MST->CNT;
6463
TimMasterHandle.Instance = TIM_MST;
6564

6665
// Channel 1 for mbed timeout
@@ -72,7 +71,7 @@ void timer_oc_irq_handler(void)
7271
} else {
7372
if (oc_int_part > 0) {
7473
set_compare(0xFFFF);
75-
oc_rem_part = cnt_val; // To finish the counter loop the next time
74+
oc_rem_part = cval; // To finish the counter loop the next time
7675
oc_int_part--;
7776
} else {
7877
us_ticker_irq_handler();

0 commit comments

Comments
 (0)