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.

MSP430F5438A: MSP430F5438A Timer A triggers ADC.

Part Number: MSP430F5438A
Other Parts Discussed in Thread: MSP430F2618

Dear,

I want the ADC to do several measurements where I can configure the measurement period and adc sampling time.

This can be done by setting ADC12SHSx bits and using the ADC in Extended sample mode.

For the MSP430F5438A, it seems that following options only are possible:

ADC12SHSx = {1}: TA0.0

ADC12SHSx = {2}: TB0.0

ADC12SHSx = {3}: TB0.1

Is it correct that it is not possible to use TA0.1 to trigger the ADC ? TA0.0 and TB0.0 are not really useful, because from the 8 timer output modes only mode 1, 4 and 5 are useful.

However it is possible in the MSP430F2618, it has TA.1,TB.0 and TB.1.

It seems to me that the only option is to use TB0.1, is this correct ? I prefer to use timer A for this.

TBxCCRn registers are double-buffered and can be grouped and so I want to use this for sw timers.

Regards,

Marten

  • Hi Marten,

    You are correct that:

    ADC12SHSx = {1}: TA0.0

    ADC12SHSx = {2}: TB0.0

    ADC12SHSx = {3}: TB0.1

    but you may be confusing the meaning of TA0.X and TB0.X. In this notation that X stands for the capture compare register being used. For example, TA0.0 means the output from the Timer A0 CCR0 register and TB0.1 means the output from Timer B0 CCR1 register. So if you choose to set ADC12SHSx to 1, then you need to set the period in the Timer A CCR0 register. Also, you can use any of the 8 output modes with any other CCRx registers by setting the respective OUTMOD bits in their control registers. Hope this clears things up. Let me know if you have any further questions.

    Best regards,
    Caleb Overbay
  • Hi Caleb,

    Thanks for the fast answer. I do understand the short names.
    I am looking for Timer A output 1 to trigger the DMA. Timer A output 0 I cannot use because I want to run the timer in eg output mode 7. This way I can configure the sampling period and exact sampling time (and so the hold time) with this timer.

    I wanted confirmation that this MSP has less capabilities than the MSP430x2xx in respect to the triggering of ADC. Because that one can use Timer A output 1 AND timer B output 1 (and Timer B output 0), while this F5 only has TimerB output 1.

    Regards,
    Marten
  • Hi Marten,

    I'm not sure I understand. If you use Timer A output 0 (CCR0) you can still run the timer in output mode 7 by setting the appropriate OUTMOD bits in the TA0CCTL0 register.

    Best regards,
    Caleb Overbay
  • Hi Caleb,

    I do think there is a big difference between output 0 and output 1..6. Using Timer A in Up mode, I dont think I can make the waveform of output mode 7 on TA0.0 pin, this is only possible on TA0.1 (and TA0.2 and TA0.3 and ....).

    The user guides states: "Output modes 2, 3, 6, and 7 are not useful for output unit 0 because EQUn = EQU0."

    Or is it still possible ?

    Marten

  • Hi Marten,

    I think I understand what you're trying to do now. The quote you've provided from the user's guide is correct. It doesn't make sense to use something like Toggle/Reset where CCR0 defines the timer value when output is both toggled and reset. So if you wanted to use output mode 7 for this scenario you would have to use the Timer B output unit 1 (CCR1) but if you used Timer A output unit 0, you would be restricted to output modes 0, 1, 4, and 5.

    Finally, I wouldn't say that the MSP430F5438A has less capability than the MSP430x2xx family. The timer outputs that can trigger the ADC are specific to devices and not families. Also, you should be able to achieve what you want with Timer B output unit 1 on the MSP430F5438A. If you have any questions or need help setting up Timer B appropriately, I'd be happy to help.

    I apologize for the initial confusion and hope things are cleared up now.

    Best regards,
    Caleb Overbay

  • Caleb,

    I just found out after checking the long errata list of the MSP430F5438A (still for Rev H), that errata nr. TA20 is exactly what I was looking for:

    TA0 output connection to ADC12 is incompatible with previous device families.

    The Timer_A output signal, TA0, is connected to the ADC12.
    To be compatible with previous device families, should be connected to TA1. 

    Marten

**Attention** This is a public forum