drivers: timer: SysTick: remove unnecessary masking
Unsupported bits of the Current Value Register are read as zero, so we remove the redundant ANDing with the max supported counter value. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
7dc061871d
commit
35886463dd
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ static u32_t elapsed(void)
|
|||
* VAL was "about to overflow".
|
||||
*/
|
||||
ctrl1 = SysTick->CTRL;
|
||||
val = SysTick->VAL & COUNTER_MAX;
|
||||
val = SysTick->VAL;
|
||||
ctrl2 = SysTick->CTRL;
|
||||
|
||||
overflow_cyc += (ctrl1 & SysTick_CTRL_COUNTFLAG_Msk) ? last_load : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue