QSPI Chip Select pin problem on SB70LC [RESOLVED]

Discussion to talk about hardware related topics only.
Post Reply
jyoung
Posts: 2
Joined: Thu Apr 08, 2010 3:53 pm

QSPI Chip Select pin problem on SB70LC [RESOLVED]

Post by jyoung »

We are having a problem sending data on the QSPI bus with a SB70LC. Our understanding is that the Chip Select line will change states when we send data based upon the values of the "peripheralChipSelects" and the "chipSelectPolarity" parameters to the QSPIInit() function. We have varied these parameters but the Chip Select line always stays high (before, during and after transfers). We put our code (using AutoUpdate) on two boards and seen the same behavior (one board in our system and another fresh out of the box with the Development board attached to provide power).

We are working with the following software release tag: Rel24_rc2_L2eBeta, and hardware: PCB assy "SB70LC rev 1.1a" / Board "rev 1.2".

Here is some code:

Code: Select all

static BYTE RXBuffer[63], TXBuffer[63];

// Initialize pins needed for QSPI
Pins[7].function(PIN7_SPI_CLK);
Pins[6].function(PIN6_SPI_DIN);
Pins[4].function(PIN4_SPI_DOUT);

OS_SEM QSPI_SEM;
OSSemInit(& QSPI_SEM, 0);

QSPIInit(2000000, 8, 0x0, 1, 0, 1, FALSE, 0x0, 0x0);
_FillSPIBuffer(TXBuffer, "A00A");  // I wrote this to convert a hex string to an array of bytes

// begin loop omitted

    QSPIStart(TXBuffer, RXBuffer, 63, &QSPI_SEM);
    OSSemPend( &QSPI_SEM, 0 );

// end loop omitted
Can someone verify that the Chip Select line is supposed to toggle as I have programmed it (should I have initialized the CS pin?)? If I messed up the code, can someone kindly point me in the right direction to get the Chip Select line to assert (active low) during a data transfer?

Thank you,

Jyoung
Last edited by jyoung on Fri Apr 09, 2010 2:34 pm, edited 1 time in total.
jyoung
Posts: 2
Joined: Thu Apr 08, 2010 3:53 pm

Re: QSPI Chip Select pin problem on SB70LC

Post by jyoung »

I fixed this problem by adding:

Code: Select all

Pins[3].function(PIN3_SPI_CS0);
As a side note we ended up using 0x01 for the final two delay parameters in the init as follows:

Code: Select all

QSPIInit(2000000, 8, 0, 1, 0, 1, FALSE, 0x01, 0x01);
Also, be very careful trusting the default parameters of QSPIInit() !!! I fould discrepancies between what the header file comment shows (which you can see during Mouseover) and the actual values in the code.

If anyone has any words of wisdom that they want to add regarding the QSPI operation on the SB70LC, I would love to hear them, as I will be checking this thread occasionally in the future.

Thanks,
Jyoung
Post Reply