Timer interval and Timer - problem

Any bugs you encounter with Flowcode should be discussed here.
DStoyankov
Posts: 12
http://meble-kuchenne.info.pl
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Flowcode v10 Timer interval and Timer - problem

Post by DStoyankov »

Hello,
Library Timer Interval and Timer not working.

Example with PIC24FJ128DA110 , Timer :

Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC16\batchfiles\pic16_C30_comp.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\" "Flowcode2" "D:\FLOW_PROJECT\simulator_EXECUTIVE\" "24FJ128DA110"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: 54CD51B8F484283E91B3AD9DE6F4F50C418D34178E0D3D0BD2659E1DA9D69F58D3529BB9468CFC85641793EB31F94A5F16CBA8333F125C7188ED8742865A1BBCF23BFF3064C25A11BAFA61B701B8D046E2B847C06A341BA1A924146F47BB51131AFA1B63045FF8EFD8DA408700E5719BD2897C22C80F0B985EDF8CE67A1404D62B8878703E3665631EAF018A0B6018ACC8FF364DB19D83FB389861B26F27604A1F36255EB2E4245255911F067119BEF7D5F89C133B93261A29D848A5DAD12E38FF9E5CFBC45304482C3050DA273BE4EEDBE038345E976FF7F0C03E6C1723E33C3CC5736D0D2DAB0D0DA6C43ED30373AA133F965729382C18

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 2.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: 7821ABE5-9E21-4744-81B7-3FF600B75DB7

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 25\03\2024

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\PIC16\batchfiles\pic16_C30_comp.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>xc16-gcc -c -mcpu="24FJ128DA110" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\support\h" -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\" -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\" -std=gnu99 "Flowcode2".c -o "Flowcode2".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Flowcode2.c: In function 'main':
Flowcode2.c:1785:2: warning: 'return' with a value, in function returning void
Flowcode2.c: In function '_T1Interrupt':
Flowcode2.c:1822:5: error: 'FCV_00a91_TimedInterval1__INTCOUNT' undeclared (first use in this function)
Flowcode2.c:1822:5: note: each undeclared identifier is reported only once for each function it appears in
Flowcode2.c:1830:11: error: 'TimerInterval_1_CountRegLow' undeclared (first use in this function)
Flowcode2.c:1830:41: error: 'TimerInterval_1_SubPeriod' undeclared (first use in this function)
Flowcode2.c:1926:11: warning: implicit declaration of function 'TimerInterval_1_Macro'

