mirror of
https://github.com/apache/nuttx.git
synced 2026-08-28 12:50:36 +00:00
arch/arm: read STM32L4_GTIM_CNT_OFFSET should use same lock
Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
parent
c6126bcdc4
commit
c94a99326e
1 changed files with 2 additions and 2 deletions
|
|
@ -1086,10 +1086,10 @@ static int stm32l4_reset(struct qe_lowerhalf_s *lower)
|
|||
* Interrupts are disabled to make this atomic (if possible)
|
||||
*/
|
||||
|
||||
flags = enter_critical_section();
|
||||
flags = spin_lock_irqsave(&priv->lock);
|
||||
stm32l4_putreg32(priv, STM32L4_GTIM_CNT_OFFSET, 0);
|
||||
priv->position = 0;
|
||||
leave_critical_section(flags);
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
#else
|
||||
sninfo("Resetting position to zero\n");
|
||||
DEBUGASSERT(lower && priv->inuse);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue