Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000503FirmwareSerial Commspublic2012-01-15 16:412012-01-26 17:07
ReporterFred 
Assigned ToFred 
PrioritynormalSeverityminorReproducibilityrandom
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.2.0-SNAPSHOT 
Target Version0.2.0Fixed in Version0.2.0 
Summary0000503: Device Stops Responding To Packets
DescriptionBut keeps functioning normally otherwise. Seems like a bug in the comms code that enters a state that it can't get out of perhaps by not setting or clearing a flag or something.
Additional InformationNoticed this in bench test hack, however could be applicable to other firmwares too, as most code is 100% common.
TagsNo tags attached.
FirmwareVersion
Issue TypeBug
Risk of Breakagemedium
Attached Files

- Relationships

-  Notes
User avatar (0001123)
Fred (administrator)
2012-01-15 17:21

I've looked over the code and can't see anything obviously wrong.

If spudmn's observation of 6ms interrupt run times is accurate then that would prevent communications being received due to time out. I just tested this theory with 250ms inter char delay in cutecom and failed to get a response so I doubt that's the issue. I doubted it anyway, but this makes it SO utterly unlikely that it's almost impossible.
User avatar (0001152)
Fred (administrator)
2012-01-26 13:38

OK, source of this has been tracked down. This can only happen when the comms ISR runs late and misses the first byte. In particular, only if it gets another interrupt request at an inappropriate time. There is a bit of wrong logic in the error handling code somewhere that causes the flag to go uncleared. On the other hand, I should have this issue cleared up soon :-)

http://stuff.fredcooke.com/CommsISRGoneWild.png [^]
http://stuff.fredcooke.com/WhereTheShitHitTheFan.png [^]
User avatar (0001153)
Fred (administrator)
2012-01-26 16:11

http://stuff.fredcooke.com/Overrun.bug.fixed.png [^]

That lonely bump on channel 3 is an overrun. Before, that would have resulted in dead comms. Will tidy commit and push and close soon.
User avatar (0001155)
Fred (administrator)
2012-01-26 17:07

Fixed in git hash 086624c87760ef02646aaa543dc5f633d4d9d02a


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker