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.

Ice, Ecat application and ADC

Hello,

I am using an ICE board with full ethercat application: Ecat_appl.

The Ethercat configuration is in distributed clock mode with subordinated cycles:

- the master generates an SM2 event with 500us of periodicity.

- the slave Pru generates a tick with 62.5us of periodicity (sync0), I use it to control a control the position and current  of the brushless motor.It's OK...

My question: Is it possible to program the ADC register to force the measure of the the values according to  the Sync0 interrupt.

Later, for example, to be sure that IU and IV (coil currents) are synchronised with the 62.5us tick ?

  • Hi,

    Technically this is possible as pr1_host_intr0 which is used as SYNC0 interrupt to A8 is also routed to ADC. Look for ADC_EVT_CAPT in TRM. Hence ADC start of conversion can be synchronized to SYNC0 signal by appropriately configuring the ADC registers to H/W synchronized mode and selecting PRU event as H/W event source in ADC_EVT_CAPT in Control module.

  • Thank Pratheesh,

    Sorry for my late, I was not available.

    For my application I am not using a touch screen, the converters are only used to measure general purpose values.

    In first I have imported from startware folder the adc files (adcVoltMeasure, tsc_adc)  to ecat_appl project. The compilation is Ok. Now I am trying to measure a value in one-shot capture mode. Later, I try to configure interrupt register with Pru interrupt as you've informed me.

    I would keep you informed of the result.

    Have a good day.

    JMV