voidADCC_ConfigSOC(void){/***ADC_A6***/// pin9, sw1, ADC_A2ADC_setupSOC(ADCA_BASE,ADC_SOC_NUMBER0,ADC_TRIGGER_EPWM1_SOCA,ADC_CH_ADCIN2,HAL_ADC_SAMPLE_WINDOW);// pin6, sw2, ADC_A6ADC_setupSOC(ADCA_BASE,ADC_SOC_NUMBER1,ADC_TRIGGER_EPWM1_SOCA,ADC_CH_ADCIN6,HAL_ADC_SAMPLE_...
ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA, ADC_CH_ADCIN14, 10U); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER1, ADC_TRIGGER_EPWM1_SOCA, ADC_CH_ADCIN0, 10U); ADC_setupSOC(ADCC_BASE, ADC_SOC_NUMBER2, ADC_TRIGGER_EPWM1_SOCA, ADC_CH_ADCIN1, 10U); ...
ADC_setupSOC(ADCB_BASE, ADC_SOC_NUMBER4, ADC_TRIGGER_EPWM1_SOCA, ADC_CH_ADCIN4, 8); // Set SOC0 to set the interrupt 1 flag. Enable the interrupt and make // sure its flag is cleared. ADC_setInterruptSource(ADCA_BASE, ADC_INT_NUMBER1, ADC_SOC_NUMBER...
,ADC_SocNumber_0,ADC_SocTrigSrc_EPWM4_ADCSOCB); 1、采用PWM触发ADC采样,但是并没有成功触发,配置如上代码,哪里出了问题?2、28027手册中并没有高速时钟的设置介绍,是否28027不使用外部高速时钟?而库里面配置PWM时基时钟时却用到了高速时钟? adaliu0012018-09-13 09:47:27 ...
,ADC_SocNumber_0,ADC_SocTrigSrc_EPWM4_ADCSOCB); 1、采用PWM触发ADC 采样,但是并没有成功触发,配置如上代码,哪里出了问题?2、28027手册中并没有高速时钟的设置介绍,是否28027不使用外部高速时钟?而库里面配置PWM时基时钟时却用到了高速时钟? adaliu001 2018-09-13 09:47:27 请问...
// AdcRegs.ADCSOC1CTL.bit.TRIGSEL = 5; //set SOC1 start trigger on EPWM1A errata workaround ADC_setSocTrigSrc(myAdc, ADC_SocNumber_1, ADC_SocTrigSrc_EPWM1_ADCSOCA); // AdcRegs.ADCSOC0CTL.bit.ACQPS = 6; //set SOC0 S/H Window to 7 ADC Clock Cycl...
(ADCA_BASE,ADC_INT_NUMBER1,ADC_SOC_NUMBER3); // ADC_enableInterrupt(ADCA_BASE,ADC_INT_NUMBER1); Interrupt_enable(INT_ADCA1); Interrupt_register(INT_ADCA1, &adcaInterrupt_1); Interrupt_enableInCPU(INTERRUPT_CPU_INT1); ADC_enableConverter(ADCA_BASE);...
所以需要对示例进行稍微修改,主要是对读取函数,只设置 ADC1_CHANNEL_0 ,如下图: 在主函数中只调用 continuous_read(NULL); 函数,测试结果如下: 1.2 单次采样 单次采样比较简单,也是直接在上面的样例中修改,下面直接上修改后的测试代码: static void single_read(void *arg) ...
(data->type2.channel >= SOC_ADC_CHANNEL_NUM(unit)) return false;// return true;// }// static void continuous_read(void *arg)// {// esp_err_t ret;// uint32_t ret_num = 0;// uint8_t result[TIMES] = {0};// memset(result, 0xcc, TIMES);// float vout;// // uint16_...
#define ADC_ATTEN_0db ADC_ATTEN_DB_0 #define ADC_ATTEN_2_5db ADC_ATTEN_DB_2_5 #define ADC_ATTEN_6db ADC_ATTEN_DB_6 #define ADC_ATTEN_11db ADC_ATTEN_DB_11 /** * The default (max) bit width of the ADC of current version. You can also get the maximum bitwidth * by `SOC_AD...