Not sure what's going on yet. But I have found that when it is cold out (below freezing), something is going on the causes the watchdog timer to not get refreshed and the board resets after the specified 5 seconds of the watchdog. When I take the OnSpeed box home and try to debug it in the comfort of my house, it seems to work fine again. Things that are suspect are my wiring. Maybe I have something weird wired (although everything worked when I took the box from my house, put it in the airplane and went for a flight. Another would possibly be my soldering? Not sure on that, but I'm sure it's a possibility. I get "i2c timeout", but even if I comment out the i2c relevant setup code, I still get a reset after 5 seconds. I could be missing something, but I think this message is somewhat of an artifact of something else going on. If anyone has any ideas, I'm all ears. :-)
top of page
FlyONSPEED.org Reduce Loss of Control Risk
Winner 2018 EAA Founder's Innovation Award and 2021 Grand Champion Winner
bottom of page
Thanks Lenny, yea I think that my low temperature idea was bad from the get go. I was programming the Teensy in between these episodes, so it just coincided with the box being out in the cold. The problem is some code I changed/added. I'm going to dig into it later today to figure out what was bad. If I revert back to v3.1.5 and power cycle the box, it's working fine. Thanks for the response!
Ryan,
Don't know about low temps affecting the box. I'm in FL. I've flown my v2 box in my RV-10 for the last 2 years, sometimes close to but never below freezing.
Those I2C timeout messages sometimes come up after programming the Teensy. The I2C bus on the pressure sensors get confused and need to power cycle the box to have the sensors reboot. After that everything works fine.
Not sure which version of the software you are using but in some recent version I increased the I2C clock speed so we can obtain and process the sensor data faster, especially from the IMU (at 238Hz). There may be a problem with that at extremely low temps. See if lowering that to 400Khz helps.
I haven't been getting watchdog issues lately. One thing we're seeing on 3 airplanes with our latest code is uncommanded "Onspeed Disabled". The box doesn't reboot, just acts as if the button was clicked to disable the audio. Clicking the button brings it back up. Other than that the system is stable in these planes. Shoot me an email at lenny@ fly... and I'll send you the latest code I'm flying.
Lenny
Just to try and document my nonsense in case anyone else goes down this road, it looks like some code I changed corrupted something with timers/sensors. Since the sensors remained powered even through Teensy programming, the error continues until the offending code is removed and the power is completely removed from the board.
Probably not surprising, but I'm beginning to think I have messed something up. Even though I reset a bunch of times last night, I tried getting everything reset and things seem fine at the moment. Hope I can pin point what I may have done to cause the problems.
So it seems I may have misdiagnosed the problem. After some searching it appears that lastwatchdogRefresh is getting corrupted somehow. But it works for a period of time maybe? I see it at '300' when it goes through the main loop the first time and the next time it comes around, it is at a value around 5000 that seems to increment each time the program resets. It increments by two each time the program resets. But it does not increment at all since it is much higher than the millis() function would report in order for the difference to be >500 as shown at the end of the main loop.
Well I proved myself wrong. After working on a few things, it started happening again. Still trying to get more data.