cancel
Showing results for 
Search instead for 
Did you mean: 

GPT2 T5 and T6 in capture/reload.

neil2399
Associate II
Posted on April 28, 2009 at 15:14

GPT2 T5 and T6 in capture/reload.

1 REPLY 1
neil2399
Associate II
Posted on April 28, 2009 at 15:14

Hi guys.

I'm using a ST10F269Q2 and I'm trying to use GPT2 T5 and T6 in the capture/reload mode (page 184 in the user manual) to generate interrupts 4 times faster than they come into my system. I can't however get the generated interrupts in phase with the incoming interrupts. The phase continues to drift. Am I doing something wrong or is there no way to get the two in phase?

My init code is as follows:

T5CON = 0x1005;

T5R = 1;

T5SC = 1;

T5CLR = 1;

T6CON = 0x0003;

T6R = 1;

T6SR = 1;

T6UD = 1;

T6OE = 1;

DP3_1 = 1;

P3_1 = 1;

CAPREL = 0x0000;

Thanks Neil.