Hi,
I'm implementing a simple function with 16 channel ADC triggered by RTI.
Inside HalCoGen I've enabled RTI (comp0 every 1s), ADC1 and ADC interrupt.
My app should simply acquire 16 pins every RTI comp0 (1Hz) and after this call an interrupt funtion to retrive the values.
Mi main contains this setup:
adcInit();
adcREG1->GxINTENA[0] |= 1U<<3;
adcStartConversion(adcREG1,0);
rtiInit();
rtiREG1-> SETINTENA = (0x01U << 0);
rtiREG1->INTCLRENABLE &= 0xfffffff0;
rtiREG1->COMP0CLR = 5000U; // TODO: verify why the value doesn't care
rtiStartCounter(rtiCOUNTER_BLOCK0);
the RTI->COMP0CLR instruction is required (if I commented it out the ADC IRQ is never called) but the assigned value seems not used. With this setup my intrrupt function is called every 1s even if I change the RTI->COMP0CLR value.
Why?
Thank you