Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Watchdog-timer system reset not working on atmega328p

2 posters

Go down  Message [Page 1 of 1]

Fabian I.



Hello again,

While using, your awesome, SimulIDE 1.0.0 we might have encountered a bug regarding the
Simulation of the Watchdog-timer on the atmega328p. The problem is that the MCU’s system reset is not being triggered when it should be.

To demonstrate the issue, we have created a minimal not working example attached below.

It would be very nice if you could take a look at it.

As always thank you for your wonderful project and have a good day.
Attachments
Watchdog-timer system reset not working on atmega328p Attachmentdemo.zip
You don't have permission to download attachments.
(9 Kb) Downloaded 4 times



Last edited by arcachofo on Mon Nov 07, 2022 5:18 am; edited 3 times in total (Reason for editing : Mark as solved (green color))

arcachofo

arcachofo

Hi Fabian.
Thanks for reporting and for the example.
I will have a look.

arcachofo

arcachofo

There is an error in how the watchdog is enabled/disabled:
Currently some options determined by config word (fuses) are configured in Properties->Config.

There you have "Enable Watchdog", this is equivalent to WDTON fuse.
This fuse can force to enable the Watchdog, but not to disable it.
Currently if you don't enable Watchdog in Properties dialog then it will not work.

So until I fix this issue you need to enable Watchdog in Properties->Config.

Fabian I. likes this post

arcachofo

arcachofo

Solved at trunk Rev. 1338, 1.0.1 Rev. 1339, 1.0.0 Rev. 1133.

Fabian I. likes this post

Fabian I.



Thank you very much that is helpful!

arcachofo

arcachofo

SimulIDE_1.0.0-RC3 is  available for download:
https://www.simulide.com/p/downloads.html

This issue should be solved in this version.

Fabian I. likes this post

Fabian I.



Hello Arcachofo,

there still seems to be unexpected behavior on RC2 (with enabling Watchdog) and on RC3
when the fuze time is set to 2s or lower like in the demo I have sent you. In this case, the system reset is triggered permanently without the fuze time elapsing.

It only works as expected for me when the fuze time is set to 4s or more.

arcachofo

arcachofo

there still seems to be unexpected behavior on RC2 (with enabling Watchdog) and on RC3
when the fuze time is set to 2s or lower like in the demo I have sent you. In this case, the system reset is triggered permanently without the fuze time elapsing.

It only works as expected for me when the fuze time is set to 4s or more.
Solved at trunk Rev 1341.

Fabian I. likes this post

Fabian I.



Ok, I have to apologize something went wrong when I pulled Revision 1134 leading me to believe it is still bugged. It functions perfectly fine now.

We will continue working with rc3.
Thank you very much.

arcachofo

arcachofo

I forgot to mention that last problem about wrong prescaler was also solved in branch 1.0.0, at Rev 1136.

But I'm not sure if you are using executable from download page or building from Launchpad repository.

Fabian I.



I am building from Launchpad.

arcachofo likes this post

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum