Skip to main content
DavePfz
Associate III
July 6, 2026
Solved

QSPI_EnableQuad() routine

  • July 6, 2026
  • 3 replies
  • 97 views

I’ve been trying to adapt the code from the STM32WB5MM-DK QSPI_ReadWrite_IT example to a Renesas part. However, I have not been able to get it into Quad mode. For this part I need to write 0x02 into register 0x31 as I understand the data sheet.

From monitoring the status register I can see that the write enable bit gets set and cleared, but the QE (quad enable) bit doesn’t get set.

Also, in reviewing the code for the DK, I don’t see code to set the quad enable bit as per the Infineon S25FL128S data sheet.

In searching the support forums, I see references to a routine called QSPI_QuadEnable, but I have not been able to find corresponding code.

I’m obviously missing something. Can someone point me in the right direction - either specific to this board or a more generic solution?

Thanks

Best answer by KDJEM.1

Hello ​@DavePfz ;

 

Yes, I referred to HAL QSPI drivers.

For more information about HAL drivers, I recommend you to look at UM2442.

Thank you.

Kaouthar

3 replies

KDJEM.1
ST Technical Moderator
July 8, 2026

Hello ​@DavePfz ;

 

You can use __HAL_QSPI_ENABLE to enable the QSPI peripheral.

/** @brief  Enable the QSPI peripheral.
* @param __HANDLE__ specifies the QSPI Handle.
* @retval None
*/
#define __HAL_QSPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
DavePfz
DavePfzAuthor
Associate III
July 8, 2026

I’m a little confused. I believe that you are referring to the SSTM32 QSPI peripheral itself.

My interest is in setting the QUAD_EN bit in the NOR Flash memory. Usually bit 1 of one of the control registers. In the case of the Renesas chip it is called Status Register 2. (Infineon calls it Control Register 1, or CR1.)

I have been able to write that register and get the bit set, but I have not been able to read data from the Flash. I find I am not clear on the delineation between when HAL_QSPI_Command() does or doesn’t result in an SPI transaction. Maybe someone can clear this up for me. It looks like:

If the sCommand type specifies no address and no data, only the value specified in Instruction field is sent out.

However, if either the address or data fields are specified, then the Instruction (along with the address/data) are sent out when a subsequent HAL_QSPI_Transmit() or HAL_QSPI_Receive() procedure is called.

Am I interpreting this right?

KDJEM.1
KDJEM.1Best answer
ST Technical Moderator
July 13, 2026

Hello ​@DavePfz ;

 

Yes, I referred to HAL QSPI drivers.

For more information about HAL drivers, I recommend you to look at UM2442.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.