Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000099 [Firmware] Serial Communications block always 2009-02-22 16:34 2009-02-22 18:24
Reporter Fred View Status public  
Assigned To Fred
Priority urgent Resolution open  
Status assigned   Product Version
Summary 0000099: Corrupt packets are sent when RPM interrupts are active
Description Bad 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.
Additional Information Many 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
Tags No tags attached.
Issue Type Bug
Attached Files

- Relationships

-  Notes
(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.
(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.
(0000157)
Fred (administrator)
2009-02-22 17:26

Removal of fuel code didn't help either. ADC sampling is next to go.
(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.
(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.

- Issue History
Date Modified Username Field Change
2009-02-22 16:34 Fred New Issue
2009-02-22 16:34 Fred Status new => assigned
2009-02-22 16:34 Fred Assigned To => Fred
2009-02-22 16:34 Fred Issue Type => Bug
2009-02-22 16:41 Fred Note Added: 0000155
2009-02-22 16:52 Fred Note Added: 0000156
2009-02-22 17:26 Fred Note Added: 0000157
2009-02-22 17:48 Fred Note Added: 0000158
2009-02-22 18:24 Fred Note Added: 0000159


Mantis 1.1.7[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker