Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG
Hi Team,
I'm trying to modify adc12_triggered_by_timer_event example to run continuously and I need help with the sysconfig modifications.
Modfications made thus far to sysconfig:
1) TIMER -> Basic Configuration -> Timer Mode: Periodic Down Counting
2) TIMER -> Interrupt Configuration -> Enable Interrupts: Zero Event
main.c:
#include "ti_msp_dl_config.h"
volatile bool gCheckADC;
volatile uint16_t gADCResult[4];
volatile uint16_t gCount;
int main(void)
{
SYSCFG_DL_init();
NVIC_EnableIRQ(ADC12_0_INST_INT_IRQN);
NVIC_EnableIRQ(TIMER_0_INST_INT_IRQN);
gCheckADC = false;
DL_TimerG_startCounter(TIMER_0_INST);
while (1) {
__WFE();
}
}
void ADC12_0_INST_IRQHandler(void)
{
switch (DL_ADC12_getPendingInterrupt(ADC12_0_INST)) {
case DL_ADC12_IIDX_MEM3_RESULT_LOADED:
gCheckADC = true;
gADCResult[0] = DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_0);
gADCResult[1] = DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_1);
gADCResult[2] = DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_2);
gADCResult[3] = DL_ADC12_getMemResult(ADC12_0_INST, DL_ADC12_MEM_IDX_3);
break;
default:
break;
}
}
void TIMER_0_INST_IRQHandler(void){
switch (DL_TimerG_getPendingInterrupt(TIMER_0_INST)) {
case DL_TIMER_IIDX_ZERO:
gCount++;
break;
default:
break;
}
}
When running the code, I can see gCount in the expressions tab, but gADCresult does not update and the code never reenters the ISR after the initial conversion.

Is there another setting I need to enable to have every zero event trigger an ADC SOC?
