主题中讨论的其他器件:C2000WARE
我从具有 F28069M 的定制板上的 MWare 中获取了代码、并注释了电机代码、因此我可以通过中断以15KHz 使用 ADC12、从而根据电机演示代码触发 ADC12捕获。
我正在探索空闲、停止、待机。 HALT 和 STANDBY 代码正常运行。 我无法空闲正常工作,我尝试禁用中断,但没有成功..... 我错过了什么吗?
// 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(;;) {}