Creating interrupt to a specific core
Posted: Sun Apr 29, 2018 3:49 am
Hi all,
I'm trying to discover if there is a way to pin an interrupt to a specific core, but I'm not finding much information about that. Say I have this timer interrupt configured:
Is there a way to attach it to core 1 or core 0? If not, how may I know on which CPU this interrupt will execute?
I'm trying to discover if there is a way to pin an interrupt to a specific core, but I'm not finding much information about that. Say I have this timer interrupt configured:
Code: Select all
static void initTimerGroup0(int timer_idx, bool auto_reload, double timer_interval_sec)
{
timer_config_t config;
config.divider = TIMER_DIVIDER;
config.counter_dir = TIMER_COUNT_UP;
config.counter_en = TIMER_PAUSE;
config.alarm_en = TIMER_ALARM_EN;
config.intr_type = TIMER_INTR_LEVEL;
config.auto_reload = auto_reload;
timer_init(TIMER_GROUP_0, timer_idx, &config);
timer_set_counter_value(TIMER_GROUP_0, timer_idx, 0x00000000ULL);
timer_set_alarm_value(TIMER_GROUP_0, timer_idx, timer_interval_sec*TIMER_SCALE);
timer_enable_intr(TIMER_GROUP_0, timer_idx);
timer_isr_register(TIMER_GROUP_0, timer_idx, adcGetRaw, (void *)timer_idx, ESP_INTR_FLAG_IRAM, NULL);
timer_start(TIMER_GROUP_0, timer_idx);
}