Renesas Single-Chip Microcomputer M38C89T-ADF Manuel d'utilisateur Page 96

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 138
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 95
Rev.1.00 May 22 2012
REJ09B0566
4-76
3BLibrary Reference
R_MTU_CreateChannel
4
4.2.7 Multi Function Timer
Remarks (2/2) A callback function is executed by the interrupt processing function. This means that no other interrupt
can be processed until the callback function has completed.
If the requested period is not a multiple of the minimum period, the actual time period will be more than
the requested time period.
Program example
/* PDL definitions */
#include r_pdl_cmt.h
/* PDL device-specific definitions */
#include r_pdl_definitions.h
void func(void)
{
/* Configure CMT channel 0 for 10µs operation */
R_CMT_Create(
0,
PDL_CMT_PERIOD,
10E-6,
PDL_NO_FUNC,
0
);
/* Configure CMT channel 1 for 1KHz operation */
R_CMT_Create(
1,
PDL_CMT_FREQUENCY,
1E3,
PDL_NO_FUNC,
0
);
/* Configure CMT channel 2 using register values */
R_CMT_Create(
2,
PDL_CMT_PCLK_DIV_32,
0x55AA,
PDL_NO_FUNC,
0
);
}
Vue de la page 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 137 138

Commentaires sur ces manuels

Pas de commentaire