tmedicci commented on code in PR #10854: URL: https://github.com/apache/nuttx/pull/10854#discussion_r1346291532
########## arch/xtensa/src/esp32s3/esp32s3_irq.h: ########## @@ -132,6 +134,126 @@ void esp32s3_teardown_irq(int cpu, int periphid, int cpuint); int esp32s3_getirq(int cpu, int cpuint); +/**************************************************************************** + * Name: esp32s3_getcpuint_from_irq + * + * Description: + * This function returns the CPU interrupt associated with an IRQ + * + * Input Parameters: + * irq - The IRQ associated with a CPU interrupt + * cpu - Pointer to store the CPU core of the CPU interrupt + * + * Returned Value: + * The CPU interrupt associated with such IRQ or IRQ_UNMAPPED if + * CPU interrupt is not mapped to an IRQ. + * + ****************************************************************************/ + +int esp32s3_getcpuint_from_irq(int irq, int *cpu); + +/**************************************************************************** + * Name: esp32s3_irq_noniram_disable + * + * Description: + * Disable interrupts that aren't specifically marked as running from IRAM + * + * Input Parameters: + * None + * + * Input Parameters: + * None + * + ****************************************************************************/ + +void esp32s3_irq_noniram_disable(void); + +/**************************************************************************** + * Name: esp32s3_irq_noniram_enable + * + * Description: + * Re-enable interrupts disabled by esp32s3_irq_noniram_disable + * + * Input Parameters: + * None + * + * Input Parameters: + * None + * + ****************************************************************************/ + +void esp32s3_irq_noniram_enable(void); + +/**************************************************************************** + * Name: esp32s3_irq_noniram_status + * + * Description: + * Get the current status of non-IRAM interrupts on a specific CPU core + * + * Input Parameters: + * cpu - The CPU to check the non-IRAM interrupts state + * + * Returned Value: + * true if non-IRAM interrupts are enabled, false otherwise. + * + ****************************************************************************/ + +bool esp32s3_irq_noniram_status(int cpu); + +/**************************************************************************** + * Name: esp32s3_irq_set_iram_isr + * + * Description: + * Set the ISR associated to an IRQ as a IRAM-enabled ISR. + * + * Input Parameters: + * irq - The associated IRQ to set + * + * Returned Value: + * OK on success; A negated errno value on failure. + * + ****************************************************************************/ + +int esp32s3_irq_set_iram_isr(int irq); + +/**************************************************************************** + * Name: esp32s3_irq_unset_iram_isr + * + * Description: + * Set the ISR associated to an IRQ as a non-IRAM ISR. + * + * Input Parameters: + * irq - The associated IRQ to set + * + * Returned Value: + * OK on success; A negated errno value on failure. + * + ****************************************************************************/ + +int esp32s3_irq_unset_iram_isr(int irq); + +#ifdef CONFIG_ESP32S3_IRAM_ISR_DEBUG + +/**************************************************************************** + * Name: esp32s3_get_iram_interrupt_records + * + * Description: + * This function copies the vector that keeps track of the IRQs that ran + * when non-IRAM interrupts were disabled. + * + * Input Parameters: + * + * irq_count - A previously allocated pointer to store the counter of the + * interrupts that ran when non-IRAM interrupts were disabled. + * + * Returned Value: + * None + * + ****************************************************************************/ + +void esp32s3_get_iram_interrupt_records(uint64_t *irq_count); Review Comment: It's an interface for testing purposes. Currently, it's being used internally, but the idea is to provide CI testing with it when we have real hardware testing available for the ESP32 family. -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org