flexSPI operations in QPI mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

flexSPI operations in QPI mode

700 Views
adi2Intel
Contributor III

Hi

continue this topic : Re: Read Id using flex SPI on QPI mode - NXP Community

and with this FLASH device : W25Q128FV pdf, W25Q128FV Description, W25Q128FV Datasheet, W25Q128FV view ::: ALLDATASHEET :::

and with modified code for the SDK example : flexspi_nor_polling_transfer

all single SPI operations works perfect

we are trying to use operations on QPI mode

lets focus on 2 operations: Reading Jedec ID and Program Page

the enable bit on status register is set.

the LUT entry for enabling QPI mode:

[4 * NOR_CMD_LUT_SEQ_IDX_ENTERQPI] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x38, kFLEXSPI_Command_STOP, kFLEXSPI_1PAD, 0)

and the code :

 

 

status_t flexspi_nor_enable_qpi_mode(FLEXSPI_Type *base)
{
	/* Write enable */
		status_t status;
	    flexspi_transfer_t flashXfer;

		status = flexspi_nor_write_enable(base, 0);

		if (status != kStatus_Success)
		{
			return status;
		}

		flashXfer.deviceAddress = 0;
		flashXfer.port          = FLASH_PORT;
		flashXfer.cmdType       = kFLEXSPI_Command;
		flashXfer.SeqNumber     = 1;
		flashXfer.seqIndex      = NOR_CMD_LUT_SEQ_IDX_ENTERQPI;

		status = FLEXSPI_TransferBlocking(base, &flashXfer);

		if (status != kStatus_Success)
		{
			return status;
		}

		//status = flexspi_nor_wait_bus_busy(base);

		/* Do software reset. */
		FLEXSPI_SoftwareReset(base);

		return status;
}

 

 

the busy wait is commented because it stucks\hangs\deadlock.

 

as for Jedec ID, the entry is this:

/* Read ID */
[4 * NOR_CMD_LUT_SEQ_IDX_READID] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD , 0x9F, kFLEXSPI_Command_READ_SDR, kFLEXSPI_4PAD , 0x04)

and the result, after entering QPI mode, is 0x1940ff

the result on Single SPI is 0x1940ef and this is the correct one, with this LUT:

[4 * NOR_CMD_LUT_SEQ_IDX_READID] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD , 0x9F, kFLEXSPI_Command_READ_SDR, kFLEXSPI_1PAD , 0x04)

 

 

2.now we have issue with programming.

using this:

[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_4PAD, 0x02, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_4PAD, 0x20),
[4 * NOR_CMD_LUT_SEQ_IDX_PAGEPROGRAM_SINGLE + 1] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_4PAD, 0x20, kFLEXSPI_Command_STOP, kFLEXSPI_4PAD, 0),

only the first programming command works, after setting 4 byte mode and entering QPI mode.
so I can only program a single page in one run. strange. what is missing? maybe the stop command is not valid?

it actually stuck on busy wait and I need to remove the busy wait command. could it be related?

from spec:

adi2Intel_0-1679327345085.png

adi2Intel_1-1679327373282.png

 

EDIT  : programming issue solved. only JedecID issue left

 

 

 

Thanks

Adi

Intel

 

 

0 Kudos
Reply
1 Reply

684 Views
adi2Intel
Contributor III

Here is a logic analyzer sniff from read ID command :

adi2Intel_0-1679391651585.png

without drawings:

adi2Intel_4-1679391797236.png

 

notice the issue in the manufacture ID that should be EF:

adi2Intel_2-1679391702318.png

so there is an ussue on clock cycle 2

 

0 Kudos
Reply