Dear group members,
I am running uClinux 2.4.x kernel (20040408 distribution) on Arcturus uCdimm (uCevolution board) and trying to test the SPI1 bus.
On sending 0xFF bytes repeatedly on the SPI1 bus, I am not able to observe any clock transitions on the SPICLK1 line(on a scope and multimeter). It changes from high to low only once at the very beginning and that's it, remains constant.
Also, the SPI output line is constantly high whether I send 0xFF or
0x00 data. There is an SPI enable line (general purpose I/O pin) that is set correctly though to high.Can somebody with experience help me out here? Am I missing something here? We have not connected the slave device and the uCdimm runs as SPI master at fastest possible 4MHz (SYSCLK/8).
PLease review the C code (for more details) that I wrote to send a string of characters on the bus.
Thanks in advance, Sriram
void spiInit() {
/* Since General Purpose I/O Port J 0-3 pins are multiplexed with SPI1 bus pins, clear them to SPI mode */ /* by modifying the PJSEL register as follows */ PJSEL &= 0xF0;
//Initialize SPI Control/Status register SPICONT1 = 0;
//Intialize remaining bits of the control register SPICONT1 |= 0x0407; // Mode is set to master, Data ready signal is not used, SS Polarity and waveform select bits cleared, bit count is
//Set ENABLE bit in the SPICONT1 register SPICONT1 |= 0x0200;
/* Initialize the SPI1 sample period control register * Make the number of clock periods inserted between data transactions in master mode equal to '1'.
*/ SPISPC = 0x01; }/* Function: Static function to send given data over SPI1 bus. Parameters: sendData - Data to be transmitted, numSendBytes - Number of bytes to be sent, sp - Status pointer Return value: None
*/ static void spi1RawSend(unsigned char *sendData, int numSendBytes, SPIStatus_t *sp) {unsigned int count;
for (count=0; count