Renesas Single-Chip Microcomputer M38C89T-ADF Instrukcja Użytkownika Strona 96

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 138
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
);
}
Przeglądanie stron 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 137 138

Komentarze do niniejszej Instrukcji

Brak uwag