Hi!
I am having difficulty getting the QSPI to "loop back" using a jumper from J2[27] to J2[28]. No signals appear on a scope connected to the clock on J2[25]. Code was derived from the sample as follows:
static BYTE RBuffer[10000], TBuffer[10000];
TBuffer[0] = 12;
TBuffer[1] = 12;
TBuffer[2] = 12;
TBuffer[3] = 12;
TBuffer[4] = 12;
RBuffer[0] = 2;
RBuffer[1] = 2;
RBuffer[2] = 2;
RBuffer[3] = 2;
RBuffer[4] = 2;
// Initialize pins needed for QSPI
J2[25].function(PINJ2_25_SPI_CLK);
J2[27].function(PINJ2_27_SPI_DIN);
J2[28].function(PINJ2_28_SPI_DOUT);
// The QSPI functionality can be tested with a simple jumper from J2[27] to J2[28]
// Create and initialize semaphore for QSPI (optional)
OS_SEM QSPI_SEM;
OSSemInit(& QSPI_SEM, 0);
QSPIInit(); // Keep overloaded defaults
int num = 4; // send 4 bytes.
while(1)
{
QSPIStart(TBuffer, RBuffer, num, &QSPI_SEM); // Send data via QSPI
OSSemPend( &QSPI_SEM, 0 ); // Wait for QSPI to complete
OSTimeDly( 20 );
fprintf (stderr, "RX %d %d\r\n", RBuffer[1], RBuffer[2]);
fprintf (stderr, "TX %d %d\r\n", TBuffer[1], TBuffer[2]);
}
The RBuffer values always get changed to 255. Any ideas?
MOD5270 QSPI
MOD5270 QSPI
MOD54415 at http://www.phaseanglemeter.com
Re: MOD5270 QSPI
Do you have anything plugged into the flash card slot?
Re: MOD5270 QSPI
No - I don't have a flash card slot. It is a MOD5270 on a MOD-DEV-70CR.rnixon wrote:Do you have anything plugged into the flash card slot?
MOD54415 at http://www.phaseanglemeter.com
Re: MOD5270 QSPI
Does the unmodified example program work?
Re: MOD5270 QSPI
No - I pretty much pasted it in at one point but got nothing at all back out the serial port.rnixon wrote:Does the unmodified example program work?
MOD54415 at http://www.phaseanglemeter.com
Re: MOD5270 QSPI
I ran a quick test of the example and it works on my system. Running 2.7.3. Initially I had the pins wrong, so I would double check that. I had to look at the silkscreen, since pin 1 is in a different place than I expected.
Re: MOD5270 QSPI
Thanks, I will check that - I didn't see anything on a scope.rnixon wrote:I ran a quick test of the example and it works on my system. Running 2.7.3. Initially I had the pins wrong, so I would double check that. I had to look at the silkscreen, since pin 1 is in a different place than I expected.
I really want to use SPI on a MOD5213 and have a dev kit for that on it's way. I might just wait for it. My applications of the 5270 use the serial port and I2C and I don't have any problem there.
MOD54415 at http://www.phaseanglemeter.com