FTM2 in PA/PT16 (TSSOP20) how to make it working ????????????????

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

FTM2 in PA/PT16 (TSSOP20) how to make it working ????????????????

1,541 Views
lucyperek
Contributor II

Hi,

slowly, the migration from SH16 (TSSOP20) to PA/PT16 starts to be a nightmare....

This time FTM timer 2 channel 0. Again nothing happens (dead) in a simple procedure of toggling C0 output by output compare function. When loaded with software only state high on the output. But if BKGD is enabled and Multilink connected then there is stupid activity (small portion of toggled pulses then longer break and again some pulses). This procedure runs in a closed loop, so what happens ?????

What's more annoying, the same procedure when run on PA/PT60 (64 pins) runs correctly !!

Hands are falling down....

brgds

PS. of course all necessary settings were done as in PA60 (FTMEN, WPDIS, blabla etc..)

0 Kudos
2 Replies

1,469 Views
lucyperek
Contributor II

Hi,

OK, it looks that FTM starts counting (so Output Compare can be activated) when CNTINH:L are activated. But not the way described in RM page 321. If CNTINHL=$0000 FTM counters are stopped. When their initial value is a bit different from 0, then counter starts counting.

But another strange things happen : not all status and control registers of timer 0 can be written. I can configure (let's say for simple OC) T0SC0/1/3.

T0SC2/4/5 stays at value 0. OK, if I do not need more channels than 3, I can neglect it. But why it happens like that ?

regards, Jacek

0 Kudos

1,519 Views
lucyperek
Contributor II

Hi, Ok just to be more specific :

1. I initialize FTM2 (FTMEN,WPDIS=1), bus clock, output compare on pin C0 (FTM2CH0), no interrupt.

2. I read counter registers.

3. Required time value is added, stored in channel registers, channel flag is cleared.

4. I wait in closed loop until channel flag is set.

5. Then I read channel registers and go to point 3.

No activity on pin C0, however FTM0 with the above procedure works. I have tried it with Multilink connected and w/out.

It looks that this FTM2 doesn't count anything and is stopped. Why ?

regards

Jacek

0 Kudos