Renesas R8C/17 Manual de usuario Pagina 26

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 28
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 25
QDK™
R8C/Tau-NC30
www.state-machine.com/m16c
(4) The
l_nTimerA1Underflows
variable is used to count the number of underflows (transitions
0x0000 -> 0xFFFF) of the 16-bit TimerA1. This variable is used to generate 32-bit timestamp.
(5) The
QS_onStartup()
callback performs the initialization of QS
(6) The QS trace buffer is statically allocated to the specified size
(7) You always need to call
QS_initBuf()
from
QS_onStartup()
to initialize the trace buffer. This
particular QS port initializes UART for data transfer at the given baud rate (
BAUD_RATE = 115200
bits per second)
(8) UARTA0 is configured.
(9) Timer RD is configured as a free-running counter running from f8 (f1/8 = 20MHz/8), which
works out to 0.4 µs per the least-significant bit of this counter.
(10) The QS filters are configured.
(11) Return 1 from
QS_onStartup()
callback means that configuration of QS output was successfull.
(12) The
QS_onCleanup()
callback performs the cleanup of QS. Here nothing needs to be done.
(13) The
QS_onFlush()
callback flushes the QS trace buffer to the host. Typically, the function busy-
waits for the transfer to complete. It is only used in the initialization phase for sending the QS
dictionary records to the host (see Chapter 11 in [PSiCC2])
(14) The
QS_getTime()
callback provides the time-stamp to the QS trace records. The QS time-
stamping implementation uses Timer A1.
(15) Here the interrupt request flag is tested to find out whether Timer RD rolled over. This flag
being set means that the timer rolled over from 0x0000 to 0xFFFF.
(16-17) In case of the rollover the number of underflows must be incremented and the flag is
cleared.
(18) The 32-bit timestamp is the combination of the rollover counter (the coarse time) and the cur-
rent value of the Timer RD counter (the fine time). Please note that the 16-bit Timer RD
counter is subtracted from the coarse time, because the counter counts down.
Copyright © Quantum Leaps, LLC. All Rights Reserved.
24 of 26
Vista de pagina 25
1 2 ... 21 22 23 24 25 26 27 28

Comentarios a estos manuales

Sin comentarios