USB Serial Issue

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Has thanked: 20 times
Been thanked: 52 times
Contact:

USB Serial Issue

Post 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?
Attachments
USB Serial.png
(12.98 KiB) Downloaded 2254 times

GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Has thanked: 20 times
Been thanked: 52 times
Contact:

Re: USB Serial Issue

Post by GTF »

Reducing the USB Serial TX Buffer to 8 Bytes fixed this.

Post Reply