Page 1 of 1
Timer (storage) compile error with Mega2560
Posted: Sat Apr 11, 2020 9:24 am
by viktor_au
Hi
Question to Matrix team.
After I did the update, the Uno and Mega, during the 'Compile to HEX' process do return the errors.
It only happened with added Timer (storage).
No problems without the Timer.
I am not sure what has happened.
I used the Timer (storage) yesterday with the Uno project. All worked OK.
Today I had to move the project to Mega2560 and did some updates (again) and the problems began.
Any help please?
Re: Timer (storage) compile error with Mega2560
Posted: Tue Apr 14, 2020 4:21 pm
by Benj
Hello,
Please can you attach your project that is showing the error.
The .msg.txt file that is generated would also be useful so we can see the errors being generated.
You might just need to refresh the component properties, maybe point the component to a different timer and then change it back and hopefully this will reset things.
Re: Timer (storage) compile error with Mega2560
Posted: Tue Apr 14, 2020 7:37 pm
by viktor_au
Hello Ben
The attached files:
- the program with Timer1(storage) in it (with error in compiling process)
- .msg file
Re: Timer (storage) compile error with Mega2560
Posted: Wed Apr 15, 2020 9:50 pm
by Benj
Thanks for posting the files.
I think the problem is the timer componet relies on code to generate the appropriate interrupt to deal with the timer overflows. As you haven't referenced the component in the code this isn't currently happening. If you add in a call to the component in your code or delete the component then hopefully the problem will go away. Seemed to fix the issue for me.
If this doesn't solve it for you then please let me know and I'll investigate further for you.
Re: Timer (storage) compile error with Mega2560
Posted: Wed Apr 15, 2020 11:59 pm
by viktor_au
Thank you Ben
All good now.
A few more questions please.
--------------------------------------
1. How can I test the timer1 (storage)?
I used the delay component to let timer do the counting.
However the result is a different from expected.
What is the reason?
-------------------------
2. Timer1 has own display.
This display shows the numbers with dot.
No units after numbers.
Is it in seconds?
Re: Timer (storage) compile error with Mega2560
Posted: Thu Apr 16, 2020 12:04 pm
by Benj
Hello,
The simulation will be a bit out, it relies on Windows timing to do the incremental tick and so will generally be a bit behind. On hardware it should be pretty bang on (probably more accurate then the delay).
0.750 = 0.75 seconds.
Re: Timer (storage) compile error with Mega2560
Posted: Fri Apr 17, 2020 12:15 am
by viktor_au
Thank you Ben