cancel
Showing results for 
Search instead for 
Did you mean: 

How to deactive XIP in QSPI

Dat Tran
Senior II

Hi,

ST example show how to active XIP to read after erase/write data to QSPI. We are success with those step.

And, in case we want to change data, we need to deactive XIP. I set command back to Write Directly mode but look like after XIP is enable then no more command accept.

Does any one know how to disable once enable XIP without reset?

Thanks

5 REPLIES 5
Bouraoui Chemli
ST Employee

Hi @Community member​ 

What did you mean by disabling XIP ? If you mean disabling memory mapped mode. Try to enable the timeout when enabling memory mapped mode and then you can switch to indirect mode.

Best regards,

Bouraoui

Dat Tran
Senior II

Hi, thanks for your answer.

Yes, I mean disable memory-mapped mode.

enable timeout => mean after timeout memory mapped is disable.

We want memory mapped all the time, except when we need to write/erase. And after done writting, we switch back to memory mapped mode without any reset needed.

Can you please give is a bit more clear?

Thank you so much!

ST typically does a DeInit/Init sequence, but there might be a bit to enable it, look at the source and the RM

The READ sequence is programmed into the STM32 and then that is used to form the command/address data into the device.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

QSPI_Config()

Functional Mode into QSPI->CCR FMODE bits

I suspect you'd need to manage hqspi->State transition out of HAL_QSPI_STATE_BUSY_MEM_MAPPED

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Bouraoui Chemli
ST Employee

Hi @Community member​ 

To switch from memory mapped mode to indirect mode without having recourse to reset the QUADSPI. Just abort the QUADSPI when you want to switch from memory mapped mode to indirect mode by inserting the following function : HAL_QSPI_Abort(&QSPIHandle); to disable the memory mapped mode before configuring the indirect mode

Best regards

Bouraoui