LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
suart_utils.c File Reference
#include "suart_pru_regs.h"
#include "omapl_suart_board.h"
#include "suart_api.h"
#include "suart_utils.h"
#include "suart_err.h"
#include "pru.h"
#include "csl/soc_OMAPL138.h"
#include "csl/cslr_dspintc.h"
#include "csl/cslr_mcasp.h"
#include "csl/cslr_psc_OMAPL138.h"

Go to the source code of this file.

Macros

#define SUART_TRX_DIV_CONF_SZ   4
 
#define MCASP_PSC_OFFSET   (CSL_PSC_MCASP0)
 

Functions

void suart_mcasp_reset (arm_pru_iomap *pru_arm_iomap)
 
void suart_mcasp_config (unsigned int mcasp_addr, unsigned int txBaudValue, unsigned int rxBaudValue, unsigned int oversampling, arm_pru_iomap *pru_arm_iomap)
 
void suart_mcasp_tx_serialzier_set (unsigned int serializerNum, arm_pru_iomap *pru_arm_iomap)
 
short suart_asp_baud_set (unsigned int txBaudValue, unsigned int rxBaudValue, unsigned int oversampling, arm_pru_iomap *pru_arm_iomap)
 
short suart_asp_serializer_deactivate (unsigned short u16srNum, arm_pru_iomap *pru_arm_iomap)
 
void suart_mcasp_psc_enable (unsigned int psc1_addr)
 
void suart_mcasp_psc_disable (unsigned int psc1_addr)
 

Variables

unsigned int lt_tx_baud_rate [][SUART_TRX_DIV_CONF_SZ]
 
unsigned int lt_rx_8x_baud_rate [][SUART_TRX_DIV_CONF_SZ]
 
unsigned int lt_rx_16x_baud_rate [][SUART_TRX_DIV_CONF_SZ]
 

Macro Definition Documentation

#define MCASP_PSC_OFFSET   (CSL_PSC_MCASP0)

Definition at line 416 of file suart_utils.c.

#define SUART_TRX_DIV_CONF_SZ   4

Definition at line 35 of file suart_utils.c.

Function Documentation

short suart_asp_baud_set ( unsigned int  txBaudValue,
unsigned int  rxBaudValue,
unsigned int  oversampling,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 374 of file suart_utils.c.

short suart_asp_serializer_deactivate ( unsigned short  u16srNum,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 392 of file suart_utils.c.

void suart_mcasp_config ( unsigned int  mcasp_addr,
unsigned int  txBaudValue,
unsigned int  rxBaudValue,
unsigned int  oversampling,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 154 of file suart_utils.c.

void suart_mcasp_psc_disable ( unsigned int  psc1_addr)

Definition at line 455 of file suart_utils.c.

void suart_mcasp_psc_enable ( unsigned int  psc1_addr)

Definition at line 426 of file suart_utils.c.

void suart_mcasp_reset ( arm_pru_iomap pru_arm_iomap)

Definition at line 140 of file suart_utils.c.

void suart_mcasp_tx_serialzier_set ( unsigned int  serializerNum,
arm_pru_iomap pru_arm_iomap 
)

Definition at line 252 of file suart_utils.c.

Variable Documentation

unsigned int lt_rx_16x_baud_rate[][SUART_TRX_DIV_CONF_SZ]
Initial value:
= {
{300, 5000, 1, 2500},
{600, 2500, 0, 2500},
{1800, 833, 0, 833},
{2400, 625, 0, 625},
{4800, 312, 0, 312},
{7200, 208, 0, 208},
{9600, 156, 0, 156},
{14400, 104, 0, 104},
{19200, 78, 0, 78},
{38400, 39, 0, 39},
{57600, 26, 0, 26},
{115200, 13, 0, 13},
{230400, 6, 0, 6}
}

Definition at line 114 of file suart_utils.c.

unsigned int lt_rx_8x_baud_rate[][SUART_TRX_DIV_CONF_SZ]
Initial value:
= {
{300, 10000, 4, 2000},
{600, 5000, 1, 2500},
{1800, 1667, 0, 1667},
{2400, 1250, 0, 1250},
{7200, 417, 0, 417},
{4800, 625, 0, 625},
{9600, 312, 0, 312},
{14400, 208, 0, 208},
{19200, 156, 0, 156},
{38400, 78, 0, 78},
{57600, 52, 0, 52},
{115200, 26, 0, 26},
{230400, 13, 0, 13}
}

Definition at line 85 of file suart_utils.c.

unsigned int lt_tx_baud_rate[][SUART_TRX_DIV_CONF_SZ]
Initial value:
= {
{300, 80000, 24, 3200},
{600, 40000, 15, 2500},
{1800, 13333, 10, 1212},
{2400, 10000, 4, 2000},
{4800, 5000, 1, 2500},
{7200, 3333, 0, 3333},
{9600, 2500, 0, 2500},
{14400, 1666, 0, 1666},
{19200, 1250, 0, 1250},
{38400, 625, 0, 625},
{57600, 416, 0, 416},
{115200, 208, 0, 208},
{230400, 104, 0, 104}
}

Definition at line 56 of file suart_utils.c.