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: ADC doubts for different PWM frequency trigger SOC

Part Number: TMS320F28374S

Hi,

Few doubts about ADC and APWM.

1) For a specific ADC module, when is the right point to read the result registers? ADC ISR is not used, as application request. Customer want to use PWM to trigger the SOC with 8KHz, and read the result registers with 5KHz frequency. There's a possibility, during reading, the conversion is in progress. Will bad values be read?

2) For a specific ADC module, 6 input channels. 3 channels are used with 8KHz SOC from PWM, can other 3 be used with 5KHz SOC from software trigger? No ADC ISR is needed.

3) APWM, is there any way to trigger ADC SOC? APWM can be sync with PWM, and PWM can trigger ADC SOC. Beside it, any other ways? Can Timer be used to sync with APWM and PWM?

Thanks a lot.

Br, Jordan

  • Hello,

    A subject-matter expert reply your question. However, we have been dealing with inclement weather and power outages in the area and responses may not come until next week.

  • Jordan Zhou said:
    1) For a specific ADC module, when is the right point to read the result registers?

    The result can be read as soon as the conversion value is latched into the result register.

    There are tables in the datasheet and TRM that describe the number of cycles required to sample, convert, and latch a result:

    Jordan Zhou said:
    There's a possibility, during reading, the conversion is in progress. Will bad values be read?

    Result values remain in the register until they are replaced by a newer conversion result.  If the result register is read during a conversion, the register will return the most recently completed conversion result.

    Jordan Zhou said:
    2) For a specific ADC module, 6 input channels. 3 channels are used with 8KHz SOC from PWM, can other 3 be used with 5KHz SOC from software trigger?

    The SOCs are configured independently of each other, which allows the system to use multiple triggering schemes such as what you describe.

    Jordan Zhou said:
    3) APWM, is there any way to trigger ADC SOC? APWM can be sync with PWM, and PWM can trigger ADC SOC. Beside it, any other ways? Can Timer be used to sync with APWM and PWM?

    You could potentially generate the external (GPIO) trigger using the APWM XBAR output back to the GPIO XBAR input.  Are all of the EPWMs used?  The easiest method would be to use a spare EPWM.  There is no direct means to synchronize the CPU TIMER with EPWM and APWM.

  • Thanks a lot.

    Br, Jordan