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.

TDA4VM: ECAP continuous mode

Part Number: TDA4VM

Tool/software:

Hello experts,
I am currently operating ECAP in continuous mode. If I am  setting the STOPVALUE equal to 1 how does the MOD4 counter works?
Does the STOPVALUE has no effect in  continuous mode?
What is the solution if the user wants to capture event1 in a circular buffer?

Kind Regards
Thank You
Manisha N G

  • Hi Manisha,

    I am currently operating ECAP in continuous mode. If I am  setting the STOPVALUE equal to 1 how does the MOD4 counter works?

     

    Our expert is OoO and he will support you next week

    Regards,

    Karthik

  • Hello,

    May i know which ECAP driver are you using ? which SDK and its version details ?

    Regards

    Tarun Mukesh

  • I am not using SDK. I am developing the ECAP driver acc. to the standards of my company.  Currently I have stop value as a configurable parameter, but in the initialization function, I fix the ECAP to be in continuous mode. 
    In the continuous mode does the stop value still make any sense to have it?
    Regards
    Manisha Narayana Gowda

  • Hello,

    The Mod4 (2-bit) counter is incremented via edge qualified events CEVT1 through CEVT4 (see the register).
    • The Mod4 counter continues counting (0->1->2->3->0) and wraps around unless stopped.
    • A 2-bit stop register is used to compare the Mod4 counter output; when equal the Mod4 counter stops and
    inhibits further loads of the through registers. This occurs during one-shot operation.
    The continuous/one-shot block controls the start/stop and reset (zero) functions of the Mod4
    counter via a mono-shot type of action that can be triggered by the stop-value comparator and re-armed via
    software control.
    Once armed, the ECAP module waits for 1-4 (defined by stop-value) capture events before freezing both the
    Mod4 counter and contents of the through registers (time-stamps).
    Re-arming prepares the ECAP module for another capture sequence. Also re-arming clears (to zero) the Mod4
    counter and permits loading of the through registers again, providing the [8] CAPLDEN bit is set.
    In continuous mode, the Mod4 counter continues to run (0->1->2->3->0), the one-shot action is ignored, and
    capture values continue to be written to the through registers in a circular buffer sequence.

    You can refer to ECAP continuous mode in TRM for more details. 

    Regards

    Tarun Mukesh

  • Hello Tarun,
    Thanks for your explanation. I understand by your explanations that , Mod4 counter continues counting (0->1->2->3->0) and wraps around in continuous mode. If the stop value is configured then the Mod4 counter stops.

    Kind Regards
    Thank you
    Manisha

  • Thanks, I will close this thread.

    Regards

    Tarun Mukesh

  • Hello..
    Please clarify if my understanding is correct ? and please do not close the thread yet.

    I understand by your explanations that , Mod4 counter continues counting (0->1->2->3->0) and wraps around in continuous mode. If the stop value is configured then the Mod4 counter stops.

    Thank you
    Manisha Narayana Gowda

  • Hello,

    I think you are misunderstanding the sequence,

    In oneshot sequence,

    The Mod4 counter continues counting (0->1->2->3->0) and wraps around unless stopped. The stop register is used to compare the Mod4 counter output; when equal the Mod4 counter stops and inhibits further loads of the through registers. This occurs during one-shot operation.

    In continuous mode,

    The Mod4 counter continues to run (0->1->2->3->0), the one-shot action is ignored, and capture values continue to be written to the through registers in a circular buffer sequence.

    Regards

    Tarun Mukesh

  • Hi Tarun,
    I get you explanation. But your explanation does not include information about the behavior of the Mod4 counter in continuous mode if STOPVALUE is also configured?
    Will the Mod4 counter ignored the STOPVALUE and continue to be written to the through registers in a circular buffer sequence or any other behavior?

    When I checked continuous mode with STOPVALUE, I can see Mod4 counter continuous to run till the value of "STOPVALUE" and wraps around to 0.
    Example:
    If the "STOPVALUE" is 2. Mod4 counter runs (0->1->2->0). Please explain this behaviors?

    Kind Regards
    Thank you
    Manisha Narayana Gowda

  • Hello,

    In continuous mode , The Mod4 counter continues to run (0->1->2->3->0) and wraps around if you don't configure the 2-bit stop register.

    In one shot mode ,STOPVALUE is compared to Mod4 counter, when equal, two actions

    occur:1. Mod4 Counter is stopped (frozen)

    2. Capture register loads are inhibited

    In one shot mode, further interrupt events are blocked until we re-arm, once the number of events captured has been reached.

    Regards

    Tarun Mukesh

  • Hi,
    Thanks for your reply.

    In continuous mode , The Mod4 counter continues to run (0->1->2->3->0) and wraps around if you don't configure the 2-bit stop register.

    What happens to MOD4 counter in continuous mode if  STOPVALUE is configured.

    Example:
    If the "STOPVALUE" is 2. Mod4 counter runs (0->1->2->0). Please explain this behaviors?

    I did not find answer to this question yet.

    Thank you

     

  • There is no meaning to configure stop value for continuous mode,even the stop bit register you are using is for one shot.

    what happens is out of scope of even the TRM document, we didn't configure that in our drivers. 

    Regards

    Tarun Mukesh

  • When I checked continuous mode with STOPVALUE, I can see Mod4 counter continuous to run till the value of "STOPVALUE" and wraps around to 0.
    Example:
    If the "STOPVALUE" is 2. Mod4 counter runs (0->1->2->0). Please explain this behaviors?

    But why does Mod4 counter behaves in continuous mode as mentioned above?
    Is there no explanation for this behavior form your side?
    Can you give more clarity about your explanations for this 

  • But why does Mod4 counter behaves in continuous mode as mentioned above?
    Is there no explanation for this behavior form your side?

    Yes , their is no meaning for STOP value in continuous mode so what does configuring it will do is still unknown to me.

    Can you give more clarity about your explanations for this 

    I believe i have modified my reply ,the question here is what is your necessity to configure STOP value in continuous mode which doesn't have any meaning ?

    Regards

    Tarun Mukesh

  • Thank you

    This reply was misleading, anyhow now you can close the thread.