Page 1 of 1

USB Serial Issue

Posted: Sun Mar 26, 2017 6:23 am
by GTF
Hello All,

I have an issue where a USB Serial "SendString" does not occur when it should. The macro includes a series of SendString's followed by a loop that repeats for about 15 seconds to do some ADC reads. The last string send("star\n") prior to the loop almost always occurs only after the loop exits. If I add another SendString("dummy"), it is usually not sent until after the loop exits, but "star\n" is sent when it should be. The only interrupt in my code is UART RX and it makes no difference if I disable it. WDT disable also makes no difference. This is running on a 18F45K50 with 99% program memory used, the first 0x800 taken up by a bootloader. Otherwise the code is running well and does everything it should if I add the one extra SendString that is a "do nothing" when received on the PC side.

Any thoughts on what could cause this behavior?

Re: USB Serial Issue

Posted: Tue Mar 28, 2017 3:47 am
by GTF
Reducing the USB Serial TX Buffer to 8 Bytes fixed this.