UART stutters on startup

The SparqEE CELLv1.0 device.
User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby donjohnii » Sat Apr 22, 2017 2:53 am


User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby donjohnii » Sat Apr 22, 2017 2:55 am


User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby donjohnii » Sat Apr 22, 2017 3:00 am


Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby Miq1 » Sat Apr 22, 2017 7:46 am


Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby Miq1 » Sat Apr 22, 2017 8:01 am


Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby Miq1 » Sat Apr 22, 2017 8:11 am


Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby Miq1 » Sat Apr 22, 2017 9:32 am


User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby donjohnii » Sat Apr 22, 2017 2:14 pm


User avatar
donjohnii
Site Admin
Posts: 686
Joined: Tue Jul 30, 2013 2:19 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby donjohnii » Sat Apr 22, 2017 2:27 pm

Here's where you're going to get into issues with the Arduino...

I've tested extensively on the Arduino and RasPi. The arduino, when dealing with too much data or too quick of data, will start to miss... just like any system that doesn't have enough speed/buffer support... that's just inherent in the HW and something you have to work with. The misses you show are consistent with the Arduino not being able to service the buffer quick enough. It is possible that I didn't test a ton of data with this simple script like you're doing... <suggestion that I did test when running into this issue in next paragraph>

BUT there's also - anytime your printing for debug purposes, it's going to run your system slower and eat-up CPU. So something I've done in the past with the Arduino - push your debug to a buffer and only print periodically to see if it's actually a problem with your arduino/cell connection vs. just a debug issue because of the printing cost/time, which it could definitely be.

I don't know what you meant by - you brought the baud down so you'd have a few milliseconds between reads. I may be confused about your statement, or I may not, but a higher baud rate gives you more BW. The HW buffers you're using will take care of processing the characters but they'll overrun if not serviced quick enough. Maybe you mean that as an individual character is coming across, before the ISR is tripped, you'll have more time to do other stuff with a lower baud rate... I know this makes some sense, but it sounds jenky for some reason... I'll have to think about this one. I wouldn't rely on this type of build, but who knows, could work.

I would suggest to push your input to a buffer so the HW buffer wouldn't overflow for the UART. That being said, you have to make sure your application code doesn't overrun your underlying buffer length. In this way, there wouldn't be a forceful exercise to print out to empty the buffer but a quicker opportunity to cache the data in a local buffer then take the time to print it later, which is the most time intense exercise.

Miq1
Posts: 22
Joined: Mon Oct 17, 2016 10:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UART stutters on startup

Postby Miq1 » Sun Apr 23, 2017 3:25 am



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “CELLv1.0”

Who is online

Users browsing this forum: No registered users and 1 guest