Part Number: DK-TM4C129X
Tool/software: TI-RTOS
Use the touch example .
void
TouchScreenInit(uint32_t ui32SysClock)
it function work well.
but i'm not want ADC_TRIGGER use timer. i want gpio.
so, make new function
yb_TouchScreenInit
{
g_ui32TSState = TS_STATE_INIT;
//
// There is no touch screen handler initially.
//
g_pfnTSHandler = 0;
//
// Enable the peripherals used by the touch screen interface.
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5);
//TRIGGER_EXTERNAL Pin configuration
ROM_GPIOADCTriggerEnable(GPIO_PORTB_BASE,GPIO_PIN_7);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE,GPIO_PIN_7);
//
// Configure the ADC sample sequence used to read the touch screen reading.
//
ROM_ADCHardwareOversampleConfigure(ADC0_BASE, 4);
ROM_ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_EXTERNAL, 0);
ROM_ADCSequenceStepConfigure(ADC0_BASE, 3, 0,
TS_YP_ADC | ADC_CTL_END | ADC_CTL_IE);
ROM_ADCSequenceEnable(ADC0_BASE, 3);
//
// Enable the ADC sample sequence interrupt.
//
ROM_ADCIntEnable(ADC0_BASE, 3);
ROM_IntEnable(INT_ADC0SS3);
}
I think PB7 toggle then ADC trigger.
( ROM_GPIOPinWrite(GPIO_PORTB_BASE,GPIO_PIN_7,GPIO_PIN_7); ROM_GPIOPinWrite(GPIO_PORTB_BASE,GPIO_PIN_7,0);
but write PB7, die program.
i have question.
1. ROM_GPIOADCTriggerEnable don't use ROM_GPIOPinTypeGPIOOutput?
2. i'm not have equipment for change pb7 voltage value.
So how do i use the ADC_TRIGGER_EXTERNAL?
please help me.
thank you