![]() ![]() The tracking of this bug turned out to be so adventurous and involved that I decided to write a tutorial about it. ![]() Please note that this will only occur *sometimes*, however I could almost consistently repeat it after several retries of sending a command to the device. This is garbage because 92,162,62,180 are note the ASCII chars for ‘stop’. The bug was caught in the act on the screenshot below, the arrows show the data I actually sent ‘stop’ followed by LF (0xA) char and the character codes (in decimal) actually received. This wouldn’t be so discouraging if the data received would be the same, or at least this would happen always not *sometimes*. The firmware was written in C18, using the USB stack from Microchip Applications Libraries.Įverything worked well until I suddenly discovered that while sending data over the CDC port from the computer to the device, the device would *sometimes* receive garbage data instead of what I sent. Ah, the joy of firmware debugging! I’ve been working on a USB firmware for my new upcoming product that involves a dual traditional TTL (Serial) and a USB-TO-SERIAL converter (CDC Communication Port) implemented in the same firmware. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |