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.

HTU and ADC first questions

Other Parts Discussed in Thread: HALCOGEN

Hi,

I'm starting developing an ADC application with TMDX570LS31HDK involving a multiple complex square wave emission to syncronize my external source.

Based on my limited knowledge I believe that HTU should be the right peripheral to use (the other should be NHET, right?).


The HTU should allow to:

- cyclically emit wave trains, prepared in advance, to feed my external source sensor

- simultaneously using one of them to trigger my ADC


Is that right? Could HTU do this?

Can I route one HTU square wave to trigger ADC? How?


On HalCoGen I've not found any HTU setting or documentation. The only document I have is the Tecnical Guide of The TMS570.

Where can I found some coding or HalCoGen example to setup and run HTU to generate square waves?


The use of HTU DMA, right? Do this generate some conflict with the use of DMA to transfer ADC data in system memory?


Thank you,

Matteo

  • Matteo,

    NHET is the timer you should use. HTU is a local DMA moving data between CPU RAM and NHET RAM. Its operation does not conflict with other bus masters (CPU and DMA).

    Thanks and regards,

    Zhaohong

  • So what HTU is supposed to be used for?

    Perhaps is a "internal device" not supposed to be used directly?

  • So HTU is supposed to be used only to transfer counters value

    What about the ADC triggering?

    My digital pattern is constant through cycles of a single run but is NOT constant from an execution to another. It is someway similar to a serial signal. I cannot see a practical way to achieve this with the small instruction set of the NHET, mainly because the pattern cannot be programmed and compiled on code generation but requires to be modified runtime.

    Which is the bes way to achieve this?

  • Matteo,

    if you can share details about how do you expect ADC to work at system level, we may be able to come up with something to help.

    Thanks and regards,

    Zhaohong

  • Hi Zhaohong,

    thank you for the answer.

    I need to generate a sqare wave pattern. That pattern is generated to feed an external source. One of the square wave must be used to trigger the TMS570 ADC too.

    During the acquisition one of the waves is someway similar to a serial signal, so its up/down state represents a sequence of digital value required to setup the external source. This signal does not changes along the multiple cycles of the same run but is required to change between different run (that's why I think is a difficoult task for NHET). The change in that path is drive via external (IP) command received in the idel time, so is not required to be fast o syncronized with ADC, I don't think that should involves HTU.

    On a PC system this can be done (actually IS done) using a DSP board wich:

    a) is feed by a finite RAM buffer FIFO populated "offline" by the CPU code

    b) every sample in the FIFO represents the state of a group of DO pins (tipically grouped in 8 or 16 bit - pins)

    c) when started it cycles trought the FIFO at a given frequency reporting on the DO pins the values in the FIFO so generating the square wave pattern

    I'm investigating if a similar work can be obtained by a TMS570, with the NHET or whatever device.

    For example: could the NHET code (or some other device) be used to read a memory value to replicate it in the DO pins?

    As far as I know the GIO is software driven, so could have problems to run at a given precise frequency unless there's a DMA or similar device wich can drive it.

    I hope everything is clear (my english is not good as it should)

    Ciao e grazie,

    Matteo

  • Matteo,

    (1) You can use the EMIF module to read the FIFO.

    (2) You can dynamically change the frequency and duty cycle of the PWM from NHET.

    Thanks and regards,

    Zhaohong