关于cc1310通过修改adcbuf例程实现多通道采样的问题

目的是实现7个通道采样,但是第一次循环的时候就卡在了下面代码中最后一个while(1)的地方,请问有人清楚是什么原因吗?

   ADCBuf_Params_init(&adcBufParams);
       adcBufParams.callbackFxn = adcBufCallback;
       adcBufParams.recurrenceMode = ADCBuf_RECURRENCE_MODE_CONTINUOUS;
       adcBufParams.returnMode = ADCBuf_RETURN_MODE_CALLBACK;
       adcBufParams.samplingFrequency =20 ;

for(q=0;q<7;q++)
         {
             /* Create a UART with data processing off. */
  //               uart = UART_open(Board_UART0, &uartParams);
                 adcBuf = ADCBuf_open(Board_ADCBUF0, &adcBufParams);
         /* Configure the conversion struct */
         continuousConversion[q].arg = NULL;
         continuousConversion[q].adcChannel = q;
         continuousConversion[q].sampleBuffer = sampleBufferOne;
         continuousConversion[q].sampleBufferTwo = sampleBufferTwo;
         continuousConversion[q].samplesRequestedCount = ADCBUFFERSIZE;
         if (adcBuf == NULL){
             /* ADCBuf failed to open. */
             while(1);  
         /* Start converting. */
         }
         if (ADCBuf_convert(adcBuf, &continuousConversion[q], 7) !=
             ADCBuf_STATUS_SUCCESS) {
             /* Did not start conversion process correctly.*/
             while(1);
         }

1 个回复