Other Parts Discussed in Thread: C2000WARE
I took the code from MWARE on a custom board with F28069M and commented out the motor code, so I can use ADC12 at 15KHz via interrupt which triggers ADC12 capture as per motor demo code.
I was exploring the IDLE, HALT, STANDBY. The HALT and STANDBY code working good. I could not get IDLE to work correctly, I tried disabled interrupt but no success.....have I missed something?
// Demo code include wakeup: C:\ti\c2000\C2000Ware_3_03_00_00\device_support\f2806x\examples\c28\lpm_idlewake
// We only run to measure current.
DINT;
WDOG_disable(uhal->wdogHandle);
WDOG_disableInt(uhal->wdogHandle);
CPU_disableDebugInt(uhal->cpuHandle);
CPU_disableGlobalInts(uhal->cpuHandle);
//uhal->pieHandle->PIEIER_PIEIFR[0].IER &= ~10; // Disable ADC_IntNumber_1HP
ADC_disableInt(uhal->adcHandle,ADC_IntNumber_1);
CPU_disableInt(uhal->cpuHandle,CPU_IntNumber_1);
// PIE_enableAdcInt(obj->pieHandle,ADC_IntNumber_1HP); // enable the PIE interrupts associated with the ADC interrupts
// ADC_enableInt(obj->adcHandle,ADC_IntNumber_1); // enable the ADC interrupts
// CPU_enableInt(obj->cpuHandle,CPU_IntNumber_1); // enable the cpu interrupt for ADC interrupts
EALLOW;
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 1) // Only enter Idle mode when PLL is not in limp mode.
{
SysCtrlRegs.LPMCR0.bit.LPM = 0x0000; // LPM mode = Idle
}
EDIS;
__asm(" IDLE"); // Device waits in IDLE
for(;;) {}