Thank you, Delta_G.
If I understood correctly, the code segment in my case should look like this:
#include "IRQManager.h"
GenericIrqCfg_t cfg;
cfg.irq = FSP_INVALID_VECTOR;
cfg.ipl = 12;
cfg.event = ELC_EVENT_ACMPLP0_INT;
IRQManager::getInstance().addGenericInterrupt(cfg, CompInterrupt);
where CompInterrupt() - interrupt handler from the comparator.
Of course, interrupts are configured and were processed correctly in the "old" version.
But in this case, when the comparator is triggered, the program "freezes", and I can’t find the reason yet. It's still a bit complicated for me. For example, the definition ELC_EVENT_ACMPLP0_INT taken by me from the file elc_defines.h, however, it is a very strange file containing lines like:
#define ELC_EVENT_ICU_IRQ0 ELC_EVENT_ICU_IRQ0
How to understand such a declaration of “oneself”? This completely confuses me.
Also, I don't quite understand the meaning of assigning cfg.irq = FSP_INVALID_VECTOR; You've probably already answered this question, but if possible, please explain it again.