The timer peripheral is a counter with a compare/match interrupt, right?  So the match interrupt is not occurring until the much later than it should?  This sounds like a case where the compare register is being set in the past, that is, the counter has already incremented past the compare value and has to wrap around before the match can occur.  Could this be happening?  Is there any protection against this.

This might happen if the delays are very small or if the timer processing is deferred for a long time, perhaps by another interrupt?

On 6/7/2023 1:00 PM, Fotis Panagiotopoulos wrote:
As a first test, I added another (NuttX) watchdog timer, to toggle a board
LED.

I can confirm that at some point the NuttX watchdogs stop working.
I am not sure what is the trigger to this situation, the issue appears
randomly.

Sometimes the watchdogs get stuck for a couple of seconds and then resume
operation.
It just happens that the "stuck" period is less than the timeout period of
the HW watchdog timer, and the system does not reboot.


On Wed, Jun 7, 2023 at 12:23 PM Fotis Panagiotopoulos <f.j.pa...@gmail.com>
wrote:

Hello

I have just started experimenting with tickless on an STM32F427.

I had some (configuration) issues initially, but now everything seems to
be working correctly.

However, after some seconds of operation, the Hardware/STM32 Watchdog
timer triggers a system reset.

I have configured:
- CONFIG_WATCHDOG
- CONFIG_WATCHDOG_AUTOMONITOR
- CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG
- WATCHDOG_AUTOMONITOR_TIMEOUT = 5
- CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL = 1

So, the HW watchdog is fed by a NuttX watchdog.

I don't think that there is a timing issue here (inaccuracy), as the HW
watchdog is supposed to be fed every second,
while its timeout is set to 5 seconds. It has plenty of time to absorb any
inaccuracies.
Also, it's worth mentioning that this configuration works perfectly on
traditional systems (non-tickless).

I guess that the NuttX watchdogs stop working after some time?

Are there any ideas on the possible cause, before I start debugging it the
hard way?
Is anyone using tickless on STM32F4's?




Reply via email to