[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Sync. Ser. Slave Ouput




hello,

I am using sync_ser0 with DMA and I am having problems.

I have no trouble using the sync serial port in Master Output mode.  However, 
when I try to use Slave Output the data does not send.

The code I use to set up the port for both modes is shown below.

Am I missing something?



//Set up master output mode
if ( strcmp(mode,"MO") == 0 ) {
	ioctl (fd1, SSP_SPI,	SPI_MASTER);
	ioctl (fd1, SSP_MODE,	MASTER_OUTPUT);
	ioctl (fd1, SSP_SPEED,	SSP1200);
	ioctl (fd1, SSP_FRAME_SYNC, SYNC_ON);
	ioctl (fd1, SSP_FRAME_SYNC, NORMAL_SYNC);
	ioctl (fd1, SSP_FRAME_SYNC, WORD_SIZE_8);	
	ioctl (fd1, SSP_FRAME_SYNC, FLOW_CONTROL_DISABLE);
	ioctl (fd1, SSP_FRAME_SYNC, CLOCK_NOT_GATED);

//Set up slave output
} else if ( strcmp(mode,"SO") == 0 ) {
	ioctl (fd1, SSP_SPI,	SPI_SLAVE);	
	ioctl (fd1, SSP_MODE,	SLAVE_OUTPUT);	
	ioctl (fd1, SSP_FRAME_SYNC, SYNC_OFF);
	ioctl (fd1, SSP_FRAME_SYNC, WORD_SIZE_8);
	ioctl (fd1, SSP_FRAME_SYNC, FLOW_CONTROL_DISABLE);
	ioctl (fd1, SSP_FRAME_SYNC, CLOCK_NOT_GATED);
}



----------------------------------------
This mail sent through www.mywaterloo.ca