Bita Sobhani

PLEASE REPLY.............NCB 1321x baud rate

Discussion created by Bita Sobhani on Mar 3, 2009
Latest reply on Mar 12, 2009 by Mads Westergreen

Hi all

I want to connect an optical port with baud rate 300 to 1321x NCB board. But the board baud rate can only be set from 1200 to 38400 (as below). How can I change the baud rate to 300?

Thanks

 

/* SCI baud rate = BUSCLK/(16?Baud rate)
 * Note that not all baud rates work for all clock rates. The actual baud rate
 * may deviate too much from the RS232 specification.
 */
#ifndef gSystemClock_d
#define gSystemClock_d     16           /* 16 MHz. */
#endif

typedef uint16_t UartBaudRate_t;
#if gSystemClock_d == 8
#define gUARTBaudRate1200_c     ((UartBaudRate_t) 0x01A1)
#define gUARTBaudRate2400_c     ((UartBaudRate_t) 0x00D0)
#define gUARTBaudRate4800_c     ((UartBaudRate_t) 0x0068)
#define gUARTBaudRate9600_c     ((UartBaudRate_t) 0x0034)
#define gUARTBaudRate19200_c    ((UartBaudRate_t) 0x001A)
#define gUARTBaudRate38400_c    ((UartBaudRate_t) 0x0011)
#define gUARTBaudRate57600_c    ((UartBaudRate_t) 0x0009)
#define gUARTBaudRate115200_c   ((UartBaudRate_t) 0x0004)   /* Might not work for all clients */
#endif

#if gSystemClock_d == 12
#define gUARTBaudRate1200_c     ((UartBaudRate_t) 0x0271)
#define gUARTBaudRate2400_c     ((UartBaudRate_t) 0x0139)
#define gUARTBaudRate4800_c     ((UartBaudRate_t) 0x009C)
#define gUARTBaudRate9600_c     ((UartBaudRate_t) 0x004E)
#define gUARTBaudRate19200_c    ((UartBaudRate_t) 0x0027)
#define gUARTBaudRate38400_c    ((UartBaudRate_t) 0x0014)
#define gUARTBaudRate57600_c    ((UartBaudRate_t) 0x000D)
#define gUARTBaudRate115200_c   ((UartBaudRate_t) 0x0007)
#endif

#if gSystemClock_d == 16
#define gUARTBaudRate1200_c     ((UartBaudRate_t) 0x0341)
#define gUARTBaudRate2400_c     ((UartBaudRate_t) 0x01A1)
#define gUARTBaudRate4800_c     ((UartBaudRate_t) 0x00D0)
#define gUARTBaudRate9600_c     ((UartBaudRate_t) 0x0068)
#define gUARTBaudRate19200_c    ((UartBaudRate_t) 0x0034)
#define gUARTBaudRate38400_c    ((UartBaudRate_t) 0x001A)
#define gUARTBaudRate57600_c    ((UartBaudRate_t) 0x0011)
#define gUARTBaudRate115200_c   ((UartBaudRate_t) 0x0009)   /* Might not work for all clients */
#endif

#if gSystemClock_d == 16780
#define gUARTBaudRate1200_c     ((UartBaudRate_t) 0x036A)
#define gUARTBaudRate2400_c     ((UartBaudRate_t) 0x01B5)
#define gUARTBaudRate4800_c     ((UartBaudRate_t) 0x00DA)
#define gUARTBaudRate9600_c     ((UartBaudRate_t) 0x006D)
#define gUARTBaudRate19200_c    ((UartBaudRate_t) 0x0037)
#define gUARTBaudRate38400_c    ((UartBaudRate_t) 0x001B)
#define gUARTBaudRate57600_c    ((UartBaudRate_t) 0x0012)
#define gUARTBaudRate115200_c   ((UartBaudRate_t) 0x0009)
#endif


/*list of possible baudrates */
#define  Baudrate_1200   gUARTBaudRate1200_c
#define  Baudrate_2400   gUARTBaudRate2400_c
#define  Baudrate_4800   gUARTBaudRate4800_c
#define  Baudrate_9600   gUARTBaudRate9600_c
#define  Baudrate_19200  gUARTBaudRate19200_c
#define  Baudrate_38400  gUARTBaudRate38400_c
#define  Baudrate_57600  gUARTBaudRate57600_c
#define  Baudrate_115200 gUARTBaudRate115200_c

/* Default baud rate. */

#ifndef gUartDefaultBaud_c
#define gUartDefaultBaud_c  Baudrate_38400
#endif

Outcomes