Measuring time while interrupt routine is activated

Ohad0262
Ohad0262 Altair Community Member
edited January 12 in Community Q&A

Hi !
I am using the PSIM software interrupt to detect rising and falling edges of a signal.
The DSP I am working with is a TI f28335.

In the event of rising / falling edge I am entering its routine via subcircuit.
The routine goal is to calculate the time (and hence the phase) between two rising or tho falling edges of two separated signals.

Inside the routine I am using a simplified C block to calculate the time difference but for the moment I struggle to obtain this desired time difference due to the inability to get the absolute time at which interrupt occured.

In PSIM simulation without interrupts I could just use the "t" parameter offered by the C block, or by using an integrator summing up the time passed, but these are not accessible using the interrupt block in the simulation.

I would like to know how can I obtain that time, what tools do I have ?

any help would be beneficial,
Thanks !

Tagged:

Answers

  • VSiddhartha
    VSiddhartha
    Altair Employee

    Hi,

    The inherent limitations of using a DSP for high-precision timing tasks due to the dependency on interrupt rates and available clock cycles. The suggestion to use FPGAs or advanced processor peripherals makes sense, as they can handle such requirements more efficiently without being constrained by the core's interrupt routines.

    Thank you

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.