cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI Configuration using SST26VF032B-104I

THIHA KYAW
Associate III
Posted on February 20, 2018 at 05:29

Hi STM,

I have some questions for QSPI configuration using SST26VF032B-104I (Max clock = 104 MHz)

I am getting QSPI_SUSPENDED Error when I call BSP_QSPI_GetStatus().

Configuration is as follow;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

QSPIHandle.Init.ClockPrescaler = 2; /* QSPI freq = 216 MHz/(1+2) = 72 Mhz */

QSPIHandle.Init.FifoThreshold = 4;

QSPIHandle.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;

QSPIHandle.Init.FlashSize = POSITION_VAL(SST26VF032B_FLASH_SIZE) - 1;

QSPIHandle.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_2_CYCLE; /* Min 30ns for nonRead */

QSPIHandle.Init.ClockMode = QSPI_CLOCK_MODE_0;

QSPIHandle.Init.FlashID = QSPI_FLASH_ID_1;

QSPIHandle.Init.DualFlash = QSPI_DUALFLASH_DISABLE;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I don't know what is wrong.

Please advise me.

Thanks.

Regards,

Thiha Kyaw

1 REPLY 1
THIHA KYAW
Associate III
Posted on February 21, 2018 at 04:27

Hi,

I debugged it and faced the problem.

The error is at Configuring automatic polling mode to wait the QUADEN bit=1 and WIP bit=0 in QSPI_EnterMemory_QPI.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/* Configure automatic polling mode to wait the QUADEN bit=1 and WIP bit=0 */

s_config.Match = MX25L512_SR_QUADEN; // Same as SST26VF032B

s_config.Mask = MX25L512_SR_QUADEN|MX25L512_SR_WIP; 

// Same as 

SST26VF032B

s_config.MatchMode = QSPI_MATCH_MODE_AND;

s_config.StatusBytesSize = 1;

s_config.Interval = 0x10;

s_config.AutomaticStop = QSPI_AUTOMATIC_STOP_ENABLE;

s_command.InstructionMode = QSPI_INSTRUCTION_4_LINES;

s_command.Instruction = READ_STATUS_REG_CMD;

s_command.DataMode = QSPI_DATA_4_LINES;

if (HAL_QSPI_AutoPolling(hqspi, &s_command, &s_config, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)

{

return QSPI_ERROR;

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I believe some configuration is wrong. Please help.

Thank you.

Regards,

Thiha Kyaw