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.

TMS320F28374S: Trigger single ADC sample captures & delay

Part Number: TMS320F28374S
Other Parts Discussed in Thread: LAUNCHXL-F28379D

Hello

I would like to trigger a single ADC sample capture on every rising edge of a "trigger" signal. I can guarantee that the trigger to trigger spacing will be greater than 1us. Can this be done with the TMS320F28374S ADC peripheral.

For the ADC running in 16-bit conversion mode, what is the delay from the GPIO XINT2 / ADCINT1 / ADCINT2 pin to the time the ADC sample is taken. Is this different in the 12-bit conversion mode?

Thanks.

  • Hi Majid,

    Yes, this is possible to do. You have several options you can chhose to accomplish this task:

    - Use of the CPU timer interrupts to trigger ADC conversion. By configuring the CPU timer, you have more control of the trigger spacing as timers will run off the SYSCLK.
    - Use of the EPWM SOC triggers. Each EPWM haw two SOC edges that you can use. Like the timer, the EPWM is clocked by SYSCLK so you can pretty much control the EPWM period and the occurrence of the SOC edges.
    - Use of an external trigger pulse (e.g. GPIO) to trigger the conversion.

    You can choose the trigger sources by programming the correct value of TRIGSEL in the specific ADCSOCxCTL register. If you choose the first two options (CPU Timer Interrupt or EPWM trigger), you do not have to worry about the latency of the interrupt or trigger signals that would start the conversion as these usually occur within the next CPU clock cycle when the interrupt/trigger signal is generated. With the external GPIO option, latency/delay is between 25ns to 70ns depending on how many cycles you configure to qualify the triggering GPIO signal.

    If you do not need to sync the conversions with an external event (GPIO toggles), you should use either the CPU Timer interrupt of EPWM as these will provide more granularity/control of trigger event.

    Regards,
    Joseph
  • Hi Joseph

    Thanks for the information. I need to trigger the ADC sample capture from an external event. Looks like I can expect ~25-70ns delay from the trigger rising edge to the actual ADC sampling, correct?

    Is there a preference to use one of these pins GPIO XINT2 / ADCINT1 / ADCINT2 for the trigger?

    Could you provide some clarification on this part (a section in the datasheet that describes this) "...depending on how many cycles you configure to qualify the triggering GPIO signal".

    Is there a TMS320F28374S EVM that will allow me to supply a 10MHz reference. In that case I might be able to keep things synchronized.

    Thanks.
  • Hi Majid,

    If you want to use an external trigger, specifically from external pulses into the device pins through GPIO, you need to configure this pin through the GPIO cross bar (see chapter 8 in the SPRUHM8G Technical Reference Manual). You would want to use INPUT 5 so that the GPIO pulse will be configured as the external SOC signal.

    If you will be using a GPIO, the input signal will be qualified for several SYSCLK cycles. This qualification scheme of the GPIO input is a feature which is like a digital filter. You can configure the qualification to check if the input pulse is still valid over a pre programmed number of SYSCLK cycles (this is discussed somewhere in chapter 7 GPIO of the TRM - can be configured with registers GPACTRL and GPAQSELx registers). This is where the 25-70ns is coming from.

    You should be able to configure your EVM to supply the TMS320F28374S clock with a 10Mhz clock (XTAL, resonator or any other clock source). Which board are you using specifically?

    Best regards,
    Joseph
  • Thanks for the additional information. I am using the LAUNCHXL-F28379D: C2000 Delfino MCUs F28379D LaunchPad Development Kit.
  • Hi Majid,

    The F28379D Launchpad already has a 10Mhz XTAL connected to X1/X2.  Unfortunately there are no provisions of connecting to different clock source through header pins/jumpers.

    Best regards,

    Joseph

  • Can you recommend a board for me to use then. Thanks
  • Hi Majid,

    Unfortunately, even the control cards have the XTAL directly soldered to the board with connections to X1/X2. You may have to desolder the XTAL from your board to have an access to X1/X2 or custom build your own board.

    Best regards,
    Joseph