SSP MISO Repeating Itself
2006-02-08 by jeffbranc01
Hello, Forgive me for being so new to the SPI/SSP peripheral. I'm having a problem with my SSP port (LPC2220 processor, but probably the same for other LPC2000 processors having this feature). My hardware configuration is the following: - LPC2220's SSP configured for slave operation (16 bit data transfers), SCLK and SSEL supplied by external CODEC. - For testing, currently my processor's MOSI and MISO lines are floating. - After initial reset, CODEC is sending SCLK and SSEL signals fine, and the processor's MISO line has nothing on it. - CODEC's reset line is connected to processor GPIO line. When this line is held low CODEC's SCLK and SSEL lines are held low. When I attempt to transmit data (a 16-bit short) once out of the processor's MISO line by placing data into the SSP Data Register (SSPDR) I can see the data go out just fine. I can do this multiple times and still the data is fine out the MISO line returning to a low voltage. The problem that I'm encountering is that every time when I attempt to transmit the data on the eighth time, suddenly the MISO line starts continually transmitting whatever was last placed in the SSPDR register indefinitely, with a period that matches the SSEL signal coming from the CODEC. Also, while it's doing this, if I do go ahead and change the value of the SSPDR it will switch and continually transmit that data instead. What's even more amazing is that even when terminating the JTAG debug session the same data is still transmitted out the MISO port. It will go on transmitting until I finally low assert the RESET line on the processor. This will happen no matter how fast or slow I transmit these eight shorts whether back to back or with a four second interval in between them. Also, when I hold the CODEC's reset line low (disabling the SCLK and SSEL signals) obviously the MISO line will discontinue the transmission of continuous data. As soon as I let this RESET line go back high, however, the SCLK and SSEL signals will be re-applied and the processors MISO pin will continue transmitting the data it had before. Some more info: - SSPCR0 FRF=0x00. (SPI mode). - SSPCR1 Loop Back Mode (LBM) is set and verified to 0 (loop-back mode off). - SSPCR1 Master/Slave (MS) is set and verified to 1 (slave mode). - After initialization, the CODEC runs in continuous mode (meaning SCLK and SSEL lines are always going at the same periods regardless of whether there is data to be sent or not (but I still don't have the MISO and MOSI lines on the processor connected yet either). - All interrupts are disabled during these tests and SSPIMSC=0x0000. Anyone have any idea of what might be happening? I thank you in advance for your help. Jeff.