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

RE: Problem with Sync. Ser. Slave Ouput



I guess that you already know that Slave means that no data is sent
until a clock is applied on rxd1 (sync serial port 0) or s1sel_
(sync serial port 1)? I don't think I have tested slave output
mode so there may be dragons in the code.

/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com">mailto:owner-dev-etrax@xxxxxxx.com] On
Behalf Of dwshento@xxxxxxx.ca
Sent: Monday, December 15, 2003 12:24 AM
To: dev-etrax
Subject: 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