Can OpenSerial() supports for all UARTs in MOD54415?

Discussion to talk about hardware related topics only.
Post Reply
leetehui
Posts: 10
Joined: Thu Aug 27, 2009 2:50 am

Can OpenSerial() supports for all UARTs in MOD54415?

Post by leetehui »

There are 8 UARTs in MOD54415. Can OpenSerial() function support all these UARTs?
Robert Lee
National Synchrotron Radiation Research Center, Taiwan
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Can OpenSerial() supports for all UARTs in MOD54415?

Post by rnixon »

If you look in the serial.cpp file is has the code below, so it looks like it does:

/**
* Opens a serial port.
*/
int OpenSerial( int portnum, unsigned int baudrate, int stop_bits, int data_bits, parity_mode parity )
{
InitializeMaps();

if(portnum<0) return SERIAL_ERR_NOSUCH_PORT;
if(portnum>9) return SERIAL_ERR_NOSUCH_PORT;
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Can OpenSerial() supports for all UARTs in MOD54415?

Post by pbreed »

Make sure you do the pin assignments if you are using more than the first three ports...

#include<pins.h>

IE J2[xx].function(xx);

Look in nburn\mod54415\include\pinconstants.h to see what valid values of XX are.

Paul
Post Reply