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 |
|
SPI mode for 5409 (again)
Started by ●January 6, 2001
Reply by ●January 8, 20012001-01-08
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 |