saramonteiro commented on a change in pull request #4543:
URL: https://github.com/apache/incubator-nuttx/pull/4543#discussion_r708456272



##########
File path: arch/xtensa/src/esp32/esp32_rt_timer.c
##########
@@ -631,15 +646,17 @@ uint64_t IRAM_ATTR rt_timer_get_alarm(void)
 void IRAM_ATTR rt_timer_calibration(uint64_t time_us)
 {
   uint64_t counter;
-  struct esp32_tim_dev_s *tim = s_esp32_tim_dev;
+  struct esp32_rt_priv_s *priv = &g_rt_priv;
   irqstate_t flags;
 
-  flags = enter_critical_section();
-  ESP32_TIM_GETCTR(tim, &counter);
+  flags = spin_lock_irqsave(&priv->lock);
+

Review comment:
       ```suggestion
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to