Comet Labs 48-Port 10 Guia do Utilizador Página 124

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 132
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 123
CIF Peripheral Model - SimpleTimer
120 CoMET Version 5.9 – Tutorial
Setting the SimpleTimer1 Base Address with a pcx Parameter Override
Rebuild the system and open the SimpleVSP1 .pcx file.
Change the value of the SimpleTimer1/Parameter Overrides/StartAddress to 0x90000000
Creating Target Code
This tutorial does not cover creating target code for the full range of VPMs available. Here
we present code for the ARM926EJS1. In the case of the ARM, the target code can be edited
and compiled in a Target project from within the CoMET SEE.
The target code sets up the timer, which on each match generates an interrupt. The interrupt is
handled by irq_handler function. The irq_handler function prints a message, deasserts the
interrupt, zeroes the GTR counter and increments the interrupt counter. After a specified
number of interrupts the main function exits. The code is as follows:
/*
**--------------------------------------------------------------------------
**
** Copyright (c) 2004, VaST Systems Technology Corporation.
**
** SimpleVSP TimerTest for SimpleTimer
**
**--------------------------------------------------------------------------
*/
#include <stdio.h>
#include <string.h>
Vista de página 123

Comentários a estes Manuais

Sem comentários