AT91SAM7S64 Timercounter Ausgang funktioniert nicht

Gast #2386360
Lesenswert?

Hallo,

ich verwende einen AT91SAM7S64 und möchte, dass an dem einen Beinchen 
der Ausgang vom TimerCounter ausgegeben wird. Beim Erreichen des Wertes 
von RC soll an TIOB1 der Ausgang togglen.

Folgenden Code habe ich verwendet:
1
  //* First, enable the clock of the TIMER
2
  AT91F_PMC_EnablePeriphClock ( AT91C_BASE_PMC, 1<< AT91C_ID_TC1 ) ;
3

4
  AT91F_PIO_CfgPeriph(AT91C_BASE_PIOA, 0, AT91C_PA16_TIOB1);
5

6
  //* Set the Mode of the Timer Counter
7
  AT91C_BASE_TC1->TC_CMR = (
8
      AT91C_TC_WAVE |
9
      AT91C_TC_WAVESEL_UP_AUTO |
10
      AT91C_TC_CLKS_TIMER_DIV4_CLOCK |
11
      AT91C_TC_BCPC_TOGGLE
12
      );
13

14
  //* Enable the clock
15
  AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN ;
16

17
  AT91C_BASE_TC1->TC_RC = 0x2E;
18

19
  AT91C_BASE_TC1->TC_CCR = AT91C_TC_SWTRG ;

Hat jemand eine Ahnung, warum es so nicht funktioniert?

Schönen Gruß,
Johannes

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren