908QT2 Reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

908QT2 Reset

1,688 Views
JohnDoe
Contributor II
Hello buddies
 
I've been trying to configure PTA_PTA3 as a general purpose output, as you can see PTA_PTA3 can be RST' Pin if enabled. When I move PTA_PTA3 from 1 to 0 the controllers my system gets reseted. Dunno if theres any errata about this. I'm attaching the source code.
 
Code:
unsigned int Tick;//// Timer isr//void interrupt 6 timer_isr(void){ // Clear Timer OverFlow Flag // And reset Timer Counter  TSC_TOF = 0; TSC_TRST = 1; Tick++; if(Tick >= 625) {  Tick = 0;  PTA_PTA3 ^= 1; }}//// main//void main(void) {  CONFIG1 = 0x01; CONFIG2 = 0x00;   PTA  = 0xFF; DDRA = 0xFF;  // Configure Timer // MODULO Calculation for 0.1667 ms with no preescaler // TMOD =  0.1667 ms / 0.0000003125 = 533.44 = 0x0215 // 533 * 0.0000003125 = 0.0001665625 sec (0.1665625 ms)  TSC  = 0x70; TMOD = 0x0215;    // Reset Timer Counters  Tick             = 0;  TSC_TSTOP = 0;// go timer EnableInterrupts;// Enable Interrupts for(;;) {   } }

 
I'm moving the pin in timer isr, using codewarrior 3.0 hc08. Any clue about this is apreciated. Thanks.
 
John.
Labels (1)
0 Kudos
1 Reply

268 Views
peg
Senior Contributor IV
0 Kudos