This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR5959:ADC 由计时器触发的序列转换

Guru**** 2381590 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1120872/msp430fr5959-sequence-conversion-with-adc-triggered-by-timer

器件型号:MSP430FR5959

大家好、我想询问 A0到 A2。 转换应该由一个定时器启动。 我使用了以下初始化:

  ADC12CTL0 = ADC12SHT0_0 | ADC12ON;// | ADC12MSC;
  ADC12CTL1 = ADC12SHS_1 | ADC12CONSEQ_1;
  ADC12CTL2 |= ADC12RES_2;
  ADC12IER0 |= ADC12IE2;
  ADC12MCTL0 |= ADC12INCH_0 | ADC12VRSEL_0;
  ADC12MCTL1 |= ADC12INCH_1 | ADC12VRSEL_0;
  ADC12MCTL2 |= ADC12INCH_2 | ADC12VRSEL_0 | ADC12EOS;
  ADC12CTL0 |= ADC12ENC | ADC12SC;         // Sampling and conversion start

  TA0CCR0 = 2048-1;                         // PWM Period
  TA0CCTL1 = OUTMOD_3;                      // TACCR1 set/reset
  TA0CCR1 = 2047;                           // TACCR1 PWM Duty Cycle
  TA0CTL = TASSEL__ACLK | MC__UP;           // ACLK, up mode
  __bis_SR_register(LPM3_bits + GIE);      // LPM0, ADC10_ISR will force exit

但遗憾的是、仅执行第一个转换。 清除 ADC 中断例程中的中断标志。 如果未完成此操作、ADC 会持续转换、而不会由计时器重新触发。 有人可以在那里提供帮助吗?

此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    ADC12CONSEQ_3解决了这个问题。