Re:Help with ADC configuring
I have this problem when I run my code in the board, console says this:
Note: automatically using hardware breakpoints for read-only addresses. main () at ../src/main.c:23 23 SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC); Can't send signals to this remote system. SIGSTOP not sent.
and here is the code I'm trying to debug, it's almost the same as the ADC configuring application note, I just want to configure it correctly.
#include "hw_memmap.h" #include "hw_types.h" #include "adc.h" #include "sysctl.h" #include "debug.h" #include "hw_sysctl.h" #include "debug.h"
#ifdef DEBUG void __error__(char *pcFilename, unsigned long ulLine) { } #endif
int main (void){ //unsigned long SYSCTL_SET0_ADCSPEED_500KSPS; //checar esto, tengo DUDAS CON LA VELOCIDAD unsigned long ulSeq1DataBuffer; unsigned long ulSeq3DataBuffer; // // Enable the clock to the ADC module // SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC);
// // Configure the ADC to sample at 500KSps // //SysCtlADCSpeedSet(SYSCTL_SET0_ADCSPEED_500KSPS);
SysCtlADCSpeedSet(SYSCTL_ADCSPEED_500KSPS);
// // Disable sample sequences 1 and 3 // ADCSequenceDisable(ADC_BASE, 1); ADCSequenceDisable(ADC_BASE, 3);
// // Configure sample sequence 1: timer trigger, priority = 1 // ADCSequenceConfigure(ADC_BASE, 1, ADC_TRIGGER_TIMER, 1); // // Configure sample sequence 3: processor trigger, priority = 0 // ADCSequenceConfigure(ADC_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
// // Configure sample sequence 3 steps 0, 1 and 2 // ADCSequenceStepConfigure(ADC_BASE, 1, 0, ADC_CTL_CH0); ADCSequenceStepConfigure(ADC_BASE, 1, 1, ADC_CTL_CH1); ADCSequenceStepConfigure(ADC_BASE, 1, 2, ADC_CTL_CH2 | ADC_CTL_IE | ADC_CTL_END); // // Configure sample sequence 3 step 0 // ADCSequenceStepConfigure(ADC_BASE, 3, 0, ADC_CTL_TS | ADC_CTL_END);
// // Enable the interrupt for sample sequence 1 // ADCIntEnable(ADC_BASE, 1);
// // Retrieve data from sample sequence 1 FIFO // ADCSequenceDataGet(ADC_BASE, 1, &ulSeq1DataBuffer); //ADCSequenceDataGet(ADC_BASE, 1, &ulSeq1DataBuffer); // // Retrieve data from sample sequence 3 FIFO // //ADCSequenceDataGet(ADC_BASE, 1, &ulValue); ADCSequenceDataGet(ADC_BASE, 3, &ulSeq3DataBuffer);
//DiagExit(0);
}
Please, help me, thanks in advance.
Post edited by: JorgeOrlando, at: 2008/11/06 18:05
login or register to reply
|