TIMER produces the interrupt with no counting

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Contact:

TIMER produces the interrupt with no counting

Post by r_romeo »

Hi, I am working in a code were inside a custom interuption (produced by a
external source) I have a timer interrupt that works fine the first time.
the problem is that from the second time the timer is activated, the timer
interrupt is activated but the interruption is activated inmediatly, without
counting.
Anyone knows why this can be happening ? , I am checking with a logic analyzer
and also with custom code to check the interruption is beeing generated.
In the graph I can see the interrupt is being generated rigth after the timer
is activated and before the time programed.
Somehow after the first activation the timer lost the parameters.
It does not matter wich timer I use
I also changed the delay , just in case the interrupt was been generated
outside boundaries , but that is not the problem.

Ialso get the warning:

------------------------------------------------------------------
D_01_03.c: In function '_T2Interrupt':
ID_01_03.c:3615: warning: PSV model not specified for '_T2Interrupt';
assuming 'auto_psv' this may affect latency
ID_01_03.c: In function '_T1Interrupt':
ID_01_03.c:3623: warning: PSV model not specified for '_T1Interrupt';
assuming 'auto_psv' this may affect latency
------------------------------------------------------------------


but the warning is in both timers, and one actually works fine, I dont know it's meaning
this is in a code were I can use use other timer interrupt that is working
fine, but the alternative is working as described.
Any ideas?

Stanga
Posts: 35
Joined: Sat Aug 07, 2010 10:17 am
Contact:

Re: TIMER produces the interrupt with no counting

Post by Stanga »

I use the timer to count as well, but store the count result in a memory location. So I can recall the count value when the timer restarts.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Contact:

Re: TIMER produces the interrupt with no counting

Post by dazz »

hi
can you post your flowchart,as someone may be able to help further
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Contact:

Re: TIMER produces the interrupt with no counting

Post by r_romeo »

Hi , Here are my flowcharts, one for transmission and other for reception and generation of signal (CAN) after certain time that shold be managed by TIMER 2
Actually, this topic would be moved to V5 but I can't post there (???)
can-test-1-RX.fcf_pic16
(15.5 KiB) Downloaded 180 times
can-test-1-tx.fcf_pic16
(9.5 KiB) Downloaded 174 times

Also I have a screenshot that show what is happening
(RX and tx are swapt in the image)
Signal.jpg
(184.53 KiB) Downloaded 1190 times
As you can see the delay works the first time and then there is no count

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Contact:

Re: TIMER produces the interrupt with no counting

Post by dazz »

Hi
follow this link to upgrade your forum account to post in v5 forums http://www.matrixmultimedia.com/mmforum ... =46&t=9958

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php


Post Reply