Changes between Version 4 and Version 5 of tim_driver


Ignore:
Timestamp:
Oct 25, 2014, 9:40:27 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • tim_driver

    v4 v5  
    1 = GIET-VM / BDV Driver =
     1= GIET-VM / TIM Driver =
    22
    33[[PageOutline]]
     
    2020
    2121
    22  === int '''_timer_start'''( unsigned int cluster_xy,  unsigned int local_id,  unsigned int period ) ===
    23 This function activates a timer in the vci_timer component by writing in the proper register the period value.
    24 It can be used by both the kernel to initialise a "system" timer, or by a task (through a system call) to configure an "user" timer.
     22 === int '''_timer_start'''( unsigned int channel,  unsigned int period ) ===
     23This function activates a timer channel in the vci_timer component by writing in the proper register the period value.
     24 * '''channel''' : Timer channel global index
     25 * '''period''' : interrupt period (cycles)
     26Return 0 in case of success.
     27Return -1 if timer index too large.
     28
     29 === int '''_timer_stop'''(  unsigned int channel ) ===
     30This function desactivates a timer channel in the vci_timer component by writing in the proper register.
    2531
    2632Return 0 in case of success.
    2733Return -1 if timer index too large.
    2834
    29  === int '''_timer_stop'''( unsigned int cluster_xy,  unsigned int local_id ) ===
    30 This function desactivates a timer in the vci_timer component by writing in the proper register.
    31 
    32 Return 0 in case of success.
    33 Return -1 if timer index too large.
    34 
    35  === int '''_timer_reset_irq'''( unsigned int cluster_xy,  unsigned int local_id ) ===
    36 This function acknowlegge a timer interrupt in the vci_timer  component by writing in the proper register.
    37 It can be used by both the isr_switch() for a "system" timer, or by the _isr_timer() for an "user" timer.
     35 === int '''_timer_reset_irq'''(  unsigned int channel ) ===
     36This function can be used by the the _isr_timer() to acknowlege a timer interrupt in the vci_timer  component by writing in the proper register.
    3837
    3938Return 0 in case of success.
     
    4140
    4241 === int '''_timer_reset_cpt'''( unsigned int cluster_xy,   unsigned int local_id) ===
    43 This function resets the timer counter. To do so, we re-write the period in the proper register, what causes the count to restart.
    44 This function is called during a context switch (user or preemptive).
     42This function resets the timer counter, by re-writing the period in the proper register, what causes the count to restart. This function is called during a context switch (user or preemptive).
    4543
    4644Return 0 in case of success.
     
    4947 === void '''_timer_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
    5048This Interrupt Service Routine handles the IRQs generated by the "user" timers.
    51 The IRQs generated by the "system" timers should be handled by _isr_switch().
    52 It can be a HWI or a PTI. The channel argument is the timer local index.
     49It can be a HWI or a PTI. The channel argument is the timer global index.
    5350The ISR acknowledges the IRQ, registers the event in the proper entry
    5451of the _user_timer_event[] array, and a log message is displayed on TTY0.