The STM32L processor knows how to disable the WD when you are at breakpoints in the debugger. If the TMS does not do that, it is the only reason I can think of that there would be a problem.
And just a check: Is the s/w still set up so that the errors structure is not wiped out by a reset? In other words, that the WD flags will be available after the WD triggers and the system reboots? I seem to remember that was a fair bit of hassle to make that happen and I don't just remember how I did it :-)
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Tue, Oct 3, 2023 at 1:53 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Bug fixed and now the local errors structure is copied into the downlink.
I think we should leave the WD enabled and see if it causes any issues. Thoughts on that?
73 Chris
On Tue, Oct 3, 2023 at 1:37 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Thanks for that.
I think it all works then. I can see the bits get set (or not when it triggers). They wdReports not making it into the downlink though. They are visible in errors.c So that is likely a bug in the way they are copied onto the frame.
73 Chris
On Tue, Oct 3, 2023 at 11:35 AM Burns Fisher (AMSAT) via pacsat-dev < pacsat-dev@amsat.org> wrote:
Chris, wdReport is the bitmap of tasks that have called the watchdog report routine in the last few seconds. When you call ForceInternalWatchdogTrigger, you go into an infinite loop. Since the OS is set not to do pre-emption, that prevents ALL tasks from running and from reporting in. It is possible that you might have called this at such a time that a different task is the one that did not report in.
If you want to try having a single task not report, put a call to vTaskYield() inside the infinite loop. That will prevent the current task from reporting, but allow all the others. And yes, the console task is not monitored, so it will not show a bit missing if you have the infinite loop without the yield, and should not trip the WD at all if you use yield.
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Tue, Oct 3, 2023 at 11:24 AM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Ok, that call works and the watchdog resets the IHU as expected. The console is not in wdReports so I could not see if the data ends up in the Telemetry. So I put the call in the PB routine that handles DIR broadcasts. We get a reset as expected when a DIR is requested. But I can't see the missing bit in wdReports. They are all still set. I need to dig a bit deeper as I perhaps don't understand how this is tracked.
73 Chris
On Mon, Oct 2, 2023, 18:44 Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Thanks! Will try that tomorrow.
73 Chris
On Mon, Oct 2, 2023, 17:25 Burns Fisher (AMSAT) wb1fj@fisher.cc wrote:
Call "ForceInternalWatchdogTrigger". That prevents any other tasks from running so after a few seconds, bang! The command to do that is "test internal wd".
There is code for an external watchdog (i.e. using a wd chip outside of the processor) but that won't be used on the Launchpad.
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Mon, Oct 2, 2023 at 4:18 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
> I made some changes to allow the watchdog to be started. Once I > added some calls to the Uplink task and removed the CAN task from the > wdReports list it stopped rebooting in a loop due to the watchdog. > > I now have it running with the watchdog enabled but I can't cause it > to trigger the watchdog from a task. So I either don't understand what > needs to be done or the watchdog is not working properly. > > The watchdog enabled code is checked into g0kla_watchdog > > If there is a simple line of code to trigger the watchdog then let > me know. I was just trying to add a suitable delay. > > 73 > Chris > > -- > Chris E. Thompson > chrisethompson@gmail.com > g0kla@arrl.net > > ----------------------------------------------------------- > > pacsat-dev mailing list -- pacsat-dev@amsat.org > View archives of this mailing list at > https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org > To unsubscribe send an email to pacsat-dev-leave@amsat.org > Manage all of your AMSAT-NA mailing list preferences at > https://mailman.amsat.org >
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
-- Chris E. Thompson chrisethompson@gmail.com g0kla@arrl.net
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
-- Chris E. Thompson chrisethompson@gmail.com g0kla@arrl.net
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org