Error returned from [xc16-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC16\batchfiles\pic16_C30_comp.bat reported error code 0x1

Autoclose turned off


FINISHED


***********************************************************************************************************************************************************************************

Example with PIC24FJ128DA110 , Timer Interval:

Using <PICkit2 PK2CMD External Power> inbuilt settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC16\batchfiles\pic16_C30_comp.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\" "Flowcode2" "D:\FLOW_PROJECT\simulator_EXECUTIVE\" "24FJ128DA110"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: 54CD51B8F484283E91B3AD9DE6F4F50C418D34178E0D3D0BD2659E1DA9D69F58D3529BB9468CFC85641793EB31F94A5F16CBA8333F125C7188ED8742865A1BBCF23BFF3064C25A11BAFA61B701B8D046E2B847C06A341BA1A924146F47BB51131AFA1B63045FF8EFD8DA408700E5719BD2897C22C80F0B985EDF8CE67A1404D62B8878703E3665631EAF018A0B6018ACC8FF364DB19D83FB389861B26F27604A1F36255EB2E4245255911F067119BEF7D5F89C133B93261A29D848A5DAD12E38FF9E5CFBC45304482C3050DA273BE4EEDBE038345E976FF7F0C03E6C1723E33C3CC5736D0D2DAB0D0DA6C43ED30373AA133F965729382C18

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 2.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: 7821ABE5-9E21-4744-81B7-3FF600B75DB7

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 25\03\2024

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\PIC16\batchfiles\pic16_C30_comp.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>xc16-gcc -c -mcpu="24FJ128DA110" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\support\h" -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\" -I"C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\" -std=gnu99 "Flowcode2".c -o "Flowcode2".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Flowcode2.c: In function 'main':
Flowcode2.c:2856:2: warning: 'return' with a value, in function returning void
Flowcode2.c: At top level:
Flowcode2.c:2893:5: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input

Error returned from [xc16-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC16\batchfiles\pic16_C30_comp.bat reported error code 0x1

Autoclose turned off

**************************************************************************************************************************************************************************************


Example with ARDUINO MEGA 2560 R3 , Timer Interval

Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.lst"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD69A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5A24465F11D9C3B2DBA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EE1FA30153290F2FAFBD2259D77AD477809E9C4D76400384BA5D2E1919BC6D834D57C406BC4A49D3F1

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 1.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 08\08\2022

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\AVR\batchfiles\avra.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" -lm -Wl,-gc-sections
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c: In function '__vector_20':
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1823:5: error: 'FCV_00a91_TimedInterval1__INTCOUNT' undeclared (first use in this function)
// } else {
^
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1823:5: note: each undeclared identifier is reported only once for each function it appears in
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1831:11: error: 'TimerInterval_1_CountRegLow' undeclared (first use in this function)
TimerInterval_3_CountRegLow = TimerInterval_3_SubPeriod;
^
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1831:41: error: 'TimerInterval_1_SubPeriod' undeclared (first use in this function)
TimerInterval_3_CountRegLow = TimerInterval_3_SubPeriod;
^
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1835:13: error: 'TimerInterval_1_CountRegHigh' undeclared (first use in this function)
TimerInterval_3_CountRegHigh = TimerInterval_3_SubPeriod >> 8;
^
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:1927:11: warning: implicit declaration of function 'TimerInterval_1_Macro' [-Wimplicit-function-declaration]
#if (1 == 1)
^

Error returned from [avr-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat reported error code 0x1

Autoclose turned off

*************************************************************************************************************************************************************************************

Example with ARDUINO MEGA 2560 R3 , Timer

Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.lst"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD69A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5A24465F11D9C3B2DBA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EE1FA30153290F2FAFBD2259D77AD477809E9C4D76400384BA5D2E1919BC6D834D57C406BC4A49D3F1

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 1.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 08\08\2022

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\AVR\batchfiles\avra.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" -lm -Wl,-gc-sections
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:2894:5: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input

Error returned from [avr-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat reported error code 0x1

Autoclose turned off

DStoyankov
Posts: 12
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Flowcode v10 Timer and Timer interval not working

Post by DStoyankov »

Hello,
Library Timer and Timer interval not working.
Tested: Arduino Mega 2560 R3 and PIC24F128

Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.lst"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD69A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5A24465F11D9C3B2DBA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EE1FA30153290F2FAFBD2259D77AD477809E9C4D76400384BA5D2E1919BC6D834D57C406BC4A49D3F1

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 1.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 08\08\2022

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\AVR\batchfiles\avra.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" -lm -Wl,-gc-sections
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:2894:5: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input

Error returned from [avr-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat reported error code 0x1

Autoclose turned off

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: Timer interval and Timer - problem

Post by BenR »

Hello,

I can't replicate the issue, please can you check you have the latest updates using Help -> Library updates.

If you're still getting the issues then please attach your .fcfx project file and also your .msg.txt compiler messages files.

DStoyankov
Posts: 12
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Re: Timer interval and Timer - problem

Post by DStoyankov »

The problem is not solved.

Target folder: D:\FLOW_PROJECT\simulator_EXECUTIVE
Source name: D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.fcfx
Title:
Description:
Device: ARD.ATMEGA.ATMEGA2560
Generated by: Flowcode v10.1.0.38
Date: Friday, April 26, 2024 14:06:25
Users: 1
Registered to: DStoyankov (91709826)
Licence key: MAC8WB
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega2560 "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.lst"

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD69A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5A24465F11D9C3B2DBA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EE1FA30153290F2FAFBD2259D77AD477809E9C4D76400384BA5D2E1919BC6D834D57C406BC4A49D3F1

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM REVISION: 1.0

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DATE: 08\08\2022

D:\FLOW_PROJECT\simulator_EXECUTIVE>REM DIR: FCD\AVR\batchfiles\avra.bat

D:\FLOW_PROJECT\simulator_EXECUTIVE>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega2560 -Os -ffunction-sections -fdata-sections -funsigned-char -o "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.elf" "D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c" -lm -Wl,-gc-sections
D:\FLOW_PROJECT\simulator_EXECUTIVE\Flowcode2.c:2894:5: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input

Error returned from [avr-gcc.exe]

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\batchfiles\avra.bat reported error code 0x1

Autoclose turned off


FINISHED
Attachments
Flowcode2.msg.txt
(2.08 KiB) Downloaded 7 times
Flowcode2.fcfx
(14.9 KiB) Downloaded 8 times

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: Timer interval and Timer - problem

Post by BenR »

Hello,

As you're not calling any of the component macros that can cause problems in the code generation. Try calling some of the component functions and let us know how you're getting on.

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: Timer interval and Timer - problem

Post by BenR »

There also seems to be a bug with timers over timer 2, looking into this now.

Hopefully this is now resolved with the latest library updates.

DStoyankov
Posts: 12
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Re: Timer interval and Timer - problem

Post by DStoyankov »

Only Timer component, Timer = Timer 1 - not working

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: Timer interval and Timer - problem

Post by BenR »

Hello,

I mean the timer peripheral selected in the timer component properties. Seems to be fixed now with the latest library updates. Timers 3, 4, 5 now working.

DStoyankov
Posts: 12
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Re: Timer interval and Timer - problem

Post by DStoyankov »

ARDUINO MEGA 2560 R3 - Update library and not working Timer library.
Attachments
Flowcode3.msg.txt
(2.08 KiB) Downloaded 8 times
Flowcode3.fcfx
(8.52 KiB) Downloaded 8 times

DStoyankov
Posts: 12
Joined: Sun Feb 26, 2023 12:44 pm
Been thanked: 1 time

Re: Timer interval and Timer - problem

Post by DStoyankov »

PIC24FJ1024GA606 - Timer library not working
Attachments
Flowcode2.msg.txt
(2.36 KiB) Downloaded 6 times
Flowcode2.fcfx
(8.72 KiB) Downloaded 7 times

Post Reply