Page 1 of 1

Can OpenSerial() supports for all UARTs in MOD54415?

Posted: Mon Sep 10, 2012 3:41 am
by leetehui
There are 8 UARTs in MOD54415. Can OpenSerial() function support all these UARTs?

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

Posted: Mon Sep 10, 2012 10:07 am
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;

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

Posted: Mon Sep 10, 2012 11:04 am
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