TI中文支持网
TI专业的中文技术问题搜集分享网站

ADCSequenceConfigure(,,,)函数理解

ADCSequenceConfigure(ADC0_BASE,3, ADC_TRIGGER_PROCESSOR, 0);

其中的3指的是采样序列,那它就是图片所示的PE0嘛?有什么区别啊,搞不懂

Maka Luo:

//*****************************************************************************////! Configures the trigger source and priority of a sample sequence.//!//! \param ui32Base is the base address of the ADC module.//! \param ui32SequenceNum is the sample sequence number.//! \param ui32Trigger is the trigger source that initiates the sample//! sequence; must be one of the \b ADC_TRIGGER_* values.//! \param ui32Priority is the relative priority of the sample sequence with//! respect to the other sample sequences.//!//! This function configures the initiation criteria for a sample sequence.//! Valid sample sequencers range from zero to three; sequencer zero captures//! up to eight samples, sequencers one and two capture up to four samples,//! and sequencer three captures a single sample. The trigger condition and//! priority (with respect to other sample sequencer execution) are set.//!//! The \e ui32Trigger parameter can take on the following values://!//! – \b ADC_TRIGGER_PROCESSOR – A trigger generated by the processor, via the//! ADCProcessorTrigger() function.//! – \b ADC_TRIGGER_COMP0 – A trigger generated by the first analog//! comparator; configured with ComparatorConfigure().//! – \b ADC_TRIGGER_COMP1 – A trigger generated by the second analog//! comparator; configured with ComparatorConfigure().//! – \b ADC_TRIGGER_COMP2 – A trigger generated by the third analog//! comparator; configured with ComparatorConfigure().//! – \b ADC_TRIGGER_EXTERNAL – A trigger generated by an input from the Port//! B4 pin. Note that some microcontrollers can//! select from any GPIO using the//! GPIOADCTriggerEnable() function.//! – \b ADC_TRIGGER_TIMER – A trigger generated by a timer; configured with//! TimerControlTrigger().//! – \b ADC_TRIGGER_PWM0 – A trigger generated by the first PWM generator;//! configured with PWMGenIntTrigEnable().//! – \b ADC_TRIGGER_PWM1 – A trigger generated by the second PWM generator;//! configured with PWMGenIntTrigEnable().//! – \b ADC_TRIGGER_PWM2 – A trigger generated by the third PWM generator;//! configured with PWMGenIntTrigEnable().//! – \b ADC_TRIGGER_PWM3 – A trigger generated by the fourth PWM generator;//! configured with PWMGenIntTrigEnable().//! – \b ADC_TRIGGER_ALWAYS – A trigger that is always asserted, causing the//! sample sequence to capture repeatedly (so long as//! there is not a higher priority source active).//!//! When \b ADC_TRIGGER_PWM0, \b ADC_TRIGGER_PWM1, \b ADC_TRIGGER_PWM2 or//! \b ADC_TRIGGER_PWM3 is specified, one of the following should be ORed into//! \e ui32Trigger to select the PWM module from which the triggers will be//! routed for this sequence://!//! – \b ADC_TRIGGER_PWM_MOD0 – Selects PWM module 0 as the source of the//! PWM0 to PWM3 triggers for this sequence.//! – \b ADC_TRIGGER_PWM_MOD1 – Selects PWM module 1 as the source of the//! PWM0 to PWM3 triggers for this sequence.//!//! Note that not all trigger sources are available on all Tiva family//! members; consult the data sheet for the device in question to determine the//! availability of triggers.//!//! The \e ui32Priority parameter is a value between 0 and 3, where 0//! represents the highest priority and 3 the lowest. Note that when//! programming the priority among a set of sample sequences, each must have//! unique priority; it is up to the caller to guarantee the uniqueness of the//! priorities.//!//! \return None.////*****************************************************************************

3是系列采样的通道数,PE3这个GPIO端口号。详细见驱动库中函数说明。

xyz549040622:

不一样的,采样通道,采样序列,以及ADC0/1,这是不一样的。

赞(0)
未经允许不得转载:TI中文支持网 » ADCSequenceConfigure(,,,)函数理解
分享到: 更多 (0)