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 2022/02/18 10:04:34 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #5542: xtensa: esp32 : setup software interrupt for esp32chips

Ouss4 commented on a change in pull request #5542:
URL: https://github.com/apache/incubator-nuttx/pull/5542#discussion_r809852139



##########
File path: arch/xtensa/src/esp32/esp32_irq.c
##########
@@ -496,6 +499,14 @@ void up_irqinitialize(void)
 
   up_irq_enable();
 #endif
+
+  /* Attach the timer interrupt */

Review comment:
       ```suggestion
     /* Attach the software interrupt */
   ```

##########
File path: arch/xtensa/src/esp32/esp32_cpustart.c
##########
@@ -193,6 +193,14 @@ void xtensa_appcpu_start(void)
 
   xtensa_attach_fromcpu0_interrupt();
 
+  /* Attach the timer interrupt */
+
+  irq_attach(XTENSA_IRQ_SWINT, (xcpt_t)xtensa_swint, NULL);
+
+  /* Enable the timer 0 CPU interrupt. */

Review comment:
       ```suggestion
     /* Enable the software interrupt. */
   ```

##########
File path: arch/xtensa/src/esp32/esp32_irq.c
##########
@@ -496,6 +499,14 @@ void up_irqinitialize(void)
 
   up_irq_enable();
 #endif
+
+  /* Attach the timer interrupt */
+
+  irq_attach(XTENSA_IRQ_SWINT, (xcpt_t)xtensa_swint, NULL);
+
+  /* Enable the timer 0 CPU interrupt. */

Review comment:
       ```suggestion
     /* Enable the software CPU interrupt. */
   ```

##########
File path: arch/xtensa/src/esp32/esp32_irq.c
##########
@@ -584,8 +595,8 @@ void up_enable_irq(int irq)
 
   if (irq < XTENSA_NIRQ_INTERNAL)
     {
-      /* Enable the CPU interrupt now for internal CPU. */
 
+      /* Enable the CPU interrupt now for internal CPU. */

Review comment:
       Please revert this small part (it just removes a new line, also if you rebase I think this will conflict since my PR is now merged.)

##########
File path: arch/xtensa/src/esp32/esp32_cpustart.c
##########
@@ -193,6 +193,14 @@ void xtensa_appcpu_start(void)
 
   xtensa_attach_fromcpu0_interrupt();
 
+  /* Attach the timer interrupt */
+
+  irq_attach(XTENSA_IRQ_SWINT, (xcpt_t)xtensa_swint, NULL);

Review comment:
       Do we need to attach it a second time?
   I believe since the IRQ number is the same attaching it only once is enough.

##########
File path: arch/xtensa/src/esp32/esp32_cpustart.c
##########
@@ -193,6 +193,14 @@ void xtensa_appcpu_start(void)
 
   xtensa_attach_fromcpu0_interrupt();
 
+  /* Attach the timer interrupt */

Review comment:
       ```suggestion
     /* Attach the software interrupt */
   ```




-- 
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