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.

Compiler/TMS320F28069M: ADC Trigger Select, Interrupt select and EOC

Part Number: TMS320F28069M


Tool/software: TI C/C++ Compiler

I need to sample ADCA0 - A7 and ADCB0 on the same trigger. I'm using ePWM1 to trigger the conversion. Do I need to set the trigger select for each individual channel to be ePWM1? Also on p.512 Table 8-18 of the TRM, the TRIGSEL for ADCSOB using ePWM1 is ADCTRIG6 whereas ADCSOCA is ADCTRIG5. Since ADCB0 is part of SOCB, I need to set that to ADCTRIG6?

Thanks

  • bass2,

    Yes, you will need to configure the TRIGSEL for each SOC that you want to enable. There is no direct relationship between the A/B enumeration of the ADC channels and the A/B enumeration of the ePWM signal paths. You can trigger both ADC-A and ADC-B channels using ePWM SOCA.

    -Tommy
  • Okay, well something strange is happening:

    If I configure the ADC channels this way, there's no problem.

    // Trigger ADCs on ePWM1-ADCSOCA, ACQPS = 6, and .CHSEL 0-8 set to 0 - 8 respectively.

    But when I try to associate different SOCxCTL.bit.CHSEL with various ADCIN channels, the following cause the ADCINT1 interrupt routine to go into the default ISR defined in the default_ISR header file, not the local interrupt i remapped the function to (the configuration above doesn't have that problem).

    Oddly enough, these channels (below) work, but adding in any of the commented out code (above), causes the the interrupt to go into ADCINT1_ISR() default routine.

    Not sure what could be causing this.  Thanks!

  • bass2,

    I don't see anything obvious in the code that you pasted. I suspect that the problem is elsewhere. Be careful of ADC register fields that may be configured in other functions like AdcOffsetSelfCal() and AdcConversion().

    -Tommy
  • I redid the configuration bit by bit and the set the the whole bit field at once. I must have had an error somewhere because the interrupt is firing as expected now.