Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000099FirmwareSerial Commspublic2009-02-22 16:342011-06-28 12:48
ReporterFred 
Assigned ToFred 
PriorityurgentSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version0.1.0-UltraJizzFixed in Version 
Summary0000099: Corrupt packets are sent when RPM interrupts are active
DescriptionBad checksums are received by PC side software when the RPM on the device is non-zero.

There are a few reasons that I can think of that this is happening.

1) Delay in serial interrupt handling is causing bytes to be corrupted or lost due to timing.
2) Buffer data is being corrupted by the RPM interrupts
3) A concurrency issue is causing corruption of the checksumming routine when it runs

I can't think of any others right now, but there may be some.
Steps To ReproduceReceive data stream from device
Apply RPM signal with JimStim to device
Additional InformationMany of the received checksums are zero or all ones. This is suspicious IMO.

Packet number 11236 ending of length 102 at char number 1117861 failed checksum! Received 0 Calculated 246
Packet number 11237 ending of length 102 at char number 1117965 failed checksum! Received 255 Calculated 134
Packet number 11239 ending of length 102 at char number 1118077 failed checksum! Received 0 Calculated 228
Packet number 11240 ending of length 6 at char number 1118085 failed checksum! Received 0 Calculated 82
Packet number 11242 ending of length 102 at char number 1118197 failed checksum! Received 255 Calculated 152
Packet number 11244 ending of length 102 at char number 1118309 failed checksum! Received 0 Calculated 64
Packet number 11245 ending of length 102 at char number 1118413 failed checksum! Received 0 Calculated 219
Packet number 11246 ending of length 102 at char number 1118517 failed checksum! Received 0 Calculated 200
Packet number 11248 ending of length 102 at char number 1118629 failed checksum! Received 0 Calculated 219
Packet number 11249 ending of length 6 at char number 1118637 failed checksum! Received 0 Calculated 82
Packet number 11250 ending of length 102 at char number 1118741 failed checksum! Received 255 Calculated 4
Packet number 11252 ending of length 102 at char number 1118853 failed checksum! Received 255 Calculated 156
Packet number 11253 ending of length 102 at char number 1118957 failed checksum! Received 0 Calculated 249
Packet number 11254 ending of length 102 at char number 1119061 failed checksum! Received 190 Calculated 54
Packet number 11256 ending of length 102 at char number 1119173 failed checksum! Received 0 Calculated 60
Packet number 11257 ending of length 102 at char number 1119277 failed checksum! Received 0 Calculated 192
Packet number 11258 ending of length 6 at char number 1119285 failed checksum! Received 0 Calculated 1
Packet number 11259 ending of length 102 at char number 1119389 failed checksum! Received 0 Calculated 31
Packet number 11261 ending of length 102 at char number 1119501 failed checksum! Received 0 Calculated 1
Packet number 11263 ending of length 102 at char number 1119613 failed checksum! Received 0 Calculated 145
Packet number 11264 ending of length 102 at char number 1119717 failed checksum! Received 0 Calculated 86
Packet number 11266 ending of length 102 at char number 1119829 failed checksum! Received 0 Calculated 251
Packet number 11267 ending of length 102 at char number 1119933 failed checksum! Received 255 Calculated 1
Packet number 11268 ending of length 102 at char number 1120037 failed checksum! Received 0 Calculated 247
Packet number 11270 ending of length 102 at char number 1120253 failed checksum! Received 0 Calculated 33
TagsNo tags attached.
FirmwareVersion
Issue TypeBug
Risk of Breakagevery low
Attached Files

- Relationships

-  Notes
User avatar (0000155)
Fred (administrator)
2009-02-22 16:41

The issue is with either my Nippon Denso code, OR the ignition or fuel code. I tried to reproduce the issue with Phil's 36-1 decoder and could not. Most likely the ignition PIT code is broken and corrupting memory. I will try to disable this next.
User avatar (0000156)
Fred (administrator)
2009-02-22 16:52

Removing the ignition code did not help, I'll have to try removing the fuel code and putting ignition back. Then I'll remove both. If it still occurs then I'll look for the reason why it is happening in the remaining code. If that stops it I'll put a sleep function in to see if it is a sheer run time thing.
User avatar (0000157)
Fred (administrator)
2009-02-22 17:26

Removal of fuel code didn't help either. ADC sampling is next to go.
User avatar (0000158)
Fred (administrator)
2009-02-22 17:48

ADC sampling based on memcpy() is the cause!! I'll replace it with an old one that uses a loop or direct value by value copy and see where it gets me. I'll compare size for each too. I meant to bench mark those ages ago but never got around to it.
User avatar (0000159)
Fred (administrator)
2009-02-22 18:24

This is solved and pushed up, I'll close it once I figure out exactly why memcpy was screwing things up and post here about that.


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker