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.

TMS320F28075: ADC software trigger

Part Number: TMS320F28075
Other Parts Discussed in Thread: CONTROLSUITE

Hi,

Suppose I am using ADC with software triggering to measure the value, Should I be waiting for a minimum of 10.5 CLK cycles before reading the value from the respective register? That is because ADC core requires 10.5 clk cycles for conversion. 

Also, How many clk cycles corresponds to one NOP instruction? ( I read it as 1 clk cycle).

Some one please confirm me.

Thanks.

  • Hi Sagar,

    Assuming the ADC is idle and you only trigger 1 conversion, you will need to wait 2 cycles + S+H duration + ADC conversion duration. the S+H duration is ACQPS + 1 SYSCLK cycles. The ADC conversion duration is roughly 10.5 ADCCLKs, but the number will always be some integer number of SYSCLKs. You can determine the exact timings by looking at the table and diagrams for ADC timings, which are duplicated in both the datasheet and the TRM.

    Yes, 1 NOP is 1 SYSCLK cycle (but it may take more time to execute depending on the pipeline). You can use asm(" RPT#N || NOP"); to execute N NOPs where N <= 255. Note, however, that interrupts will be locked out during the entire repeat instruction.

    A much better way to determine if the ADC conversion is complete is to set the SOC in question to trigger an ADC INT flag. If you set the ADC in 'late interrupt mode' the flag will get set at the same time the conversion is ready, so you can spin-wait on the flag.

    There are several ADC examples in ControlSUITE that should help you out.
  • Thanks for the reply.
    Yes, I am looking at the ADC software Trigger example.