Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
The receive part of the SPI protocol does not work for me.. I have set up my registers exactly as described in the manual. In the spi mode are we supposed to read from the serial port like x = *((unsigned char *) 0x31) should this generate chip select and clock signals. I have noticed that this doesnt. So what I did was to generate these signals using a write and I noticed that the value to be read back was in DRR1..the MCBSP window in Code composer tells me this. however if I try to read the value by doing x = *((unsigned char *) 0x31) I get some junk values. Examining the memory using code composer also shows me the correct value... Thanks, nikhil |
|
|
|
On Sat, 06 Jan 2001 07:23:12 -0000, you wrote:
>The receive part of the SPI protocol does not work for me.. >I have set up my registers exactly as described in the manual. In the >spi mode are we supposed to read from the serial port like > x = *((unsigned char *) 0x31) >should this generate chip select and clock signals. I have noticed >that this doesnt. In c54regs.h it has this definition for DXR1 - #define DXR1 *(volatile unsigned int *)0x31 You have to define it as a volatile so that the compiler doesn't try to optimize it in some way. Take a look at the definitions in the included header files, there are a whole bunch of useful macros, etc. Brian ----------------------------------------------------- Brian C. Lane Programmer www.shinemicro.com RF & Microcontroller Design |