cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
devdutt09
Contributor
Contributor
1,990 Views
Registered: ‎05-23-2017

zynq timer interrupt functions.

Jump to solution

Hi Everyone ,i am using Target FPGA Device:7z015,

QUESTION 1:i want to use timer functions , like timer_enable and interrupt_attch functions  in my project to get updated time in milliseconds and to get updated timetamp everytime when interrupt occurs, 

 

i have found these below functions from OTHER PLTFORM ,

 

/* Timer A = 1ms */
timer_prescaler(1000);


timer_init(timer_select_a, 100, timer_direction_down, timer_prescaler_select_on, timer_mode_continuous);


timer_enable_interrupt(timer_select_a);


timer_start(timer_select_a);

 

interrupt_attach(interrupt_timers, (int8_t)interrupt_timers, timer_ISR);

 

if (timer_is_interrupted(timer_select_a))

{

//update time in milliseconds,

//update timestamp .

}

 

QUESTION 2: Zynq supports INTERRUPT SERVICE ROUTINE?? if yes please refer me function or header in which i can finr Timer_ISR function.

can we get similar functions in zynq, because i am new to SDK, i don't know how to use, i am using my collegues account to ask my question.

 

Thanks ,regards.

DEVDUTT, BALARAJ 

0 Kudos
1 Solution

Accepted Solutions
ibaie
Xilinx Employee
Xilinx Employee
2,150 Views
Registered: ‎10-06-2016

Hi @devdutt09,

 

The Zynq-7000 device has different timers within the PS and also can make use of timers implemented on the PL, so you can make use of any of them for your implementation.

 

Yes Zynq-7000 is based on Cortex-A9 and does support interrupt service routines.

 

I will recommend you to make use of the examples provided with the BSPs within the SDK, i.e. TTC (triple timer counter) example where a timer is used and handled by a interrupt routine.

 

ttc.JPG

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post

1 Reply
ibaie
Xilinx Employee
Xilinx Employee
2,151 Views
Registered: ‎10-06-2016

Hi @devdutt09,

 

The Zynq-7000 device has different timers within the PS and also can make use of timers implemented on the PL, so you can make use of any of them for your implementation.

 

Yes Zynq-7000 is based on Cortex-A9 and does support interrupt service routines.

 

I will recommend you to make use of the examples provided with the BSPs within the SDK, i.e. TTC (triple timer counter) example where a timer is used and handled by a interrupt routine.

 

ttc.JPG

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.

View solution in original post