You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/09/21 12:42:09 UTC

[GitHub] [incubator-nuttx] saramonteiro opened a new pull request #4585: xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.

saramonteiro opened a new pull request #4585:
URL: https://github.com/apache/incubator-nuttx/pull/4585


   ## Summary
   
   Espressif newer chips come with systimer peripheral which is suitable for OS tick generation and timekeeping.
   RT timer is a component that allow multiple clients (like drivers) to set timeout alarms and keep tracking of the time.
   Like Wi-Fi driver.
   This MR adds support for RT timer relying on systimer.
   
   P.S: Note that on ESP32-C3, one systimer comparator is used for OS tick generation and the other for rt timer, but on ESP32-S2, systimer is exclusively used for rt timer and it's not used for OS tick generation. Instead, internal xtensa timers are used for this purpose. The reason is that on ESP32-S2, systimer has only edge interrupt and the processor has a small amount of edge interrupts available, therefore, we manage better our resources using this approach. 
   
   ## Impact
   N/A
   
   ## Test
   
   Internal rt timer test on GL. 


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei merged pull request #4585: xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.

Posted by GitBox <gi...@apache.org>.
gustavonihei merged pull request #4585:
URL: https://github.com/apache/incubator-nuttx/pull/4585


   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on a change in pull request #4585: xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #4585:
URL: https://github.com/apache/incubator-nuttx/pull/4585#discussion_r714238108



##########
File path: boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_bringup.c
##########
@@ -154,6 +158,15 @@ int esp32s2_bringup(void)
 
 #endif /* CONFIG_TIMER */
 
+#ifdef CONFIG_ESP32S2_RT_TIMER
+  ret = esp32s2_rt_timer_init();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize RT timer: %d\n", ret);
+      return ret;

Review comment:
       Done




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4585: xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4585:
URL: https://github.com/apache/incubator-nuttx/pull/4585#discussion_r714199524



##########
File path: boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_bringup.c
##########
@@ -154,6 +158,15 @@ int esp32s2_bringup(void)
 
 #endif /* CONFIG_TIMER */
 
+#ifdef CONFIG_ESP32S2_RT_TIMER
+  ret = esp32s2_rt_timer_init();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize RT timer: %d\n", ret);
+      return ret;

Review comment:
       ```suggestion
   ```
   Even if the RT Timer initialization fails, the bringup function should not return early.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on pull request #4585: xtensa/esp32-s2: Adds support to rt_timer and systimer to ESP32-S2.

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on pull request #4585:
URL: https://github.com/apache/incubator-nuttx/pull/4585#issuecomment-924433163


   FYI: Ready for review.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org