Go Down

Topic: DuinOS: small and simple rtos (Read 51 times) previous topic - next topic

bullethole

I've really embraced using DuinOS for my project.   But I'm noticing some strange behaviors when using serial on an Arduino MEGA.  I have a few tasks, one which reads data from Serial2 which is a GPS device, another which handles reading various sensors (accelerometer, voltage (0-1v)) and processes a tachometer input (the input is handled by an interrupt, which increments a counter, ever 250ms, the handler task runs and converts it to RPM).   All of these tasks queue messages to a handler task which will output through Serial2 to a Arduino Pro Mini which will drive a LCD display.   In the QueueHandler function, if I only do a "Serial.print" of a string, everything works fine.  When I try and Serial.print data from the queued message things just hang.  Things also hang when I try and Serial2.write out to the Pro Mini.

Sometimes the led on Pin 13 blinks, sometimes it goes solid, but in most cases it just remains off.

Anyone have any ideas what may be the issue here.

I'd post the code, but its quite large.  I'm happy to send via email.  Note, I've tried playing with stack sizes on the tasks when they are created going as large as 4K.  No joy there.

juliandasilva

There is a bug reported when printing numbers with the overloaded Serial.Print (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256745982/160#160) and I'm not sure it's caused by a stack problem. Sadly we could not work on it yet.

May I suggest that you try with the v0.1 and the 0018 core? These bugs were not reported for that version, and there was a FreeRTOS kernel change between v0.1 and v0.2. If it works, we may roll-back something for the v0.3.

Thanks!

Regards,
Julián
http://robotgroup.com.ar

bullethole

I actually seem to have fixed the problem when I went back and simplified some of the code.  Things seem to be working fine now.. I will roll back to 0.1 if I run into more problems.  

Mark G.

Julian,

I'm getting back into some Arduino/DuinOS coding after some time off and was wondering if the latest DuinOS rev is compatible with the latest Arduino build (21).  

Thanks.

juliandasilva

Hi, we did not test it yet but I think it's not.
The latest v0.2 is 0018-compatible.

Regards,
Julián
http://robotgroup.com.ar

Go Up