Sorry, you need to enable JavaScript to visit this website.

Zynq-7000 TTC counter and RC

Zedboard forums is currently read-only while it under goes maintenance.

2 posts / 0 new
Zynq-7000 TTC counter and RC

Hello all.


I have some misunderstanding with TTCs on zynq-7000. I used this guide to understand how TTCs are working, but seems like a quite subtlety which I don't understand.


I have to use 2 TTCs with PWM (match value) and change RC in handlers to make CNC. After trying to make it like get new RC in handler and change RC I got unstable error for about 0.5s for 25s of changing RC and some impulses haven't generated but handler was called instantly after changing RC (I took into account that (RC - match value) should be greater then 0).


I thought it can be because I have to:

1) reduce time we waste in handler (some code fragments like change RC made by asm);

2) consider some information we lose when we shift RC to prescaler;

3) consider counter of my timer because there are sometimes another handlers or something;

4) when we change RC we should reset counter (special bit in XTTCPS_CNT_CNTRL register);

5) see if RC is less then counter - make RC as match value (never happens).


After this manipulations I saw that my timers with same amount RC (before counter compensation) ends in different time (I used different counters so timers have different number of RC).


Can someone help me?


P.S. I tried to use inline functions with asm() to change RC. Universal (by transmit using timer number) and 2 different functions with same (different only address to timer) asm code, and I got different results. I don't understand why.





Please ask this question over at the Xilinx forum.

Thank you,