lab11 / signpost-software

This repository holds software for the signpost city-scale sensing project
3 stars 2 forks source link

App watchdog kernel timeout too fast #36

Open brghena opened 7 years ago

brghena commented 7 years ago

In the audio module continuous_event_detect app, I set a watchdog to timeout after 5*60*1000 milliseconds, but was seeing watchdog reset behavior occurring after roughly 45 seconds. Problem temporarily worked around by arbitrarily increasing the timeout length until everything works, but we should look into why it wasn't mapping to real-world time correctly.

bradjc commented 7 years ago

Would you buy an integer overflow problem?

https://github.com/lab11/signpost-software/blob/55fdae0bc1a0b7ea41d8bbfd0771ba93fdcfa3d6/kernel/signpost_drivers/src/app_watchdog.rs#L34-L38

self.timeout is 5*60*1000, and ::frequency() ends up being 16000, and 5*60*1000*16000 is > 2^32.