小弟看了例程实在是不知道怎么编 顺便问一嘴例程的while函数里面的 PCM_gotoLPM0();函数是直接实现ad转换的输出了么 我只需要加入时钟电路还有控制ad转换,再加入采样频率就能实现多次采样了么
gaoyang9992006:
你是开发联网的应用吗?如果不是,只是作为单片机使用,看看
MSP432Ware这个
去TI官网下载
gaoyang9992006:
/* Going to sleep */while (1){PCM_gotoLPM0();}
没看到上面注释吗,这个是进入睡眠的函数,不是直接输出ADC的。
你看的这个例子是ADC中断 ,ADC转化后触发中断,在中断里读出来结果。
/* This interrupt happens whenever a conversion has been completed and placed* into ADC_MEM0. */
void ADC14_IRQHandler(void)
{uint64_t status;
status = ADC14_getEnabledInterruptStatus();ADC14_clearInterruptFlag(status);
if(status & ADC_INT0){adcResult = ADC14_getResult(ADC_MEM0);}}
Susan Yang:
关于PCM_gotoLPM0();您可以看一下
dev.ti.com/…/group__pcm__api.html
Transitions the device into LPM0. 使设备进入LPM0状态
Refer to the device specific data sheet for specifics about low power modes.
Returns
false if sleep state cannot be entered, true otherwise.例程的话,都是有详细的注释的,您现在是想实现哪种采样呢?
TI中文支持网
