MOD54415 Example Serial2Serial Problems

Discussion to talk about software related topics only.
Post Reply
sam512bb
Posts: 2
Joined: Tue Jul 10, 2012 11:40 am

MOD54415 Example Serial2Serial Problems

Post by sam512bb »

Good day,

I recently purchased one of the MOD54415 dev kits and when I create a project and use the MOD54415 Serial2Serial example code, the output serial stream is not the correct baud rate (I get framing errors): My guess is that the Netburner library where the OpenSerial Function is located does not take into the MOD54415's clock rate and so the routine's passed baud rate parameter is incorrect.

Has anyone else experienced this and/or is there a way to set the clock rate, etc of the Serial port routines?

BTW... I am using the latest (I believe so anyway) dev kit files, as I downloaded them on July 4, 2012.

Cheers,

Sam
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 Example Serial2Serial Problems

Post by pbreed »

What baud rate are you trying to hit?

I've used the NAN54415 to interface to a whole bunch of serial devices with no issues.
(The serial driver in the MOD5441X is the same)
sam512bb
Posts: 2
Joined: Tue Jul 10, 2012 11:40 am

Re: MOD54415 Example Serial2Serial Problems

Post by sam512bb »

Good day pbreed,

I was trying 19200.

However, I did a bit more playing around and this is what I found...

1. This issue appears to only affect Port 0 and not Port 1 or 2.
2. This issue corrects itself once I send repeated "WriteString" functions. For example, the first Writestring results in a non-standard output baud rate... subsequent "writestring" calls seems to correct the issue...I did not check how many times, but I could if anyone is interested.

Consequently, this is not a big deal, as I can work around this issue and so I am still good to go for my development.

Cheers,

Sam
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: MOD54415 Example Serial2Serial Problems

Post by tod »

I think the problem is the buffer doesn't flush. I put a std::cout<< std::endl; prior to the SerialClose() statements and the output cleaned up. Alternately adding an OSTimeDly(5) worked well.
Post Reply