Motorola M68CPU32BUG Manuel d'utilisateur Page 70

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 98
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 69
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-24
.TM_RD Read Timer .TM_RD
5.2.20 Read Timer
SYSCALL .TM_RD
TRAP CODE: $0042
Use this routine to read the timer value (the timer value is the number of interrupt pulses
generated). Initialize (.TM_INI) and start (.TM_STR0) the timer before using the .TM_RD
function.
Entry Conditions:
SP ==> Space for result <long>
Exit Conditions Different From Entry:.
SP ==> Time (number of interrupt pulses) <long>. The timer keeps
running after the read.
EXAMPLE
SUBQ.L #4,A7
Allocate space for result
SYSCALL .TM_RD
Read timer
MOVE.L (A7)+,D0
Load interrupt pulse count
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-25
.TM_STR0 Start Timer at T=0 .TM_STR0
5.2.21 Start Timer at T=0
SYSCALL .TM_STR0
TRAP CODE: $0041
Use this routine to reset the timer to 0 and start it. The user can select values for the MCU
periodic interrupt timer (periodic interrupt timing register (PICR) and periodic interrupt control
register (PITR)), or use the default values. The default values set the interrupt frequency to 125
milliseconds and use level 6, vector 66. See Appendix C of this manual and the MC68332 User’s
Manual, MC68332UM/AD, concerning the Periodic Interrupt Timer for more details.
Entry Conditions:
SP ==> Timer control value (for PICR) <word>
Timer period value (for PITR) <word>
Exit Conditions Different From Entry:
Parameters are removed from the stack, the timer is started, and the interrupt pulse
counter is cleared. If the user’s interrupt level, as defined in the status register
(SR), disables the timer interrupts, the SR interrupt mask bits are changed to allow
timer interrupts.
If the value of PICR is not equal to the power-up default value, $000F, the old
vector number is restored to the default CPU32Bug value.
EXAMPLES
SYSCALL .TM_STR0
MOVE.L #0,-(A7) Reset the timer to zero and start it with the default values.
SYSCALL .TM_STR0
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Vue de la page 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 97 98

Commentaires sur ces manuels

Pas de commentaire