Api usage in IRAM_ATTR interrupts
Posted: Thu Feb 07, 2019 1:22 am
In one of the timer examples, the following is mentioned before an ISR definition:
* Note:
* We don't call the timer API here because they are not declared with IRAM_ATTR.
* If we're okay with the timer irq not being serviced while SPI flash cache is disabled,
* we can allocate this interrupt without the ESP_INTR_FLAG_IRAM flag and use the normal API.
*/
void IRAM_ATTR timer_group0_isr(void *para)
1) Does this mean that any ESP APIs that are not declared with IRAM_ATTR should never be used inside such ISRs? For e.g even many basic APIs such as esp_get_level, esp_set_level do not use the IRAM_ATTR attribute.
2) Same question for usage of user defined functions within these ISRs?
* Note:
* We don't call the timer API here because they are not declared with IRAM_ATTR.
* If we're okay with the timer irq not being serviced while SPI flash cache is disabled,
* we can allocate this interrupt without the ESP_INTR_FLAG_IRAM flag and use the normal API.
*/
void IRAM_ATTR timer_group0_isr(void *para)
1) Does this mean that any ESP APIs that are not declared with IRAM_ATTR should never be used inside such ISRs? For e.g even many basic APIs such as esp_get_level, esp_set_level do not use the IRAM_ATTR attribute.
2) Same question for usage of user defined functions within these ISRs?