就是软件触发一直没法进入中断, 但是相同的 程序我换TM4C123G就能触发,, 到底有什么问题呢。。。
/*
* main.c
*/
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <driverlib/gpio.h>
#include <inc/hw_gpio.h>
#include <driverlib/sysctl.h>
#include <inc/hw_sysctl.h>
#include <inc/hw_memmap.h>
#include <driverlib/adc.h>
#include <inc/hw_adc.h>
#include <inc/hw_ints.h>
#include <driverlib/interrupt.h>
uint32_t ADC_DATA[8];
void ADC0_Hanlder(void)
{
ADCIntClear(ADC0_BASE,3);
//do something
SysCtlDelay(20);
}
void InitADC0(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
ADCClockConfigSet(ADC1_BASE,ADC_CLOCK_SRC_PLL|ADC_CLOCK_RATE_FULL,24);
ADCSequenceConfigure(ADC1_BASE,3,ADC_TRIGGER_PROCESSOR,0);
ADCSequenceStepConfigure(ADC1_BASE,3,0,ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
ADCSequenceEnable(ADC1_BASE,3);
// IntRegister(INT_ADC1SS3,ADC0_Hanlder);
ADCIntEnable(ADC1_BASE,3);
IntEnable(INT_ADC1SS3);
IntMasterEnable();
ADCIntEnable(ADC1_BASE,3);
}
int main(void)
{
SysCtlClockFreqSet(SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_CFG_VCO_480,40000000);
InitADC0();
while(1)
{
ADCProcessorTrigger(ADC1_BASE,3);
SysCtlDelay(500000);
// ADCSequenceDataGet(ADC1_BASE,3,ADC_DATA);
}
}