Other Parts Discussed in Thread: TM4C123GH6PM
Hi, i need to sample the ADC in a TM4C123GH6PM, the clock is 80 Mhz. The maximum sampling rate that achievement is 15650 Hz, i can see in the oscilloscope, switching a pin. I using: ROM_ADCHardwareOversampleConfigure(ADC0_BASE, 64); that is correct for 15.6250 kHz, because 1 MHz/64=15625 Hz. But if I use a different multiplier, it does not work the microcontroller, for example: ROM_ADCHardwareOversampleConfigure(ADC0_BASE, 32), not work. Can you helpme, please? I Need sample to maximum speed (1Mhz is great!, but 256 kHz or more is good too, considering that audio cars sampling to 192 khz) for implement a FIR filter. Thanks!
My ISR:
void ADC0IntHandler(void)
{
ROM_GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED);
ROM_ADCIntClear(ADC0_BASE,1);
ROM_ADCSequenceDataGet(ADC0_BASE,1, &adcValue);
ROM_GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, !LED_RED);
}
My ADC Initialization:
void ROM_ADC_Init(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
ROM_ADCHardwareOversampleConfigure(ADC0_BASE, 64); // x2, x8, x16, x32 NOT WORK!
ROM_ADCSequenceDisable(ADC0_BASE,1);
ROM_ADCSequenceConfigure(ADC0_BASE,1, ADC_TRIGGER_ALWAYS,0);
ROM_ADCSequenceStepConfigure(ADC0_BASE,1,0,ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
ROM_ADCSequenceEnable(ADC0_BASE,1);
ADCIntRegister(ADC0_BASE,1,ADC0IntHandler);
ROM_IntEnable(INT_ADC0SS1);
ROM_ADCIntEnable(ADC0_BASE,1);
ROM_ADCIntClear(ADC0_BASE, 1);
}

